/* ============================================================
   Внутренние страницы: услуги, блог, статья, ошибки.
   Палитра и типографика наследуются от главной страницы.
   ============================================================ */

:root {
    --red: #C41E3A;
    --red-dark: #9A1830;
    --blue: #1A365D;
    --blue-dark: #0F2342;
    --white: #FFFFFF;
    --cream: #FDF8F5;
    --gray: #6B7280;
    --black: #0A0A0A;
    --line: rgba(10, 10, 10, 0.09);
    --radius: 18px;
}

/* Внутренние страницы не подключают main.css, поэтому базовый сброс — здесь */
body.inner-page *,
body.inner-page *::before,
body.inner-page *::after {
    box-sizing: border-box;
}

body.inner-page {
    font-family: 'Manrope', sans-serif;
    background: var(--cream);
    color: var(--black);
    margin: 0;
    overflow-x: hidden;
}

body.inner-page h1,
body.inner-page h2,
body.inner-page h3,
body.inner-page h4 {
    font-family: 'Unbounded', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

body.inner-page img { max-width: 100%; height: auto; }
body.inner-page a { color: inherit; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.active { opacity: 1; transform: none; }

/* ---------------- Шапка ---------------- */

.page-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 60px;
    background: rgba(253, 248, 245, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.page-nav.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 8px 30px rgba(10, 10, 10, .06);
}

/* Логотип обрезается контейнером — тот же приём, что на главной,
   иначе квадратный PNG растягивает шапку по высоте */
.page-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 150px;
    height: 50px;
    overflow: hidden;
    flex: 0 0 auto;
}

.page-logo img {
    height: 176px;
    width: 130%;
    max-width: none;
    transition: transform 0.3s ease;
}

.page-logo:hover img { transform: scale(1.05); }

.page-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-nav .nav-links > li { position: relative; }

.page-nav .nav-links a {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--black);
    transition: color .3s ease;
}

.page-nav .nav-links a:hover { color: var(--red); }

.page-nav .has-drop .drop {
    position: absolute;
    top: 130%;
    left: -18px;
    min-width: 270px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 22px 50px rgba(10, 10, 10, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .25s ease;
}

.page-nav .has-drop:hover .drop { opacity: 1; visibility: visible; transform: none; }

.page-nav .drop a {
    display: block;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: .9rem;
    font-weight: 500;
}

.page-nav .drop a:hover { background: var(--cream); color: var(--red); }

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

.nav-phone {
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}

.page-nav .nav-cta {
    padding: 14px 32px;
    background: var(--red);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.3);
    transition: all 0.3s ease;
}

.page-nav .nav-cta:hover { background: var(--red-dark); transform: translateY(-2px); color: var(--white); }

.lang-switch { position: relative; }

.lang-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.lang-drop {
    position: absolute;
    top: 120%;
    right: 0;
    min-width: 130px;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(10, 10, 10, .12);
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
}

.lang-switch:hover .lang-drop { opacity: 1; visibility: visible; }

.lang-drop a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: .85rem;
    text-decoration: none;
}

.lang-drop a.active,
.lang-drop a:hover { background: var(--cream); color: var(--red); }

.page-nav .menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.page-nav .menu-toggle span { width: 26px; height: 2px; background: var(--black); transition: .3s; }

/* ---------------- Хлебные крошки ---------------- */

.breadcrumbs { padding: 24px 60px 0; }

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .85rem;
    color: var(--gray);
}

.breadcrumbs li { display: flex; gap: 8px; align-items: center; }
.breadcrumbs a { color: var(--gray); text-decoration: none; }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs [aria-current] { color: var(--black); font-weight: 600; }

/* ---------------- Первый экран посадочной ---------------- */

.landing-hero { padding: 60px 60px 120px; }

.landing-hero-inner {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 60px;
    align-items: center;
}

.landing-hero h1 {
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    font-weight: 800;
    margin: 0 0 20px;
}

.landing-lead {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.7;
    color: #40454d;
    max-width: 640px;
    margin: 0 0 28px;
}

.landing-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 32px; }

.landing-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 14px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 100px;
}

.lp-label { font-size: .8rem; color: var(--gray); text-transform: uppercase; letter-spacing: .08em; }
.lp-value { font-family: 'Unbounded', sans-serif; font-size: 1.35rem; font-weight: 800; color: var(--red); }
.lp-unit { font-size: .9rem; color: var(--gray); }

.landing-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: .9rem;
    font-weight: 600;
}

.landing-rating .stars { color: #F5A623; letter-spacing: 2px; }

.landing-cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

.landing-hero .btn-primary,
.error-links .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 17px 36px;
    background: var(--red);
    color: var(--white);
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s ease, transform .25s ease;
}

.landing-hero .btn-primary:hover,
.error-links .btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }

.landing-hero .btn-secondary,
.error-links .btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 17px 36px;
    border: 2px solid var(--black);
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s ease;
}

.landing-hero .btn-secondary:hover,
.error-links .btn-secondary:hover { background: var(--black); color: var(--white); }

.landing-hero-image img {
    width: 100%;
    border-radius: 26px;
    box-shadow: 0 32px 70px rgba(10, 10, 10, .16);
    object-fit: cover;
}

/* ---------------- Текстовый блок ---------------- */

.landing-content,
.article-page { padding: 90px 60px 120px; }

.prose {
    max-width: 820px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #2c3038;
}

.prose h2 {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    margin: 48px 0 18px;
}

.prose h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); margin: 34px 0 14px; }
.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 10px; }
.prose a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 16px; margin: 24px 0; }
.prose blockquote {
    margin: 28px 0;
    padding: 20px 26px;
    border-left: 4px solid var(--red);
    background: var(--white);
    border-radius: 0 14px 14px 0;
    font-style: italic;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 26px 0;
    font-size: .95rem;
}

.prose th, .prose td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--white); font-weight: 700; }

/* ---------------- Общие заголовки секций ---------------- */

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin: 0 0 40px;
}

/* ---------------- FAQ ---------------- */

.faq-section { padding: 150px 60px; background: var(--white); }
.faq-list { max-width: 900px; margin: 0 auto; }

.faq-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 14px;
    background: var(--cream);
    overflow: hidden;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--red);
    transition: transform .25s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item summary h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
}

.faq-answer { padding: 0 24px 22px; color: #40454d; line-height: 1.75; }
.faq-answer p { margin: 0 0 12px; }

/* ---------------- Отзывы ---------------- */

.reviews-section { padding: 150px 60px; }

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.review-card {
    margin: 0;
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .3s ease, box-shadow .3s ease;
}

.review-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(10, 10, 10, .08); }
.review-stars { color: #F5A623; letter-spacing: 3px; margin-bottom: 14px; }
.review-card blockquote { margin: 0 0 18px; font-size: .98rem; line-height: 1.7; color: #2c3038; }
.review-card figcaption { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; color: var(--gray); }
.review-card figcaption strong { color: var(--black); font-size: .95rem; }

/* ---------------- Форма заявки ---------------- */

.lead-section {
    padding: 130px 60px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: var(--white);
}

.lead-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.lead-text h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 16px; }
.lead-text p { font-size: 1.05rem; line-height: 1.7; opacity: .82; margin: 0; }

.lead-form {
    padding: 32px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 22px;
    backdrop-filter: blur(10px);
}

.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.lf-field { display: block; margin-bottom: 16px; }
.lf-field > span { display: block; margin-bottom: 7px; font-size: .85rem; font-weight: 600; opacity: .85; }

.lf-field input,
.lf-field textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    color: var(--white);
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .2s ease, background .2s ease;
}

.lf-field input::placeholder,
.lf-field textarea::placeholder { color: rgba(255, 255, 255, .45); }

.lf-field input:focus,
.lf-field textarea:focus {
    outline: none;
    border-color: var(--red);
    background: rgba(255, 255, 255, .16);
}

.lead-form .form-submit {
    width: 100%;
    padding: 17px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

.lead-form .form-submit:hover { background: var(--red-dark); transform: translateY(-2px); }
.lead-form .form-submit[disabled] { opacity: .6; cursor: wait; transform: none; }

.lf-note { margin: 14px 0 0; font-size: .78rem; opacity: .6; line-height: 1.5; }
.lf-status { margin-top: 14px; font-size: .92rem; font-weight: 600; min-height: 20px; }
.lf-status.ok { color: #6EE7A8; }
.lf-status.err { color: #FFA0A0; }

.hp-field { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 0 !important; }

/* ---------------- Перелинковка ---------------- */

.related-section { padding: 150px 60px; }
.related-block + .related-block { margin-top: 60px; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-card {
    display: block;
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--red);
    box-shadow: 0 22px 44px rgba(10, 10, 10, .1);
}

.related-card h2,
.related-card h3 {
    font-size: 1.08rem;
    margin: 0 0 10px;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
}

.related-card p { margin: 0 0 12px; font-size: .92rem; color: var(--gray); line-height: 1.6; }
.rc-price { font-weight: 700; color: var(--red); font-size: .92rem; }

/* ---------------- Блог ---------------- */

.blog-header {
    padding: 70px 60px 30px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.blog-header h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 18px; }
.blog-header p { font-size: 1.05rem; line-height: 1.7; color: var(--gray); margin: 0; }

.blog-featured { padding: 20px 60px; }

.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .3s ease, transform .3s ease;
}

.featured-card:hover { transform: translateY(-4px); box-shadow: 0 26px 55px rgba(10, 10, 10, .12); }
body.inner-page .featured-card img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.featured-body { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; justify-content: center; }

.featured-body .badge {
    display: inline-block;
    align-self: flex-start;
    padding: 6px 14px;
    margin-bottom: 16px;
    background: rgba(196, 30, 58, .1);
    color: var(--red);
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.featured-body h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 0 0 14px; }
.featured-body p { color: var(--gray); line-height: 1.7; margin: 0 0 18px; }
.read-more { color: var(--red); font-weight: 700; font-size: .95rem; }

.blog-grid-section { padding: 60px 60px 150px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.blog-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(10, 10, 10, .1); }
.blog-card a { text-decoration: none; display: block; height: 100%; }
body.inner-page .blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 24px; }

.blog-card-meta {
    display: flex;
    gap: 14px;
    font-size: .8rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.blog-card h2 { font-size: 1.12rem; margin: 0 0 10px; line-height: 1.4; }
.blog-card p { margin: 0; font-size: .92rem; color: var(--gray); line-height: 1.65; }

.empty-note { color: var(--gray); text-align: center; grid-column: 1 / -1; padding: 40px 0; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 46px;
    font-weight: 600;
}

.pagination a {
    padding: 11px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 100px;
    text-decoration: none;
    transition: all .25s ease;
}

.pagination a:hover { background: var(--red); color: var(--white); border-color: var(--red); }

/* ---------------- Статья ---------------- */

.article-header { max-width: 820px; margin: 0 auto 30px; text-align: center; }
.article-header h1 { font-size: clamp(1.8rem, 3.6vw, 3rem); margin: 0 0 18px; }

.article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: .85rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.article-lead { font-size: 1.12rem; line-height: 1.75; color: #40454d; margin: 0; }

.article-cover { margin: 0 auto 40px; max-width: 1000px; }
.article-cover img { width: 100%; border-radius: 24px; object-fit: cover; }

/* ---------------- Подвал: один в один с главной ---------------- */

.page-footer {
    padding: 80px 60px 40px;
    background: var(--black);
    color: var(--white);
}

.page-footer .footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-footer .footer-brand .logo {
    display: flex;
    align-items: center;
    width: 150px;
    height: 50px;
    overflow: hidden;
}

.page-footer .footer-brand .logo img {
    height: 176px;
    width: 130%;
    max-width: none;
}

.page-footer .footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 20px;
    max-width: 300px;
}

.page-footer .footer-links h4 {
    color: var(--white);
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.page-footer .footer-links ul { list-style: none; margin: 0; padding: 0; }
.page-footer .footer-links li { margin-bottom: 15px; }

.page-footer .footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.page-footer .footer-links a:hover { color: var(--red); }

.page-footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
}

.page-footer .footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    margin: 0;
}

.page-footer .social-links { display: flex; gap: 15px; }

.page-footer .social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-footer .social-links a:hover { background: var(--red); transform: translateY(-3px); }
.page-footer .social-links svg { width: 20px; height: 20px; fill: var(--white); }

/* ---------------- Плавающие кнопки связи ---------------- */

.quick-contact {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qc-btn {
    display: flex;
    align-items: center;
    gap: 0;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 100px;
    color: var(--white);
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(10, 10, 10, .22);
    overflow: hidden;
    transition: width .3s ease, gap .3s ease, transform .25s ease;
}

.qc-btn svg { width: 24px; height: 24px; flex: 0 0 24px; margin: 0 14px; }
.qc-btn span { font-size: .9rem; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .2s ease; }

.qc-btn:hover { width: 172px; transform: translateY(-2px); }
.qc-btn:hover span { opacity: 1; }

.qc-wa { background: #25D366; }
.qc-tg { background: #29A0DA; }
.qc-call { background: var(--red); }

/* ---------------- Страницы ошибок ---------------- */

.error-page { padding: 150px 60px; text-align: center; }

.error-code {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    margin-bottom: 10px;
}

.error-page h1 { font-size: clamp(1.5rem, 3vw, 2.4rem); margin: 0 0 16px; }
.error-page p { color: var(--gray); font-size: 1.05rem; margin: 0 0 32px; }
.error-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-bottom: 50px; }
.error-grid { text-align: left; }

/* ---------------- Адаптив ---------------- */

@media (max-width: 1200px) {
    .catalog-grid { grid-template-columns: repeat(3, 1fr); }
    .blog-grid,
    .related-grid,
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .catalog-grid { grid-template-columns: repeat(2, 1fr); }
    .landing-hero-inner,
    .lead-inner,
    .featured-card { grid-template-columns: 1fr; }
    .page-footer .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
    .landing-hero-image { order: -1; }
}

@media (max-width: 992px) {
    .page-nav { padding: 12px 20px; }
    .breadcrumbs { padding: 20px 20px 0; }
}

@media (max-width: 768px) {
    .landing-hero,
    .landing-content,
    .article-page,
    .faq-section,
    .reviews-section,
    .lead-section,
    .related-section,
    .related-products,
    .blog-header,
    .blog-featured,
    .blog-grid-section,
    .catalog-header,
    .catalog-grid-section,
    .product-page,
    .error-page { padding-left: 20px; padding-right: 20px; }

    .landing-content,
    .article-page,
    .faq-section,
    .reviews-section,
    .lead-section,
    .related-section,
    .related-products,
    .blog-grid-section,
    .catalog-grid-section,
    .product-page,
    .error-page { padding-top: 80px; padding-bottom: 80px; }

    .breadcrumbs { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 860px) {
    .page-nav .nav-links {
        position: fixed;
        inset: 90px 0 auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 20px 60px 30px;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
        transform: translateY(-120%);
        transition: transform .35s ease;
    }

    .page-nav .nav-links.active { transform: none; }
    .page-nav .nav-links > li { width: 100%; padding: 10px 0; }
    .page-nav .has-drop .drop {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 6px 0 0 12px;
        min-width: 0;
    }

    .page-nav .menu-toggle { display: flex; }
    .nav-phone, .page-nav .nav-cta { display: none; }
    .lf-row { grid-template-columns: 1fr; }
    .page-footer { padding: 60px 20px 30px; }
    .page-footer .footer-top { grid-template-columns: 1fr; gap: 34px; }
    .page-footer .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .qc-btn:hover { width: 52px; }
    .qc-btn:hover span { opacity: 0; }
}

/* ============================================================
   КАТАЛОГ ПРОДУКЦИИ
   ============================================================ */

.catalog-header {
    padding: 70px 60px 30px;
}

.catalog-header-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.catalog-header h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 16px; }
.catalog-header p { font-size: 1.05rem; line-height: 1.7; color: var(--gray); margin: 0 0 28px; }

.catalog-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 540px;
    margin: 0 auto;
    padding: 6px 6px 6px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(10, 10, 10, .05);
    transition: border-color .25s ease, box-shadow .25s ease;
}

.catalog-search:focus-within { border-color: var(--red); box-shadow: 0 12px 34px rgba(196, 30, 58, .14); }

.catalog-search input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
    font-size: .98rem;
    color: var(--black);
}

.catalog-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

.catalog-search button:hover { background: var(--red-dark); transform: scale(1.05); }
.catalog-search svg { width: 20px; height: 20px; }

/* ---------- Сетка товаров ---------- */

.catalog-grid-section { padding: 60px 60px 150px; }

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

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .35s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(196, 30, 58, .35);
    box-shadow: 0 26px 52px rgba(10, 10, 10, .12);
}

.pc-link { display: block; text-decoration: none; color: inherit; flex: 1; }

/* Фото товаров сняты на белом — фон области делаем белым, чтобы не было рамки.
   Квадрат вместо 4:3: вёдра вертикальные и в квадрате занимают больше места. */
.pc-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

/* Фото продукции — вертикальные вёдра, поэтому вписываем целиком, а не обрезаем.
   Селектор с body обязателен: правило body.inner-page img задаёт height:auto */
body.inner-page .pc-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

body.inner-page .product-card:hover .pc-media img { transform: scale(1.06); }

.pc-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(10, 10, 10, .18);
}

.pc-noimage svg { width: 64px; height: 64px; }

.pc-badges,
.pg-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pc-badge {
    padding: 5px 12px;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--white);
    backdrop-filter: blur(4px);
}

.pc-badge-new { background: var(--blue); }
.pc-badge-hit { background: #E08A00; }
.pc-badge-sale { background: var(--red); }

.pc-body { padding: 22px 22px 16px; }

.pc-body h2,
.pc-body h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
}

.pc-body p { margin: 0 0 12px; font-size: .9rem; line-height: 1.6; color: var(--gray); }

.pc-meta { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--gray); }
.pc-meta b { color: var(--black); font-weight: 600; }

.pc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px 22px;
    border-top: 1px solid var(--line);
    margin-top: auto;
}

.pc-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.pc-price-old { font-size: .85rem; color: var(--gray); text-decoration: line-through; }

.pc-price-now {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--black);
}

.pc-price-unit { font-size: .82rem; color: var(--gray); }
.pc-price-request { font-size: .92rem; font-weight: 600; color: var(--gray); }

/* Селектор с body: иначе общее правило body.inner-page a перебивает цвет текста */
body.inner-page .pc-btn {
    padding: 10px 20px;
    background: var(--black);
    color: var(--white);
    border-radius: 100px;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .25s ease, transform .25s ease;
}

body.inner-page .pc-btn:hover { background: var(--red); color: var(--white); transform: translateY(-2px); }

/* ============================================================
   КАРТОЧКА ТОВАРА
   ============================================================ */

.product-page { padding: 50px 60px 120px; }

.product-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: 0 auto 60px;
    align-items: start;
}

/* ---------- Галерея ---------- */

.pg-main {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
}

body.inner-page .pg-main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }

.pg-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(10, 10, 10, .16);
}

.pg-noimage svg { width: 96px; height: 96px; }

.pg-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pg-thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    padding: 0;
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .25s ease, transform .25s ease;
}

body.inner-page .pg-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; display: block; }
.pg-thumb:hover { transform: translateY(-2px); }
.pg-thumb.active { border-color: var(--red); }

/* ---------- Блок информации ---------- */

.product-info { position: sticky; top: 96px; }

.product-info h1 { font-size: clamp(1.6rem, 3vw, 2.5rem); margin: 0 0 16px; }

.pi-topmeta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    font-size: .88rem;
    color: var(--gray);
}

.pi-availability { font-weight: 700; }
.pi-in_stock { color: #159C57; }
.pi-preorder { color: #E08A00; }
.pi-out_of_stock { color: var(--gray); }
.pi-rating .stars { color: #F5A623; letter-spacing: 2px; }

.pi-lead { font-size: 1.02rem; line-height: 1.7; color: #40454d; margin: 0 0 26px; }

/* ---------- Блок заказа ---------- */

.pi-order {
    position: relative;
    padding: 34px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 22px 55px rgba(10, 10, 10, .09);
    overflow: hidden;
    margin-bottom: 26px;
}

/* Тонкая фирменная полоса сверху — как у карточек на главной */
.pi-order::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--red), var(--blue));
}

.pi-order-glow {
    position: absolute;
    top: -160px;
    right: -140px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(196, 30, 58, .07) 0%, transparent 70%);
    pointer-events: none;
}

.pi-order-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.pi-price { display: flex; flex-direction: column; gap: 6px; }

.pi-price-now {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    font-weight: 800;
    line-height: 1;
    color: var(--red);
}

.pi-price-now small { font-size: 1.1rem; font-weight: 600; color: var(--black); opacity: .55; }

.pi-price-meta { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.pi-price-unit { color: var(--gray); }
.pi-price-old { color: var(--gray); text-decoration: line-through; }

.pi-price-request {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--black);
}

.pi-order-save {
    padding: 8px 16px;
    background: var(--red);
    color: var(--white);
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.pi-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.pi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    min-width: 160px;
    padding: 17px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .98rem;
    text-decoration: none;
    transition: all .3s ease;
}

.pi-btn svg { width: 19px; height: 19px; transition: transform .3s ease; }

body.inner-page .pi-btn-main {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 12px 28px rgba(196, 30, 58, .28);
}

body.inner-page .pi-btn-main:hover {
    background: var(--red-dark);
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(196, 30, 58, .36);
}

body.inner-page .pi-btn-main:hover svg { transform: translateX(4px); }

body.inner-page .pi-btn-ghost {
    background: var(--white);
    border: 2px solid var(--black);
    color: var(--black);
    white-space: nowrap;
}

body.inner-page .pi-btn-ghost:hover {
    background: var(--black);
    color: var(--white);
    transform: translateY(-3px);
}

.pi-messengers {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
    font-size: .86rem;
    color: var(--gray);
}

body.inner-page .pi-msg {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    transition: transform .25s ease, filter .25s ease;
}

body.inner-page .pi-msg:hover { transform: translateY(-2px); filter: brightness(1.08); }
body.inner-page .pi-msg svg { width: 16px; height: 16px; }
body.inner-page .pi-msg-wa { background: #25D366; }
body.inner-page .pi-msg-tg { background: #29A0DA; }

.pi-order-perks {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
}

.pi-order-perks li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    color: #40454d;
}

.pi-order-perks svg { width: 16px; height: 16px; flex: 0 0 16px; color: #159C57; }

body.inner-page .pi-order-doc a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.inner-page .pi-order-doc a:hover { color: var(--red); }


.pi-keyfacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.pi-keyfacts li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    background: var(--white);
}

.pi-keyfacts span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); }
.pi-keyfacts b { font-size: .95rem; }

.pi-advantages { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.pi-advantages li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: .95rem;
    line-height: 1.55;
}

.pi-advantages svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 3px; color: var(--red); }

/* ---------- Вкладки ---------- */

.product-tabs { width: 100%; }

.pt-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 30px;
}

.pt-tab {
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Unbounded', sans-serif;
    font-size: .95rem;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: color .25s ease, border-color .25s ease;
}

.pt-tab:hover { color: var(--black); }
.pt-tab.active { color: var(--black); border-bottom-color: var(--red); }

/* Внутри вкладок содержимое идёт от левого края, а не по центру страницы */
.pt-panel .prose { margin-left: 0; margin-right: 0; max-width: 900px; }

.pt-panel { display: none; }
.pt-panel.active { display: block; animation: ptFade .35s ease; }

@keyframes ptFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.spec-table {
    width: 100%;
    max-width: 820px;
    border-collapse: collapse;
    font-size: .96rem;
}

.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:nth-child(odd) { background: var(--white); }

.spec-table th {
    width: 45%;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    color: var(--gray);
}

.spec-table td { padding: 14px 18px; font-weight: 600; }

.related-products { padding: 40px 60px 150px; }

/* ---------- Адаптив каталога ---------- */

@media (max-width: 1024px) {
    .product-top { grid-template-columns: 1fr; }
    .product-info { position: static; }
}

@media (max-width: 600px) {
    .catalog-grid,
    .blog-grid,
    .related-grid,
    .reviews-grid { grid-template-columns: 1fr; gap: 20px; }
    .pc-footer { flex-direction: column; align-items: stretch; gap: 12px; }
    .pc-btn { text-align: center; }
    .pi-btn { flex: 1 1 100%; }
    .pi-order { padding: 26px 22px; }
    .pi-order-head { flex-direction: column; }
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО ЗАКАЗА
   ============================================================ */

.order-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.order-modal[hidden] { display: none; }

.order-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, .55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .3s ease;
}

.order-modal.is-open .order-modal-overlay { opacity: 1; }

.order-modal-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    background: var(--white);
    border-radius: 26px;
    box-shadow: 0 40px 90px rgba(10, 10, 10, .3);
    transform: translateY(28px) scale(.97);
    opacity: 0;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
}

.order-modal.is-open .order-modal-box { transform: none; opacity: 1; }

.order-modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--red), var(--blue));
    border-radius: 26px 26px 0 0;
}

.order-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border: none;
    border-radius: 50%;
    color: var(--gray);
    cursor: pointer;
    transition: all .25s ease;
}

.order-modal-close svg { width: 18px; height: 18px; }
.order-modal-close:hover { background: var(--red); color: var(--white); transform: rotate(90deg); }

.order-modal-head { margin-bottom: 26px; }

.order-modal-tag {
    display: inline-block;
    padding: 7px 18px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: var(--white);
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.order-modal-head h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.order-modal-product {
    margin: 0 0 10px;
    padding: 10px 16px;
    background: var(--cream);
    border-left: 3px solid var(--red);
    border-radius: 0 10px 10px 0;
    font-weight: 600;
    font-size: .95rem;
}

.order-modal-note { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--gray); }

.order-field { display: block; margin-bottom: 16px; }

.order-field > span {
    display: block;
    margin-bottom: 8px;
    font-size: .86rem;
    font-weight: 600;
    color: #40454d;
}

.order-field > span b { color: var(--red); }

.order-field input,
.order-field textarea {
    width: 100%;
    padding: 15px 18px;
    background: var(--cream);
    border: 1px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: .96rem;
    color: var(--black);
    transition: border-color .2s ease, background .2s ease;
}

.order-field input::placeholder,
.order-field textarea::placeholder { color: #a5a9b0; }

.order-field input:focus,
.order-field textarea:focus {
    outline: none;
    background: var(--white);
    border-color: var(--red);
}

.order-field textarea { resize: vertical; min-height: 88px; }

.order-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 17px;
    margin-top: 6px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(196, 30, 58, .28);
    transition: all .3s ease;
}

.order-submit svg { width: 19px; height: 19px; transition: transform .3s ease; }
.order-submit:hover { background: var(--red-dark); transform: translateY(-2px); }
.order-submit:hover svg { transform: translateX(4px); }
.order-submit[disabled] { opacity: .65; cursor: wait; transform: none; }

.order-privacy {
    margin: 14px 0 0;
    font-size: .78rem;
    line-height: 1.5;
    color: var(--gray);
    text-align: center;
}

.order-form .lf-status { text-align: center; }

/* Кнопка «Заказать» в карточке каталога */
body.inner-page button.pc-btn {
    border: none;
    font-family: inherit;
    cursor: pointer;
}

@media (max-width: 600px) {
    .order-modal { padding: 14px; }
    .order-modal-box { padding: 30px 22px; border-radius: 22px; }
    .order-modal-head h3 { font-size: 1.3rem; }
}
