/* 
 * Стили публичной страницы КП
 * На основе макета из Figma
 */

/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #FFFFFF;
    color: #1A1F36;
    line-height: 1.6;
}

/* ========== LAYOUT ========== */
.page-wrapper {
    width: 100%;
    min-height: 100vh;
    background: #FFFFFF;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 320px; /* 6 колонок из 12 */
}

@media (max-width: 1440px) {
    .container {
        padding: 0 200px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 100px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ========== HEADER ========== */
.header {
    width: 100%;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
}

.header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 80px 400px;
    gap: 48px;
}

@media (max-width: 1440px) {
    .header-inner {
        padding: 80px 100px;
    }
}

@media (max-width: 1024px) {
    .header-inner {
        padding: 80px 100px;
    }
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.main-heading {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 64px;
    line-height: 125%;
    color: #1A1F36;
}

.offer-subtitle {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 2.5rem;
    text-transform: uppercase;
    line-height: 125%;
    color: #1A1F36;
}

.subtitle {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    color: #6B7280;
}

.header-right {
    width: 160px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        padding: 40px 20px;
        gap: 24px;
        align-items: center;
        text-align: center;
    }
    
    .header-left {
        order: 2;
        align-items: center;
    }
    
    .header-right {
        order: 1;
        width: auto;
        justify-content: center;
    }
    
    .main-heading {
        font-size: 40px;
        line-height: 120%;
    }
    
    .offer-subtitle {
        font-size: 24px;
        line-height: 120%;
        margin-top: 8px;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .logo-placeholder {
        width: 120px;
        height: 60px;
    }
}

/* ========== URGENCY BANNER ========== */
.urgency-banner {
    width: 100%;
    background: #F3F4F6;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

.urgency-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 24px 400px;
    gap: 24px;
}

.intro-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 32px 400px;
    background: #F3F4F6;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

@media (max-width: 1440px) {
    .intro-block {
        padding: 32px 100px;
    }
}

@media (max-width: 1024px) {
    .intro-block {
        padding: 32px 100px;
    }
}

.intro-content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: 100%;
    align-items: flex-start;
}

/* Только описание без даты */
.intro-content-wrapper.only-description .intro-text {
    flex: 1;
    width: 100%;
}

/* Только дата без описания */
.intro-content-wrapper.only-urgency {
    justify-content: center;
}

.intro-content-wrapper.only-urgency .urgency-banner-inline {
    flex: 1;
    width: 100%;
    justify-content: center;
}

.intro-content-wrapper.only-urgency .urgency-block {
    width: auto;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.intro-label {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 133%;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6B7280;
}

.intro-text {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 175%;
    color: #374151;
    flex: 0 0 75%;
}

.urgency-banner-inline {
    flex: 0 0 20%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.urgency-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 20px;
    gap: 8px;
    background: #1A1F36;
    border-radius: 8px;
}

.urgency-icon {
    width: 24px;
    height: 24px;
    color: #FCD34D;
    font-size: 24px;
}

.urgency-text {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 143%;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .urgency-content {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }
    
    .intro-block {
        padding: 24px 20px;
    }
    
    .intro-content-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    
    .intro-text {
        font-size: 13px;
        flex: 1;
    }
    
    /* Только описание без даты - мобильная версия */
    .intro-content-wrapper.only-description .intro-text {
        width: 100%;
    }
    
    /* Только дата без описания - мобильная версия */
    .intro-content-wrapper.only-urgency {
        justify-content: center;
    }
    
    .intro-content-wrapper.only-urgency .urgency-banner-inline {
        width: 100%;
        justify-content: center;
    }
    
    .intro-content-wrapper.only-urgency .urgency-block {
        width: auto;
        justify-content: center;
    }
    
    .urgency-banner-inline {
        flex: 1;
        width: 100%;
    }
    
    .urgency-block {
        width: 100%;
        justify-content: center;
    }
    
    .urgency-text {
        font-size: 14px;
    }
}

/* ========== MAIN CONTENT ========== */
.main-content {
    padding: 80px 400px;
}

@media (max-width: 1440px) {
    .main-content {
        padding: 60px 200px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 60px 100px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 40px 20px;
    }
}

/* ========== OFFER CARD ========== */
.offer-item {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "content";
    column-gap: 32px;
    row-gap: 12px;
    align-items: start;
    margin-bottom: 40px;
}

.offer-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.offer-item--has-image {
    grid-template-columns: 240px 1fr;
    grid-template-areas: "image content";
}

.offer-item--choice {
    grid-template-columns: 1fr 40px;
    grid-template-areas: "content rail";
}

.offer-item--choice.offer-item--has-image {
    grid-template-columns: 240px 1fr 40px;
    grid-template-areas: "image content rail";
}

.offer-image {
    grid-area: image;
    width: 240px;
    height: 240px;
    background: #E5E7EB;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.offer-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.offer-title {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    line-height: 133%;
    color: #1A1F36;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.offer-header-price {
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
}

.pricing-table {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.offer-product-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.offer-product-meta-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.offer-product-meta-label {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    color: #6B7280;
}

.offer-product-meta-value {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    color: #1A1F36;
}

.pricing-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.pricing-label {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    color: #6B7280;
}

.pricing-value {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    color: #1A1F36;
}

.pricing-value-large {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 125%;
    color: #1A1F36;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 143%;
    color: #DC2626;
}

.offer-description {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 157%;
    color: #4B5563;
}

.offer-actions {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

@media (max-width: 768px) {
    .offer-item {
        margin-bottom: 32px;
        grid-template-columns: 1fr;
        grid-template-areas: "content";
        column-gap: 12px;
        row-gap: 12px;
    }

    .offer-item--has-image {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "content";
    }

    .offer-item--choice {
        grid-template-columns: 40px 1fr;
        grid-template-areas: "rail content";
    }

    .offer-item--choice.offer-item--has-image {
        grid-template-columns: 40px 1fr;
        grid-template-areas:
            "image image"
            "rail content";
    }

    .offer-image {
        width: 100%;
        height: 240px;
    }

    .offer-header {
        gap: 12px;
    }
    
    .offer-title {
        font-size: 20px;
    }

    .offer-header-price {
        font-size: 20px;
    }

    .offer-body,
    .offer-description,
    .offer-actions {
        width: 100%;
    }
    
    .offer-description {
        font-size: 14px;
    }
    
    .offer-actions {
        flex-direction: column;
    }
    
    .offer-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .pricing-value-large {
        font-size: 20px;
    }
}

/* ========== BUTTONS ========== */
.btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    gap: 8px;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px; /* Touch-friendly размер */
}

.btn-primary {
    background: #10B981;
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #059669;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #959CB2;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: #7A8199;
}

/* ========== GALLERY ========== */
.gallery {
    padding: 80px 400px;
    background: #F7F8FA;
}

.gallery-title {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 40px;
    line-height: 133%;
    color: #1A1F36;
    margin-bottom: 32px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.gallery-item {
    aspect-ratio: 1;
    background: #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1440px) {
    .gallery {
        padding: 60px 200px;
    }
}

@media (max-width: 1024px) {
    .gallery {
        padding: 60px 100px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery {
        padding: 40px 20px;
    }
    
    .gallery-title {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ========== ADDITIONAL INFO ========== */
.additional-info {
    padding: 80px 400px;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 40px;
    line-height: 133%;
    color: #1A1F36;
    margin-bottom: 32px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
}

.info-label {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    color: #6B7280;
}

.info-value {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 143%;
    color: #1A1F36;
    text-align: right;
}

@media (max-width: 1440px) {
    .additional-info {
        padding: 60px 200px;
    }
}

@media (max-width: 1024px) {
    .additional-info {
        padding: 60px 100px;
    }
}

@media (max-width: 768px) {
    .additional-info {
        padding: 40px 20px;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-bottom: 12px;
    }
    
    .info-value {
        text-align: left;
    }
}

/* ========== CONTACT ========== */
.contact {
    padding: 80px 400px;
    background: #F7F8FA;
}

.contact-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 240px;
    background: #FFFFFF;
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-avatar {
    width: 96px;
    height: 96px;
    background: #E5E7EB;
    border-radius: 50%;
    overflow: hidden;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.contact-name {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 156%;
    color: #1A1F36;
}

.contact-position {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    color: #6B7280;
}

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.contact-detail {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-detail i {
    font-size: 16px;
    color: #6B7280;
}

@media (max-width: 1440px) {
    .contact {
        padding: 60px 200px;
    }
}

@media (max-width: 1024px) {
    .contact {
        padding: 60px 100px;
    }
}

@media (max-width: 768px) {
    .contact {
        padding: 40px 20px;
    }
    
    .contact-grid {
        gap: 40px;
        flex-direction: column;
        align-items: center;
    }
    
    .contact-card {
        max-width: 100%;
        width: 100%;
    }
    
    .contact-name {
        font-size: 16px;
    }
    
    .contact-position {
        font-size: 13px;
    }
    
    .contact-detail {
        font-size: 13px;
    }
}

/* ========== FOOTER ========== */
.footer {
    padding: 40px 400px;
    border-top: 1px solid #E5E7EB;
}

.footer-text {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    text-align: center;
    color: #9CA3AF;
}

.footer-link {
    color: #007bff;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

@media (max-width: 1440px) {
    .footer {
        padding: 40px 200px;
    }
}

@media (max-width: 1024px) {
    .footer {
        padding: 40px 100px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 20px;
    }
}

/* ========== AUTHOR BANNER ========== */
.author-banner {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 16px 400px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-banner.draft {
    background: #DC2626;
    color: #FFFFFF;
}

.author-banner.warning {
    background: #F59E0B;
    color: #FFFFFF;
}

.author-banner.published {
    background: #10B981;
    color: #FFFFFF;
}

.banner-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.banner-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.banner-text-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.banner-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
}

.banner-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    opacity: 0.9;
}

.banner-button {
    padding: 8px 16px;
    background: #FFFFFF;
    color: #374151;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.banner-button:hover {
    transform: translateY(-1px);
}

.banner-button-primary {
    background: #3B82F6;
    color: #FFFFFF;
}

.banner-button-primary:hover {
    background: #2563EB;
}

@media (max-width: 1440px) {
    .author-banner {
        padding: 16px 200px;
    }
}

@media (max-width: 1024px) {
    .author-banner {
        padding: 16px 100px;
    }
}

@media (max-width: 768px) {
    .author-banner {
        padding: 12px 20px;
    }
    
    .banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .banner-left {
        width: 100%;
    }
    
    .banner-title {
        font-size: 13px;
    }
    
    .banner-description {
        font-size: 11px;
    }
    
    .banner-button {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }
}

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #F3F4F6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #E5E7EB;
}

.modal-body {
    display: flex;
    flex-direction: row;
    gap: 32px;
}

.modal-image {
    width: 320px;
    height: 320px;
    background: #E5E7EB;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 125%;
    color: #1A1F36;
}

.modal-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 150%;
    color: #4B5563;
}

.modal-params {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-param {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-param-key {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1A1F36;
}

.modal-param-value {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #6B7280;
    text-align: right;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 24px 16px;
        max-width: 100%;
        margin: 0 16px;
    }
    
    .modal-body {
        flex-direction: column;
        gap: 24px;
    }
    
    .modal-image {
        width: 100%;
        height: 240px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-description {
        font-size: 14px;
    }
    
    .modal-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
    }
}

/* ========== GROUP ACCORDION ========== */
.group-accordion {
    margin-bottom: 24px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
    overflow: hidden;
}

.group-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.group-accordion-header:hover {
    background: #F9FAFB;
}

.group-accordion-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.group-accordion-heading {
    flex: 1;
    min-width: 0;
}

.group-accordion-price-stacked {
    display: none;
}

.group-accept-btn-mobile {
    display: none;
}

.group-accordion-actions {
    display: none;
}

.group-accordion-icon {
    font-size: 24px;
    color: #6B7280;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.group-accordion-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 133%;
    color: #1A1F36;
    margin: 0;
}

.group-discount-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #FCD34D;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #1A1F36;
}

.group-accordion-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.group-accordion-price {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #1A1F36;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.group-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 24px;
}

.group-accordion-content.active {
    max-height: 2000px;
    padding: 0 24px 24px 24px;
}

.group-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 157%;
    color: #4B5563;
    margin: 16px 0 16px 0;
}

.group-includes-label {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.group-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.group-product-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;    
}

.group-product-item.with-divider {
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
   /* margin-bottom: 16px; */
}

.group-product-photo {
    width: 64px;
    height: 64px;
    background: #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.group-product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-product-info {
    flex: 1;
}

.group-product-name {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    color: #1A1F36;
    margin-bottom: 8px;
}

.group-product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-product-quantity {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #6B7280;
}

.group-product-price {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #1A1F36;
}

.group-summary {
    border-top: 1px solid #E5E7EB;
    padding-top: 20px;
}

.group-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-summary-row.subtotal {
    padding-top: 16px;
    margin-top: 8px;
}

.group-summary-row.total {
    border-top: 2px solid #1A1F36;
    margin-top: 8px;
    padding-top: 16px;
}

.group-summary-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #6B7280;
}

.group-summary-row.subtotal .group-summary-label {
    font-size: 14px;
    color: #6B7280;
}

.group-summary-row.total .group-summary-label {
    font-weight: 600;
    font-size: 20px;
    color: #1A1F36;
}

.group-summary-value {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #6B7280;
}

.group-summary-row.total .group-summary-value {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #1A1F36;
}

.group-summary-row.vat {
    margin-top: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #6B7280;
}

.group-summary-row.vat .group-summary-muted {
    color: #9CA3AF;
}

/* Итоги КП (режим отдельных товаров) */
.main-content > .offer-totals {
    width: 100%;
    max-width: none;
    margin-left: 0;
}

.offer-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.offer-totals-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #6B7280;
}

.offer-totals-value {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #1A1F36;
}

.offer-totals-discount {
    color: #DC2626;
}

.offer-totals-final {
    border-top: 2px solid #1A1F36;
    margin-top: 8px;
    padding-top: 16px;
}

.offer-totals-final .offer-totals-label {
    font-weight: 600;
    font-size: 20px;
    color: #1A1F36;
}

.offer-totals-final .offer-totals-value {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 24px;
}

.offer-totals-vat .offer-totals-label,
.offer-totals-vat .offer-totals-value {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    color: #6B7280;
}

.offer-totals-vat .offer-totals-muted {
    color: #9CA3AF;
}

@media (max-width: 768px) {
    .group-accordion-header {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 16px 48px 16px 16px;
    }

    .group-accordion-icon {
        position: absolute;
        top: 16px;
        right: 16px;
        margin: 0;
    }

    .group-accordion-heading {
        width: 100%;
    }

    .group-accordion-title {
        font-size: 20px;
        width: 100%;
        line-height: 1.3;
        padding-right: 0;
    }

    .group-accordion-price-stacked {
        display: block;
        margin-top: 8px;
        font-size: 20px;
    }

    .group-accordion-right {
        display: none;
    }

    .group-accept-btn-desktop {
        display: none;
    }

    .group-accordion-actions {
        display: block;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #E5E7EB;
    }

    .group-accept-btn-mobile {
        display: flex;
        width: 100%;
        height: 44px;
        font-size: 14px;
        justify-content: center;
    }

    .group-accordion-content {
        padding: 0 16px;
    }

    .group-accordion-content.active {
        padding: 0 16px 16px 16px;
    }

    .group-product-photo {
        width: 60px;
        height: 60px;
    }

    .group-product-name {
        font-size: 14px;
    }

    .group-product-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ========== UTILITIES ========== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ========== SUCCESS MODAL (DaisyUI dialog) ========== */
#successModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background-color: transparent;
    padding: 0 !important;
    margin: 0 !important;
    border: none;
}

#successModal:not([open]) {
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    display: none !important;
}

#successModal[open] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#successModal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-box {
    position: relative;
    max-width: 32rem;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: auto;
}

.modal-box.max-w-2xl {
    max-width: 42rem;
}

.modal-close-btn {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    width: 2rem !important;
    height: 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    z-index: 10 !important;
}

.modal-close-btn:hover {
    background-color: #f3f4f6 !important;
    color: #1f2937 !important;
}

.modal-close-btn i {
    font-size: 1.5rem !important;
}

.modal-action {
    display: flex;
    margin-top: 1.5rem;
}

.modal-action.justify-center {
    justify-content: center;
}

.modal-action.gap-3 {
    gap: 0.75rem;
}

.modal-box .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.modal-box .btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.modal-box .btn-secondary {
    background-color: #f97316;
    color: #ffffff;
}

.modal-box .btn-ghost {
    background-color: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
}

.form-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.join {
    display: flex;
    width: 100%;
}

.join-item {
    border-radius: 0;
}

.join-item:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.join-item:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.input {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #1f2937;
    outline: none;
}

.input.input-bordered {
    border-color: #d1d5db;
}

.input.flex-1 {
    flex: 1;
}

.input.font-mono {
    font-family: ui-monospace, monospace;
}

.text-center {
    text-align: center;
}

.py-6 {
    padding: 1.5rem 0;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.inline-flex {
    display: inline-flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.bg-success\/10 {
    background-color: rgba(34, 197, 94, 0.1);
}

.text-success {
    color: #22c55e;
}

.text-5xl {
    font-size: 3rem;
}

.font-bold {
    font-weight: 700;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-base-content\/70 {
    color: rgba(31, 41, 55, 0.7);
}

.gap-3 {
    gap: 0.75rem;
}

.w-full {
    width: 100%;
}

/* ========== OFFER SELECTION ========== */
.offer-choice-rail {
    grid-area: rail;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    margin: 0;
    cursor: pointer;
    background: #E5E7EB;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.offer-choice-rail:has(.offer-choice-radio:checked) {
    background: #10B981;
}

.offer-choice-radio {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #1A1F36;
}

.offer-choice-rail:has(.offer-choice-radio:checked) .offer-choice-radio {
    accent-color: #065F46;
}

input.offer-choice-radio[type="checkbox"] {
    border-radius: 3px;
}

.offer-line-fixed .offer-title {
    color: #4B5563;
}

.offer-cta-block {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.offer-cta-block .offer-submit-btn {
    min-width: 240px;
}

@media (max-width: 768px) {
    .offer-cta-block .offer-submit-btn {
        width: 100%;
        min-width: 0;
    }
}

/* ========== ЗАЩИТА ОТ ПЕЧАТИ И PDF ========== */

/* Водяной знак при печати */
@media print {
    /* Создаем водяной знак через псевдоэлемент */
    body::before {
        content: "НАРУШЕНИЕ КП НЕ ОПЛАЧЕНО";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 120px;
        font-weight: 900;
        color: rgba(220, 38, 38, 0.15);
        z-index: 9999;
        pointer-events: none;
        white-space: nowrap;
        letter-spacing: 0.1em;
        font-family: 'Oswald', sans-serif;
        text-transform: uppercase;
    }
    
    /* Обнуление всех цен до 0 ₽ */
    .offer-price,
    .total-price,
    .group-price,
    .group-total-price,
    .product-price,
    .final-price,
    .summary-amount,
    .group-product-price,
    .group-summary-value,
    [class*="price"],
    [class*="-price"],
    [class*="summary-value"] {
        visibility: hidden !important;
    }
    
    .offer-price::after,
    .total-price::after,
    .group-price::after,
    .group-total-price::after,
    .product-price::after,
    .final-price::after,
    .summary-amount::after,
    .group-product-price::after,
    .group-summary-value::after,
    [class*="price"]::after,
    [class*="-price"]::after,
    [class*="summary-value"]::after {
        content: "0 ₽" !important;
        visibility: visible !important;
        color: #DC2626 !important;
        font-weight: 700;
    }
    
    /* Специально для процентов скидки - тоже обнуляем */
    .discount-badge {
        visibility: hidden !important;
    }
    
    .discount-badge::after {
        content: "0%" !important;
        visibility: visible !important;
        color: #DC2626 !important;
        font-weight: 700;
    }
    
    /* Скрываем кнопки и элементы управления */
    .author-banner,
    .cta-button,
    .banner-button,
    button,
    .urgency-banner-inline {
        display: none !important;
    }
    
    /* Добавляем дополнительные водяные знаки по всей странице */
    .header::after,
    .intro-block::after,
    .main-content::after,
    .footer::after {
        content: "НАРУШЕНИЕ • НЕ ОПЛАЧЕНО";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 60px;
        font-weight: 700;
        color: rgba(220, 38, 38, 0.08);
        z-index: 999;
        pointer-events: none;
        white-space: nowrap;
        letter-spacing: 0.2em;
    }
    
    /* Делаем секции relative для позиционирования водяных знаков */
    .header,
    .intro-block,
    .main-content,
    .footer {
        position: relative;
    }
}
