/*
    Лаконичный общий стиль публичного сайта.
    Внутренний кабинет не затрагивается: все правила ограничены body[class*="public-"].
*/

body[class*="public-"] {
    background: linear-gradient(180deg, #fffbf7 0%, #ffffff 48%, #fff9f5 100%) !important;
    color: #2a1b22 !important;
}

body[class*="public-"] .site-page {
    background:
        radial-gradient(circle at 8% 0%, rgba(251, 207, 232, 0.22), transparent 28%),
        radial-gradient(circle at 94% 10%, rgba(233, 130, 112, 0.12), transparent 28%),
        linear-gradient(180deg, #fffbf7 0%, #ffffff 52%, #fff9f5 100%) !important;
}

body[class*="public-"] .site-shell {
    max-width: 1160px !important;
    color: #2a1b22 !important;
}

body[class*="public-"] .site-header {
    position: static !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 24px !important;
    margin: 0 0 34px !important;
    padding: 12px 0 18px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border-bottom: 1px solid #ead7d0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body[class*="public-"] .site-brand {
    color: #7a1233 !important;
    font-weight: 820 !important;
    font-size: 24px !important;
    letter-spacing: -0.035em !important;
}

body[class*="public-"] .site-brand::before {
    display: none !important;
}

body[class*="public-"] .site-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 18px !important;
    font-size: 15px !important;
}

body[class*="public-"] .site-nav a {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #3b2930 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

body[class*="public-"] .site-nav a:hover,
body[class*="public-"] .site-nav a:focus-visible {
    color: #b0123f !important;
    background: transparent !important;
    text-decoration: none !important;
    outline: none !important;
    transform: none !important;
}

body[class*="public-"] .hero {
    background:
        radial-gradient(circle at 86% 16%, rgba(233, 130, 112, 0.20), transparent 36%),
        linear-gradient(135deg, #fff5f0, #fffbf7) !important;
    border: 1px solid #ead7d0 !important;
    color: #2a1b22 !important;
    box-shadow: 0 18px 46px rgba(122, 18, 51, 0.08) !important;
}

body[class*="public-"] .hero h1,
body[class*="public-"] h1 {
    color: #7a1233 !important;
    font-weight: 760 !important;
    letter-spacing: -0.05em !important;
}

body[class*="public-"] .hero p {
    color: #563844 !important;
    font-weight: 430 !important;
}

body[class*="public-"] .cta,
body[class*="public-"] .cta-card,
body[class*="public-"] .cta-banner,
body[class*="public-"] .order-cta,
body[class*="public-"] .hero-cta {
    background: linear-gradient(135deg, #8f102f, #c80f46) !important;
    color: #ffffff !important;
}

body[class*="public-"] .cta h1,
body[class*="public-"] .cta h2,
body[class*="public-"] .cta h3,
body[class*="public-"] .cta-card h1,
body[class*="public-"] .cta-card h2,
body[class*="public-"] .cta-card h3,
body[class*="public-"] .cta-banner h1,
body[class*="public-"] .cta-banner h2,
body[class*="public-"] .cta-banner h3,
body[class*="public-"] .order-cta h1,
body[class*="public-"] .order-cta h2,
body[class*="public-"] .order-cta h3,
body[class*="public-"] .hero-cta h1,
body[class*="public-"] .hero-cta h2,
body[class*="public-"] .hero-cta h3 {
    color: #ffffff !important;
}

body[class*="public-"] .cta p,
body[class*="public-"] .cta-card p,
body[class*="public-"] .cta-banner p,
body[class*="public-"] .order-cta p,
body[class*="public-"] .hero-cta p {
    color: #fff1f5 !important;
}

body[class*="public-"] h2,
body[class*="public-"] h3,
body[class*="public-"] .section-title {
    color: #7a1233 !important;
    font-weight: 740 !important;
    letter-spacing: -0.03em !important;
}

body[class*="public-"] .card,
body[class*="public-"] .hero-card,
body[class*="public-"] .info-card,
body[class*="public-"] .variety-card,
body[class*="public-"] .content-card,
body[class*="public-"] .gallery {
    border-color: #ead7d0 !important;
    box-shadow: 0 14px 36px rgba(122, 18, 51, 0.07) !important;
}

body[class*="public-"] .button {
    background: #b0123f !important;
    border-color: #b0123f !important;
    color: #fff !important;
    font-weight: 760 !important;
    box-shadow: none !important;
}

body[class*="public-"] .button:hover,
body[class*="public-"] .button:focus-visible {
    background: #8f102f !important;
    border-color: #8f102f !important;
}

body[class*="public-"] .button-secondary {
    background: #ffffff !important;
    color: #b0123f !important;
    border-color: #d9b8c2 !important;
}

body[class*="public-"] .contact-list li,
body[class*="public-"] .notice,
body[class*="public-"] .order-line,
body[class*="public-"] .filters,
body[class*="public-"] .color-filter-panel {
    background: #fff8f1 !important;
    border-color: #f1d2bf !important;
    color: #6d321e !important;
}

body[class*="public-"] .form-control {
    border-color: #e0c5cd !important;
    background: #fff !important;
}

body[class*="public-"] .form-control:focus {
    border-color: #b0123f !important;
    box-shadow: 0 0 0 4px rgba(176, 18, 63, 0.10) !important;
}

body.public-catalog-page .status-pill,
body.public-variety-detail-page .status-pill {
    display: none !important;
}

body.public-catalog-page .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
    gap: 28px !important;
}

body.public-catalog-page .variety-photo {
    aspect-ratio: 4 / 3.35 !important;
    padding: 0 !important;
}

body.public-catalog-page .variety-body {
    padding: 22px !important;
}

body[class*="public-"] .public-footer {
    margin-top: 52px;
    padding: 18px 0 0;
    border-top: 1px solid #ead7d0;
    color: #72545d;
}

body[class*="public-"] .public-footer-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 760px) {
    body[class*="public-"] .site-header {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    body[class*="public-"] .site-nav {
        justify-content: flex-start !important;
        gap: 12px 16px !important;
    }

    body[class*="public-"] .hero h1,
    body[class*="public-"] h1 {
        letter-spacing: -0.04em !important;
    }

    body.public-catalog-page .catalog-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Исправление визуальной базы после перехода на public_base.html */

body[class*="public-"] {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 17px !important;
    line-height: 1.55 !important;
}

body[class*="public-"] .site-page {
    min-height: 100vh !important;
}

body[class*="public-"] .site-shell {
    width: min(1160px, calc(100% - 40px)) !important;
    max-width: 1160px !important;
    margin: 0 auto !important;
    padding: 28px 0 64px !important;
    box-sizing: border-box !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    color: #2a1b22 !important;
}

body[class*="public-"] .site-header {
    padding: 14px 0 20px !important;
}

body[class*="public-"] .site-brand {
    font-size: 25px !important;
}

body[class*="public-"] .site-nav {
    font-size: 16px !important;
}

body[class*="public-"] .site-nav a {
    position: relative !important;
    transition:
        color 180ms ease,
        transform 180ms ease,
        text-decoration-color 180ms ease !important;
}

body[class*="public-"] .site-nav a:hover,
body[class*="public-"] .site-nav a:focus-visible {
    transform: translateY(-1px) !important;
}

body[class*="public-"] .button {
    min-height: 48px !important;
    padding: 13px 20px !important;
    font-size: 16px !important;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease !important;
}

body[class*="public-"] .button:hover,
body[class*="public-"] .button:focus-visible {
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 28px rgba(176, 18, 63, 0.18) !important;
}

body[class*="public-"] .button-secondary:hover,
body[class*="public-"] .button-secondary:focus-visible {
    box-shadow: 0 12px 24px rgba(122, 18, 51, 0.10) !important;
}

body[class*="public-"] .card,
body[class*="public-"] .hero-card,
body[class*="public-"] .info-card,
body[class*="public-"] .variety-card,
body[class*="public-"] .content-card,
body[class*="public-"] .gallery,
body[class*="public-"] .home-note-card,
body[class*="public-"] .step-card,
body[class*="public-"] .popular-card,
body[class*="public-"] .terms-card,
body[class*="public-"] .terms-section,
body[class*="public-"] .contacts-card {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease !important;
}

body[class*="public-"] .variety-card:hover,
body[class*="public-"] .variety-card:focus-within,
body[class*="public-"] .popular-card:hover,
body[class*="public-"] .popular-card:focus-visible,
body[class*="public-"] .step-card:hover,
body[class*="public-"] .terms-card:hover,
body[class*="public-"] .contacts-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 24px 54px rgba(122, 18, 51, 0.13) !important;
}

body[class*="public-"] p,
body[class*="public-"] li {
    font-size: 17px !important;
}

body[class*="public-"] .hero p,
body[class*="public-"] .home-hero-main p,
body[class*="public-"] .terms-hero p,
body[class*="public-"] .contacts-hero p {
    font-size: 19px !important;
}

body[class*="public-"] h1 {
    font-size: clamp(42px, 5vw, 68px) !important;
}

body[class*="public-"] h2 {
    font-size: clamp(30px, 3vw, 42px) !important;
}

body[class*="public-"] h3 {
    font-size: 22px !important;
}

body[class*="public-"] .public-footer-text {
    font-size: 15px !important;
}

@media (max-width: 760px) {
    body[class*="public-"] {
        font-size: 16px !important;
    }

    body[class*="public-"] .site-shell {
        width: min(100% - 28px, 1160px) !important;
        padding: 20px 0 48px !important;
    }

    body[class*="public-"] .site-brand {
        font-size: 23px !important;
    }

    body[class*="public-"] .site-nav {
        font-size: 15px !important;
    }

    body[class*="public-"] h1 {
        font-size: clamp(36px, 11vw, 46px) !important;
    }

    body[class*="public-"] h2 {
        font-size: clamp(28px, 8vw, 36px) !important;
    }

    body[class*="public-"] .hero p,
    body[class*="public-"] .home-hero-main p,
    body[class*="public-"] .terms-hero p,
    body[class*="public-"] .contacts-hero p {
        font-size: 17px !important;
    }
}

/* Мобильная полировка публичного сайта */
body[class*="public-"] {
    overflow-x: hidden !important;
}

body[class*="public-"] img {
    max-width: 100%;
}

@media (max-width: 900px) {
    body[class*="public-"] .site-header {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    body[class*="public-"] .site-nav {
        justify-content: flex-start !important;
        width: 100% !important;
        gap: 8px !important;
    }
}

@media (max-width: 760px) {
    body[class*="public-"] .site-shell {
        width: min(100% - 28px, 1160px) !important;
        padding-top: 18px !important;
        padding-bottom: 46px !important;
    }

    body[class*="public-"] .site-header {
        margin-bottom: 24px !important;
        padding-bottom: 16px !important;
    }

    body[class*="public-"] .site-brand {
        font-size: 23px !important;
        line-height: 1.15 !important;
    }

    body[class*="public-"] .site-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    body[class*="public-"] .site-nav a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 40px !important;
        padding: 9px 10px !important;
        border-radius: 999px !important;
        border: 1px solid #ead7d0 !important;
        background: rgba(255, 255, 255, 0.86) !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        text-decoration: none !important;
    }

    body[class*="public-"] .site-nav a.is-active {
        background: #fff8f1 !important;
        border-color: #f1d2bf !important;
        color: #b0123f !important;
        text-decoration: none !important;
    }

    body[class*="public-"] .button {
        width: 100%;
        box-sizing: border-box;
    }

    body[class*="public-"] .hero,
    body[class*="public-"] .catalog-hero,
    body[class*="public-"] .contacts-hero,
    body[class*="public-"] .request-hero,
    body[class*="public-"] .terms-hero {
        padding: 28px 20px !important;
        border-radius: 24px !important;
    }

    body[class*="public-"] .card,
    body[class*="public-"] .contacts-card,
    body[class*="public-"] .request-card,
    body[class*="public-"] .content-card,
    body[class*="public-"] .variety-card,
    body[class*="public-"] .terms-card,
    body[class*="public-"] .terms-section,
    body[class*="public-"] .gallery {
        border-radius: 22px !important;
    }

    body[class*="public-"] .catalog-grid,
    body[class*="public-"] .popular-grid,
    body[class*="public-"] .steps-grid,
    body[class*="public-"] .terms-grid,
    body[class*="public-"] .contacts-layout,
    body[class*="public-"] .request-layout,
    body[class*="public-"] .detail-layout {
        grid-template-columns: 1fr !important;
    }

    body[class*="public-"] .form-grid {
        grid-template-columns: 1fr !important;
    }

    body[class*="public-"] .contact-method-options {
        grid-template-columns: 1fr !important;
    }

    body[class*="public-"] .order-line {
        grid-template-columns: 1fr !important;
    }

    body[class*="public-"] .public-footer-inner {
        grid-template-columns: 1fr !important;
    }

}

@media (max-width: 420px) {
    body[class*="public-"] .site-nav {
        grid-template-columns: 1fr !important;
    }

    body[class*="public-"] h1 {
        font-size: clamp(34px, 11vw, 42px) !important;
    }

    body[class*="public-"] h2 {
        font-size: clamp(26px, 9vw, 34px) !important;
    }

    body[class*="public-"] p,
    body[class*="public-"] li {
        font-size: 16px !important;
    }
}

/* Финальная полировка публичного меню, кнопок и футера */
body[class*="public-"] .site-nav a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 7px 11px !important;
    border-radius: 999px !important;
    text-decoration: none !important;
}

body[class*="public-"] .site-nav a:hover,
body[class*="public-"] .site-nav a:focus-visible {
    color: #b0123f !important;
    background: #fff8f1 !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

body[class*="public-"] .site-nav a.is-active {
    color: #b0123f !important;
    background: #fff8f1 !important;
    border: 1px solid #f1d2bf !important;
    font-weight: 850 !important;
    text-decoration: none !important;
}

body[class*="public-"] .button,
body[class*="public-"] a.button,
body[class*="public-"] button.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    padding: 12px 22px !important;
    border-radius: 999px !important;
    border: 1px solid #b0123f !important;
    background: #b0123f !important;
    color: #ffffff !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 0 12px 24px rgba(176, 18, 63, 0.16) !important;
    cursor: pointer !important;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease !important;
}

body[class*="public-"] .button:hover,
body[class*="public-"] .button:focus-visible,
body[class*="public-"] a.button:hover,
body[class*="public-"] a.button:focus-visible,
body[class*="public-"] button.button:hover,
body[class*="public-"] button.button:focus-visible {
    background: #8f102f !important;
    border-color: #8f102f !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 16px 30px rgba(176, 18, 63, 0.20) !important;
    outline: none !important;
}

body[class*="public-"] .button-secondary,
body[class*="public-"] a.button-secondary,
body[class*="public-"] button.button-secondary {
    background: #ffffff !important;
    color: #b0123f !important;
    border-color: #d9b8c2 !important;
    box-shadow: 0 10px 22px rgba(122, 18, 51, 0.10) !important;
}

body[class*="public-"] .button-secondary:hover,
body[class*="public-"] .button-secondary:focus-visible,
body[class*="public-"] a.button-secondary:hover,
body[class*="public-"] a.button-secondary:focus-visible,
body[class*="public-"] button.button-secondary:hover,
body[class*="public-"] button.button-secondary:focus-visible {
    background: #fff8f1 !important;
    color: #8f102f !important;
    border-color: #cfa5b2 !important;
}

body[class*="public-"] .card,
body[class*="public-"] .hero-card,
body[class*="public-"] .info-card,
body[class*="public-"] .content-card,
body[class*="public-"] .variety-card,
body[class*="public-"] .popular-card,
body[class*="public-"] .why-card,
body[class*="public-"] .terms-card,
body[class*="public-"] .terms-section,
body[class*="public-"] .contacts-card,
body[class*="public-"] .request-card,
body[class*="public-"] .home-hero-main,
body[class*="public-"] .home-hero-visual {
    background-color: rgba(255, 254, 250, 0.96) !important;
    border-color: #ead7d0 !important;
    border-radius: 28px !important;
    box-shadow: 0 18px 42px rgba(122, 18, 51, 0.08) !important;
}

body[class*="public-"] .cta,
body[class*="public-"] .cta-card,
body[class*="public-"] .cta-banner,
body[class*="public-"] .order-cta,
body[class*="public-"] .hero-cta,
body[class*="public-"] .home-catalog-cta,
body[class*="public-"] .terms-cta,
body[class*="public-"] .about-cta,
body[class*="public-"] .contacts-mini-cta {
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 215, 201, 0.42), transparent 30%),
        linear-gradient(135deg, #fff8f1, #ffffff) !important;
    border: 1px solid #ead7d0 !important;
    color: #2a1b22 !important;
    box-shadow: 0 18px 42px rgba(122, 18, 51, 0.08) !important;
}

body[class*="public-"] .cta h1,
body[class*="public-"] .cta h2,
body[class*="public-"] .cta h3,
body[class*="public-"] .cta-card h1,
body[class*="public-"] .cta-card h2,
body[class*="public-"] .cta-card h3,
body[class*="public-"] .cta-banner h1,
body[class*="public-"] .cta-banner h2,
body[class*="public-"] .cta-banner h3,
body[class*="public-"] .order-cta h1,
body[class*="public-"] .order-cta h2,
body[class*="public-"] .order-cta h3,
body[class*="public-"] .hero-cta h1,
body[class*="public-"] .hero-cta h2,
body[class*="public-"] .hero-cta h3,
body[class*="public-"] .home-catalog-cta h1,
body[class*="public-"] .home-catalog-cta h2,
body[class*="public-"] .home-catalog-cta h3,
body[class*="public-"] .terms-cta h1,
body[class*="public-"] .terms-cta h2,
body[class*="public-"] .terms-cta h3,
body[class*="public-"] .about-cta h1,
body[class*="public-"] .about-cta h2,
body[class*="public-"] .about-cta h3,
body[class*="public-"] .contacts-mini-cta h1,
body[class*="public-"] .contacts-mini-cta h2,
body[class*="public-"] .contacts-mini-cta h3 {
    color: #7a1233 !important;
}

body[class*="public-"] .cta p,
body[class*="public-"] .cta-card p,
body[class*="public-"] .cta-banner p,
body[class*="public-"] .order-cta p,
body[class*="public-"] .hero-cta p,
body[class*="public-"] .home-catalog-cta p,
body[class*="public-"] .terms-cta p,
body[class*="public-"] .about-cta p,
body[class*="public-"] .contacts-mini-cta p {
    color: #563844 !important;
}

body[class*="public-"] .public-footer {
    margin-top: 54px !important;
    padding: 22px 0 0 !important;
    border-top: 1px solid #ead7d0 !important;
    color: #72545d !important;
    text-align: center !important;
}

body[class*="public-"] .public-footer p {
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}
