/* ============================================================
   MADLEN — Stylesheet
   #808000 olive · #F7E7CE vanilla · #1B1B1B graphite
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --olive:      #808000;
    --olive-dk:   #666600;
    --olive-bg:   rgba(128,128,0,.07);
    --vanilla:    #F7E7CE;
    --graphite:   #1B1B1B;
    --white:      #fff;
    --g1:         #D9D9D9;
    --g2:         #E8E8E2;
    --g3:         #F5F5F0;
    --border:     #E2E1D9;
    --text:       #1B1B1B;
    --muted:      #767676;
    --r:          5px;
    --sh:         0 1px 4px rgba(0,0,0,.08);
    --sh2:        0 4px 16px rgba(0,0,0,.11);
    --serif:      'Playfair Display', serif;
    --sans:       'Inter', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--g3);
    min-width: 320px;
}
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
img  { display: block; max-width: 100%; height: auto; }
button { font-family: var(--sans); cursor: pointer; }
input, textarea { font-family: var(--sans); }

/* ── Container ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ══════════════════════════════════════════════════════════════
   HEADER  — 52px высота, компактный логотип
   ══════════════════════════════════════════════════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 300;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    height: 52px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 0;
}

/* Левая треть: кнопка каталога */
.header-left { flex: 1; display: flex; align-items: center; }

/* Центр: логотип */
.header-center { display: flex; align-items: center; justify-content: center; }

/* Правая треть: поиск + действия */
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Кнопка «Каталог» */
.catalog-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    padding: 6px 8px;
    border-radius: var(--r);
    transition: background .15s;
    white-space: nowrap;
}
.catalog-btn svg { flex-shrink: 0; }
.catalog-btn:hover { background: var(--g3); }

/* Логотип — mark + text */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--graphite);
    padding: 0 12px;
    white-space: nowrap;
}
/* SVG-овал: 26×29px */
.logo-mark {
    position: relative;
    width: 26px;
    height: 29px;
    flex-shrink: 0;
}
.logo-mark svg  { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-m {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-style: italic;
    font-size: 15px;
    font-weight: 400;
    color: var(--graphite);
    line-height: 1;
    padding-top: 1px;
}
.logo-text {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--graphite);
}

/* Поиск */
.search-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    overflow: hidden;
    transition: border-color .15s;
}
.search-wrap:focus-within { border-color: var(--olive); }
.search-input {
    border: none;
    outline: none;
    padding: 5px 10px;
    font-size: 12.5px;
    width: 140px;
    background: transparent;
    color: var(--text);
}
.search-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    color: var(--muted);
    display: flex;
    align-items: center;
    transition: color .15s;
}
.search-btn:hover { color: var(--olive); }

/* Ссылки в правой части хедера */
.hdr-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    font-size: 12.5px;
    color: var(--text);
    border-radius: var(--r);
    transition: background .15s;
    white-space: nowrap;
}
.hdr-link:hover, .hdr-link.active { background: var(--g3); }

/* Корзина */
.hdr-cart {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: 12.5px;
    color: var(--text);
    transition: border-color .15s;
}
.hdr-cart:hover { border-color: var(--olive); }
.cart-badge {
    min-width: 16px;
    height: 16px;
    background: var(--olive);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ══════════════════════════════════════════════════════════════
   CATALOG PANEL (выдвижная панель)
   ══════════════════════════════════════════════════════════════ */
.catalog-overlay {
    position: fixed; inset: 0;
    background: rgba(27,27,27,.4);
    z-index: 400;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
}
.catalog-overlay.open { opacity: 1; pointer-events: all; }

.catalog-panel {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    background: var(--white);
    z-index: 500;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
}
.catalog-panel.open { transform: translateX(0); }

.catalog-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
}
.catalog-close {
    background: none; border: none;
    width: 28px; height: 28px;
    border-radius: var(--r);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    transition: background .15s;
}
.catalog-close:hover { background: var(--g3); color: var(--text); }

.catalog-nav { flex: 1; padding: 4px 0; }
.cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    font-size: 13.5px;
    color: var(--text);
    border-bottom: 1px solid var(--g2);
    transition: background .15s;
}
.cat-link:hover { background: var(--vanilla); }

.catalog-footer-links {
    padding: 12px 18px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.catalog-footer-links a {
    padding: 7px 0;
    font-size: 13px;
    color: var(--muted);
    transition: color .15s;
}
.catalog-footer-links a:hover { color: var(--olive); }
.contact-link {
    display: flex; align-items: center; gap: 5px;
    color: var(--olive) !important;
    font-weight: 500;
    margin-top: 6px;
}

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero { background: var(--white); }
.hero-inner {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 44px 20px 52px;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-content { flex: 1; min-width: 0; }
.hero h1 {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.22;
    color: var(--graphite);
    margin-bottom: 12px;
}
.hero p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 380px;
}
.hero-img {
    flex: 1;
    min-width: 0;
    height: 260px;
    background: var(--vanilla);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 56px;
    opacity: .7;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 500;
    border: none;
    border-radius: var(--r);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.btn-olive   { background: var(--olive); color: var(--white); }
.btn-olive:hover { background: var(--olive-dk); }
.btn-outline { background: transparent; color: var(--olive); border: 1.5px solid var(--olive); }
.btn-outline:hover { background: var(--olive); color: var(--white); }
.btn-ghost   { background: var(--g3); color: var(--text); }
.btn-ghost:hover { background: var(--g2); }
.btn-vanilla { background: var(--vanilla); color: var(--olive); }
.btn-vanilla:hover { background: #e8d4b0; }
.btn-lg { padding: 11px 26px; font-size: 14px; }

/* ══════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════ */
.section { padding: 28px 0; }
.section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.section-tag {
    background: var(--olive);
    color: var(--white);
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: .8px;
    text-transform: uppercase;
}
.section-title { font-size: 18px; font-weight: 600; color: var(--graphite); }
.section-title-alone { margin-bottom: 16px; }

/* ══════════════════════════════════════════════════════════════
   PRODUCT GRID
   ══════════════════════════════════════════════════════════════ */
.products-grid   { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.products-grid-4 { grid-template-columns: repeat(4,1fr); }

/* ── Product card ──────────────────────────────────────────── */
.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--sh);
    transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: var(--sh2); transform: translateY(-2px); }

/* Изображение карточки — фиксированная пропорция */
.product-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;      /* соотношение сторон вместо фиксированной высоты */
    background: var(--g3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }

.product-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: var(--olive);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.product-body {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.product-name {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    flex: 1;
}
.product-name a { color: var(--text); }
.product-name a:hover { color: var(--olive); }
.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.product-price { font-size: 13px; font-weight: 700; color: var(--graphite); white-space: nowrap; }
.product-actions { display: flex; align-items: center; gap: 3px; }

.btn-cart-sm {
    background: var(--olive); color: var(--white);
    border: none; border-radius: 3px;
    font-size: 10px; font-weight: 500;
    padding: 4px 7px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.btn-cart-sm:hover { background: var(--olive-dk); }

.btn-add {
    background: var(--olive); color: var(--white);
    border: none; border-radius: 3px;
    width: 24px; height: 24px;
    font-size: 16px; font-weight: 300;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background .15s;
    line-height: 1;
}
.btn-add:hover { background: var(--olive-dk); }

/* ══════════════════════════════════════════════════════════════
   FEATURED CARD
   ══════════════════════════════════════════════════════════════ */
.featured-card {
    background: var(--vanilla);
    border-radius: var(--r);
    height: 150px;
    display: flex;
    align-items: flex-end;
    padding: 16px 20px;
    box-shadow: var(--sh);
    overflow: hidden;
}
.featured-card-label {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--graphite);
}

/* ══════════════════════════════════════════════════════════════
   PROMO BLOCKS
   ══════════════════════════════════════════════════════════════ */
.promo-tall {
    background: var(--vanilla);
    border-radius: var(--r);
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--sh);
}
.promo-tall-label {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--graphite);
    display: block;
    margin-bottom: 10px;
}

.text-banner {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 40px;
    text-align: center;
    box-shadow: var(--sh);
}
.text-banner-quote {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    font-style: italic;
    color: var(--muted);
    line-height: 1.55;
}

.constructor-promo {
    background: var(--olive);
    border-radius: var(--r);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--white);
}
.constructor-promo-text h2 {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}
.constructor-promo-text p { font-size: 13.5px; opacity: .85; max-width: 340px; }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer { background: var(--olive); color: rgba(255,255,255,.7); margin-top: 40px; }

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 20px 28px;
    gap: 24px;
    border-bottom: 1px solid rgba(255,255,255,.13);
}

.footer-contact p { font-size: 13px; line-height: 2; }
.footer-contact a { color: rgba(255,255,255,.7); transition: color .15s; }
.footer-contact a:hover { color: var(--white); }
.footer-contact-right { text-align: right; }

/* Логотип в футере — 48×53px */
.footer-logo { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.footer-logo-mark { position: relative; width: 48px; height: 53px; flex-shrink: 0; }
.footer-logo-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer-logo-m {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif);
    font-style: italic; font-size: 28px; font-weight: 400;
    color: rgba(255,255,255,.85); line-height: 1; padding-top: 3px;
}
.footer-logo-name {
    font-family: var(--serif);
    font-size: 18px; font-weight: 700;
    color: var(--white); letter-spacing: 4px; line-height: 1;
}
.footer-logo-tagline {
    font-family: var(--serif);
    font-size: 10px; font-style: italic;
    color: rgba(255,255,255,.5);
}

.footer-bottom {
    max-width: 1200px; margin: 0 auto;
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    font-size: 11px; color: rgba(255,255,255,.32);
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: rgba(255,255,255,.32); transition: color .15s; }
.footer-legal a:hover { color: rgba(255,255,255,.6); }

/* ══════════════════════════════════════════════════════════════
   PAGE HEADER (хлебные крошки)
   ══════════════════════════════════════════════════════════════ */
.page-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 18px 0 14px;
}
.page-header h1 {
    font-family: var(--serif);
    font-size: 22px; font-weight: 700;
    color: var(--graphite); margin-bottom: 4px;
}
.breadcrumb {
    display: flex; align-items: center; gap: 5px;
    font-size: 11.5px; color: var(--muted);
}
.breadcrumb a { color: var(--muted); transition: color .15s; }
.breadcrumb a:hover { color: var(--olive); }
.breadcrumb .sep { color: var(--g1); }

/* ══════════════════════════════════════════════════════════════
   CATALOG PAGE
   ══════════════════════════════════════════════════════════════ */
.catalog-layout {
    display: flex;
    gap: 20px;
    padding: 24px 0 40px;
    align-items: flex-start;
}
.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh);
}
.sidebar-title {
    padding: 12px 14px;
    font-size: 11px; font-weight: 700;
    letter-spacing: .6px; text-transform: uppercase;
    color: var(--muted); border-bottom: 1px solid var(--border);
}
.sidebar-cat {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    font-size: 13px; color: var(--text);
    border-bottom: 1px solid var(--g2);
    transition: background .15s;
}
.sidebar-cat:hover { background: var(--vanilla); }
.sidebar-cat.active { font-weight: 600; color: var(--olive); background: var(--vanilla); }

.catalog-products { flex: 1; min-width: 0; }
.catalog-products .products-grid { grid-template-columns: repeat(4,1fr); }

/* ══════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ══════════════════════════════════════════════════════════════ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    padding: 24px 0 40px;
    align-items: start;
}
.product-gallery {
    border-radius: var(--r);
    overflow: hidden;
    background: var(--g3);
}
.gallery-main {
    height: 320px;
    display: flex; align-items: center; justify-content: center;
    background: var(--vanilla);
    font-size: 64px;
    overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 6px; padding: 8px; background: var(--white); }
.thumb {
    width: 52px; height: 52px;
    background: var(--vanilla); border-radius: 3px;
    border: 2px solid transparent; cursor: pointer;
    transition: border-color .15s;
}
.thumb.active { border-color: var(--olive); }

.product-info { display: flex; flex-direction: column; }
.product-info-name {
    font-family: var(--serif);
    font-size: 22px; font-weight: 700;
    color: var(--graphite); margin-bottom: 8px;
}
.product-info-price {
    font-size: 24px; font-weight: 700;
    color: var(--olive); margin-bottom: 18px;
}
.product-info-desc {
    font-size: 13.5px; color: var(--muted);
    line-height: 1.7; margin-bottom: 20px;
}
.product-add-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qty-control {
    display: flex; align-items: center;
    border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.qty-btn {
    width: 32px; height: 38px;
    background: none; border: none;
    font-size: 16px; font-weight: 300; cursor: pointer;
    transition: background .15s;
}
.qty-btn:hover { background: var(--g3); }
.qty-val { width: 36px; text-align: center; font-size: 13.5px; font-weight: 600; }
.btn-add-cart { flex: 1; justify-content: center; }
.product-meta { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.meta-row {
    display: flex; padding: 7px 0;
    border-bottom: 1px solid var(--g2);
    font-size: 13px;
}
.meta-key { color: var(--muted); width: 120px; flex-shrink: 0; }
.meta-val { font-weight: 500; }
.product-section { padding: 0 0 36px; }
.product-section h2 {
    font-family: var(--serif); font-size: 18px; font-weight: 700;
    margin-bottom: 14px;
}
.product-desc p { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin-bottom: 10px; }

/* ══════════════════════════════════════════════════════════════
   CONSTRUCTOR
   ══════════════════════════════════════════════════════════════ */
.constructor-page { padding: 24px 0 40px; }
.constructor-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.constructor-steps { background: var(--white); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.step { border-bottom: 1px solid var(--border); }
.step-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; cursor: pointer;
    transition: background .15s;
}
.step-head:hover { background: var(--g3); }
.step-num {
    width: 24px; height: 24px;
    background: var(--olive); color: var(--white);
    border-radius: 50%; flex-shrink: 0;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.step.done .step-num { background: #3AB04A; }
.step-title { font-size: 13.5px; font-weight: 600; }
.step-body { padding: 0 16px 16px; display: none; }
.step.open .step-body { display: block; }
.step-options { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 12px; }
.opt-btn {
    padding: 7px 14px; border-radius: var(--r);
    border: 1.5px solid var(--border);
    background: var(--white); font-size: 12.5px;
    cursor: pointer; transition: all .15s;
}
.opt-btn:hover, .opt-btn.selected {
    border-color: var(--olive);
    background: var(--olive-bg);
    color: var(--olive); font-weight: 600;
}
.color-opts { display: flex; gap: 8px; padding-top: 12px; flex-wrap: wrap; }
.color-swatch {
    width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid transparent; cursor: pointer;
    transition: transform .15s, border-color .15s;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: var(--graphite); }
.weight-input { display: flex; align-items: center; gap: 7px; padding-top: 12px; }
.weight-input input {
    width: 72px; padding: 7px 10px;
    border: 1.5px solid var(--border); border-radius: var(--r);
    font-size: 13px; outline: none;
}
.weight-input input:focus { border-color: var(--olive); }
.text-input { padding-top: 12px; }
.text-input input {
    width: 100%; padding: 8px 12px;
    border: 1.5px solid var(--border); border-radius: var(--r);
    font-size: 13px; outline: none;
}
.text-input input:focus { border-color: var(--olive); }
.constructor-summary { background: var(--white); border-radius: var(--r); box-shadow: var(--sh); padding: 20px; }
.summary-title { font-family: var(--serif); font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.summary-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; border-bottom: 1px solid var(--g2); font-size: 12.5px;
}
.summary-row .key { color: var(--muted); }
.summary-total {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; margin-top: 6px; border-top: 2px solid var(--border);
}
.summary-total .label { font-size: 14px; font-weight: 600; }
.summary-total .price { font-size: 20px; font-weight: 700; color: var(--olive); }

/* ══════════════════════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════════════════════ */
.auth-page {
    min-height: calc(100vh - 120px);
    display: flex; align-items: center; justify-content: center;
    padding: 32px 20px;
}
.auth-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--sh2);
    width: 100%; max-width: 380px;
    padding: 28px 32px;
}
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.auth-tab {
    flex: 1; padding: 8px; text-align: center;
    font-size: 13.5px; font-weight: 500;
    border: none; background: none;
    border-bottom: 2px solid transparent;
    color: var(--muted); cursor: pointer;
    transition: color .15s; margin-bottom: -1px;
}
.auth-tab.active { border-color: var(--olive); color: var(--olive); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 500;
    color: var(--muted); margin-bottom: 5px;
}
.form-group input {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid var(--border); border-radius: var(--r);
    font-size: 13.5px; outline: none; transition: border-color .15s;
}
.form-group input:focus { border-color: var(--olive); }
.form-hint { font-size: 11px; color: var(--muted); margin-top: 3px; }
.auth-btn { width: 100%; justify-content: center; margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════
   ADDRESS
   ══════════════════════════════════════════════════════════════ */
.address-page { padding: 24px 0 40px; }
.address-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.address-info {
    background: var(--white); border-radius: var(--r);
    padding: 20px; box-shadow: var(--sh);
    height: fit-content;
}
.address-info h2 {
    font-family: var(--serif); font-size: 17px; font-weight: 700;
    margin-bottom: 16px;
}
.info-block { margin-bottom: 16px; }
.info-block h3 {
    font-size: 10.5px; font-weight: 700; letter-spacing: .7px;
    text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.info-block p { font-size: 13.5px; line-height: 1.75; }
.info-block a { color: var(--olive); }
.map-placeholder {
    background: var(--g2); border-radius: var(--r);
    height: 360px; box-shadow: var(--sh);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════
   CHECKOUT
   ══════════════════════════════════════════════════════════════ */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 24px; padding: 28px 0 48px; align-items: start; }
.checkout-section-title { font-family: var(--serif); font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.order-card { background: var(--white); border-radius: var(--r); border: 1px solid var(--border); padding: 16px; margin-bottom: 12px; }
.order-card-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.order-meta-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--g2); color: var(--muted); }
.order-meta-row:last-child { border-bottom: none; }
.order-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 4px; font-weight: 700; font-size: 15px; }
.order-item-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--g2); gap: 10px; }
.order-item-row:last-child { border-bottom: none; }
.order-item-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-size: 13px; }
.order-item-img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.order-item-img-empty { width: 44px; height: 44px; background: var(--g3); border-radius: 4px; flex-shrink: 0; }
.order-item-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.order-item-qty { font-size: 12.5px; color: var(--muted); }
.order-item-price { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.checkout-form-wrap { background: var(--white); border-radius: var(--r); border: 1px solid var(--border); padding: 20px 24px; }
.checkout-form { display: flex; flex-direction: column; gap: 14px; }
.radio-group { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.radio-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.radio-label input { accent-color: var(--olive); }

/* ── Success page ── */
.success-page { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--white); }
.success-card { text-align: center; max-width: 440px; }
.success-icon { width: 64px; height: 64px; background: var(--olive); color: #fff; border-radius: 50%; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.success-title { font-family: var(--serif); font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.success-text { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 900px) {
    .checkout-layout { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   404 ERROR PAGE
   ══════════════════════════════════════════════════════════════ */
.error-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 60px 20px;
}
.error-content {
    text-align: center;
    max-width: 400px;
}
.error-oops {
    font-family: var(--serif);
    font-style: italic;
    font-size: 28px;
    color: var(--muted);
    margin-bottom: 4px;
}
.error-title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--graphite);
    margin-bottom: 10px;
}
.error-code {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}
.error-btn {
    min-width: 140px;
    justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE  (mobile-first breakpoints)
   ══════════════════════════════════════════════════════════════ */

/* ≥ 1200px — полный десктоп, ничего не меняем */

/* < 1024px — 3 колонки товаров */
@media (max-width: 1024px) {
    .products-grid              { grid-template-columns: repeat(3,1fr); }
    .catalog-products .products-grid { grid-template-columns: repeat(3,1fr); }
    .constructor-layout         { grid-template-columns: 1fr 280px; }
}

/* < 900px — сжатие двухколоночных раскладок */
@media (max-width: 900px) {
    .hero-inner                 { flex-direction: column; gap: 24px; text-align: center; }
    .hero p                     { margin: 0 auto 24px; }
    .hero-img                   { width: 100%; max-width: 440px; height: 200px; font-size: 44px; }
    .product-detail             { grid-template-columns: 1fr; }
    .constructor-layout         { grid-template-columns: 1fr; }
    .address-layout             { grid-template-columns: 1fr; }
    .footer-top                 { flex-direction: column; align-items: center; text-align: center; }
    .footer-contact-right       { text-align: center; }
    .constructor-promo          { flex-direction: column; text-align: center; }
}

/* < 768px — мобильный хедер */
@media (max-width: 768px) {
    .search-wrap                { display: none; }
    .hdr-link span              { display: none; }
    .logo-text                  { font-size: 15px; letter-spacing: 2px; }
    .products-grid,
    .products-grid-4            { grid-template-columns: repeat(2,1fr); gap: 8px; }
    .catalog-layout             { flex-direction: column; }
    .sidebar                    { width: 100%; }
    .text-banner                { padding: 20px 24px; }
    .text-banner-quote          { font-size: 15px; }
    .footer-bottom              { flex-direction: column; align-items: center; }
    .footer-legal               { flex-direction: column; align-items: center; gap: 4px; }
}

/* < 600px — мелкий телефон */
@media (max-width: 600px) {
    .container                  { padding: 0 12px; }
    .header-inner               { padding: 0 12px; }
    .hero h1                    { font-size: 24px; }
    .hero-inner                 { padding: 28px 12px 36px; }
    .section                    { padding: 18px 0; }
    .constructor-promo          { padding: 20px 18px; }
    .auth-card                  { padding: 22px 18px; }
    .footer-top                 { padding: 24px 12px 20px; }
    .products-grid,
    .products-grid-4            { grid-template-columns: repeat(2,1fr); gap: 6px; }
}
