:root {
    --ink: #181112;
    --muted: #7d716e;
    --border: #e6dcd8;
    --bg: #faf7f4;
    --surface: #ffffff;
    --accent: #6e1524;
    --accent-dark: #4a0e18;
    --accent-soft: #f6e9ea;
    --gold: #b8873f;
    --gold-line: rgba(184, 135, 63, .45);
    --radius-lg: 3px;
    --radius-md: 2px;
    --radius-sm: 2px;
    --shadow-sm: 0 1px 2px rgba(24, 17, 18, .05);
    --shadow-md: 0 6px 24px rgba(24, 17, 18, .10);
    --shadow-lift: 0 10px 32px rgba(24, 17, 18, .14);
}

* { box-sizing: border-box; }

body {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; font-weight: 700; }

a { text-decoration: none; color: inherit; }

.container { max-width: 1180px; }

/* Мелкая деталь фирменного стиля: узкий трекинг-заголовок над крупными
   элементами (hero, секции) — характерный приём люксовых витрин. */
.eyebrow {
    display: block; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem;
    font-weight: 700; color: var(--gold); margin-bottom: 12px;
}

.btn { border-radius: var(--radius-md); font-weight: 600; padding: 12px 22px; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease; }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-dark:hover { background: #000; border-color: #000; box-shadow: var(--shadow-md); }
.btn-lg { padding: 15px 30px; }

/* Заглавные буквы с трекингом — только на смысловых CTA, не на всех кнопках подряд */
.btn-tracked { text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ─── Reveal-on-scroll ─── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ─── Header ─── */

.site-closed-banner {
    background: #b23b3b; color: #fff; text-align: center; padding: 10px; font-size: .9rem;
}

.site-header {
    background: rgba(250,247,244,.94);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0; gap: 24px;
}

.logo { font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; display: flex; align-items: center; gap: 10px; font-family: "Playfair Display", serif; }
.logo .logo-icon { width: 30px; height: 30px; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; position: relative; }
.main-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
    background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 1.1rem; color: var(--ink); position: relative; transition: background-color .15s ease;
}
.icon-btn:hover { background: var(--accent-soft); }

.cart-badge {
    position: absolute; top: 2px; right: 2px; background: var(--accent);
    color: #fff; font-size: .62rem; border-radius: 50%; min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px; font-weight: 700;
}

.menu-toggle {
    display: none; width: 40px; height: 40px; border: none; background: none; font-size: 1.3rem; color: var(--ink);
    border-radius: 50%; align-items: center; justify-content: center;
}
.menu-toggle:hover { background: var(--accent-soft); }

.mobile-nav-drawer {
    display: none; flex-direction: column; padding: 8px 0 16px; border-top: 1px solid var(--border);
}
.mobile-nav-drawer a { padding: 10px 4px; font-weight: 700; color: var(--ink); text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; }
.mobile-nav-drawer.open { display: flex; }

/* ─── Hero ─── */
/* Сдержанный редакторский hero: почти плоский тёмный фон, тонкая золотая
   линия, без градиентных "SaaS"-декораций (точки/сияющие круги). */

.hero-strip {
    position: relative; overflow: hidden;
    background: linear-gradient(155deg, var(--accent-dark) 0%, var(--accent) 100%);
    color: #fff; padding: 76px 0 64px;
}
.hero-strip .container { position: relative; z-index: 1; max-width: 720px; }
.hero-strip .eyebrow { color: var(--gold); }
.hero-strip h1 { font-family: "Playfair Display", serif; font-size: clamp(2.1rem, 4vw, 3.1rem); font-weight: 600; margin-bottom: 18px; line-height: 1.15; }
.hero-strip .gold-rule { width: 64px; height: 1px; background: var(--gold); margin-bottom: 22px; }
.hero-strip p { opacity: .82; margin: 0; font-size: 1.02rem; max-width: 520px; line-height: 1.6; }

/* ─── Trust row (тонкая строка доверия под hero, без "пузырей") ─── */

.trust-badges {
    display: flex; gap: 0; flex-wrap: wrap; margin: 0 0 40px; padding: 20px 0;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.trust-badge {
    display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; padding: 4px 26px 4px 0; border-right: 1px solid var(--border); margin-right: 26px;
}
.trust-badge:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.trust-badge i { color: var(--gold); font-size: .95rem; }

/* ─── Rose-count navigation — тонкие вкладки с подчёркиванием, без заливки ─── */

.rose-nav { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.rose-nav-item {
    padding-bottom: 16px; font-size: .82rem; font-weight: 700; color: var(--muted); letter-spacing: .07em;
    text-transform: uppercase; border-bottom: 1px solid transparent; margin-bottom: -1px; transition: all .15s ease;
}
.rose-nav-item.active, .rose-nav-item:hover { color: var(--ink); border-color: var(--gold); }

.section-title { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.4rem; margin: 8px 0 20px; }

/* ─── Color filter / sort ─── */

.color-filter { display: flex; gap: 22px; flex-wrap: wrap; }
.color-filter a {
    padding-bottom: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
    letter-spacing: .06em; border-bottom: 1px solid transparent; transition: all .15s ease;
}
.color-filter a.active, .color-filter a:hover { color: var(--ink); border-color: var(--gold); }

.sort-select { border-radius: var(--radius-md) !important; border-color: var(--border) !important; font-size: .82rem; }

/* ─── Product grid/card ─── */

.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 32px 26px; margin-bottom: 56px;
}

.product-card {
    background: var(--surface); border: 1px solid transparent; overflow: hidden;
    display: flex; flex-direction: column; transition: border-color .2s ease;
}
.product-card:hover { border-color: var(--border); }

.product-card-img-wrap { position: relative; display: block; aspect-ratio: 4/5; background: #f1e9e6; overflow: hidden; }
.product-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.product-card:hover .product-card-img-wrap img { transform: scale(1.04); }
.product-card-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: #d3c8c2; }

.stock-badge {
    position: absolute; top: 14px; left: 14px; font-weight: 700; border-radius: 0 !important;
    text-transform: uppercase; font-size: .62rem !important; letter-spacing: .05em; padding: 5px 10px !important;
}

/* Тег с количеством роз — текстовая плашка на скриме поверх фото, а не значок-пузырь */
.rose-tag-scrim {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px;
    background: linear-gradient(to top, rgba(24,17,18,.7), transparent);
}
.rose-count-badge {
    color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
}
.rose-count-badge.lg { font-size: .92rem; }

.bestseller-badge {
    position: absolute; top: 14px; right: 14px; color: #fff;
    font-weight: 700; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase;
    border: 1px solid rgba(255,255,255,.6); padding: 5px 10px;
}
.bestseller-badge i { color: var(--gold); font-size: .7rem; }
.bestseller-badge-inline {
    color: var(--gold); border: 1px solid var(--gold-line); font-size: .68rem; letter-spacing: .06em;
    text-transform: uppercase; padding: 4px 9px; margin-left: 10px; font-weight: 700;
}

.product-card-body { padding: 18px 2px 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-card-title { font-weight: 600; font-size: .98rem; line-height: 1.35; color: var(--ink); }
.product-card-unit { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.product-card-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; }
.product-card-price { font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.product-card-price .old-price { display: block; font-weight: 400; color: var(--muted); text-decoration: line-through; font-size: .76rem; }
.product-card-bottom .add-to-cart {
    border-radius: 0; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    padding: 0; border: 1px solid var(--ink); background: transparent; color: var(--ink);
    transition: background-color .15s ease, color .15s ease;
}
.product-card-bottom .add-to-cart:hover { background: var(--ink); color: #fff; }

/* ─── Product page ─── */

.product-page { padding: 40px 0 72px; }
.product-gallery-main { position: relative; aspect-ratio: 4/5; background: #f1e9e6; overflow: hidden; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product-gallery-thumbs img { width: 62px; height: 62px; object-fit: cover; cursor: pointer; border: 1px solid transparent; opacity: .6; transition: all .15s ease; }
.product-gallery-thumbs img.active, .product-gallery-thumbs img:hover { border-color: var(--gold); opacity: 1; }

.product-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.product-eyebrow .eyebrow { display: inline-block; margin-bottom: 0; }
.product-title { font-family: "Playfair Display", serif; font-size: 2.1rem; font-weight: 600; margin-bottom: 8px; line-height: 1.2; }
.product-unit { color: var(--muted); margin-bottom: 20px; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; }
.product-price { font-size: 1.9rem; font-weight: 600; margin-bottom: 22px; letter-spacing: -.01em; }
.product-price .old-price { font-size: 1.05rem; font-weight: 400; color: var(--muted); text-decoration: line-through; margin-right: 12px; }
.product-description { color: #4a4142; margin-bottom: 24px; line-height: 1.65; max-width: 46ch; }

.dual-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.dual-cta .btn { min-width: 210px; border-radius: var(--radius-md); }

.messenger-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.messenger-buttons .btn { border-radius: var(--radius-md); }

/* ─── Cart / checkout ─── */

.cart-page { padding: 40px 0 72px; }
.cart-item {
    display: grid; grid-template-columns: 72px 1fr auto auto auto; align-items: center; gap: 16px;
    padding: 18px 0; border-bottom: 1px solid var(--border);
}
.cart-item-img { width: 72px; height: 90px; object-fit: cover; background: #f1e9e6; }
.cart-item-noimg { display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #d3c8c2; }
.cart-item-info h6 { margin: 0 0 4px; font-size: .95rem; font-weight: 600; }
.cart-item-price { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; }
.cart-item-qty button:hover { border-color: var(--ink); }
.cart-item-qty .qty-input { width: 52px; text-align: center; border: 1px solid var(--border); padding: 4px; }
.cart-item-total { font-weight: 600; }
.cart-remove { border: none; background: none; color: var(--muted); }
.cart-remove:hover { color: var(--accent); }

.checkout-box { background: var(--surface); border: 1px solid var(--border); padding: 26px; position: sticky; top: 90px; }

.empty-cart, .order-success { text-align: center; padding: 72px 0; }
.order-success i { font-size: 2.6rem; color: var(--accent); }

/* ─── Floating cart bar ─── */

.floating-cart-bar {
    position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 120%);
    display: flex; align-items: center; gap: 16px; background: var(--ink); color: #fff;
    padding: 14px 22px; box-shadow: var(--shadow-lift); z-index: 60;
    transition: transform .3s ease;
}
.floating-cart-bar.visible { transform: translate(-50%, 0); }
.floating-cart-bar .fc-total { font-weight: 600; }
.floating-cart-bar a.btn { padding: 7px 18px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; border-radius: 0; }

/* ─── Auth / account ─── */

.auth-page, .account-page { max-width: 480px; padding: 56px 0; }
.account-page { max-width: 720px; }
.auth-form input { margin-bottom: 4px; border-radius: var(--radius-md); }

.order-history-card { background: var(--surface); border: 1px solid var(--border); padding: 20px; margin-bottom: 12px; }

/* ─── Payment result ─── */

.payment-result { padding: 88px 0; }
.payment-result i { font-size: 3rem; margin-bottom: 18px; display: block; }

/* ─── Footer ─── */

.site-footer { background: var(--surface); border-top: 1px solid var(--gold-line); padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.2rem; margin-bottom: 10px; }
.footer-text { color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
.footer-social { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.site-footer h6 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-bottom: 14px; font-weight: 700; }
.site-footer a { display: block; margin-bottom: 8px; font-size: .88rem; color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .76rem; color: var(--muted); }

/* ─── Legal pages (политика/соглашение) ─── */

.legal-page { max-width: 760px; padding: 56px 0 80px; }
.legal-page h1 { font-family: "Playfair Display", serif; font-weight: 600; font-size: 2.1rem; margin-bottom: 32px; }
.legal-page h3 { font-size: 1rem; font-weight: 700; margin: 30px 0 10px; }
.legal-page p { color: var(--muted); font-size: .92rem; line-height: 1.75; margin-bottom: 4px; }

/* ─── Cookie consent ─── */

.cookie-consent {
    position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 70;
    background: var(--ink); color: #fff; padding: 18px 22px; box-shadow: var(--shadow-lift);
    transition: transform .3s ease, opacity .3s ease;
}
.cookie-consent.hide { transform: translateY(20px); opacity: 0; }
.cookie-consent-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; }
.cookie-consent-text { flex: 1; min-width: 240px; font-size: .82rem; color: rgba(255,255,255,.8); line-height: 1.6; }
.cookie-consent-text a { color: var(--gold); text-decoration: underline; }
.cookie-consent-btn {
    background: #fff; color: var(--ink); border: none; padding: 10px 22px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; white-space: nowrap;
}
.cookie-consent-btn:hover { background: var(--gold); color: #fff; }

/* ─── Toast ─── */

.toast-notification {
    position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: #fff;
    padding: 13px 20px; z-index: 999; font-size: .85rem; box-shadow: var(--shadow-lift);
}

/* ─── Admin (функциональный инструмент — оставляем нейтрально-практичным) ─── */

.admin-sidebar { width: 220px; background: #fff; border-right: 1px solid var(--border); min-height: calc(100vh - 56px); }
.admin-sidebar .nav-link { color: var(--ink); padding: 10px 20px; }
.admin-sidebar .nav-link.active, .admin-sidebar .nav-link:hover { background: var(--accent-soft); font-weight: 700; color: var(--accent-dark); }
.admin-content { flex: 1; padding: 24px; }

.admin-login-body { background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.admin-login-box { background: #fff; border: 1px solid var(--border); padding: 32px; width: 360px; box-shadow: var(--shadow-md); }

/* Шапка ломается (перенос логотипа/меню на новую строку) уже на планшетных
   ширинах ~768-900px, поэтому бургер-меню включается раньше брейкпоинта
   основного мобильного layout'а (767px). */
@media (max-width: 899px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }
}

@media (max-width: 767px) {
    .admin-sidebar { width: 100%; min-height: auto; }
    .footer-grid { grid-template-columns: 1fr; }
    .checkout-box { position: static; }
    .dual-cta { flex-direction: column; }
    .dual-cta .btn { min-width: auto; }
    .trust-badges { flex-direction: column; gap: 10px; }
    .trust-badge { border-right: none; margin-right: 0; padding-right: 0; }

    /* 2 карточки в ряд на мобильном — чтобы не листать длинную ленту в один столбец,
       как это сделано в каталоге redmak.store. */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
    .product-card-body { padding: 12px 1px 0; gap: 3px; }
    .product-card-title { font-size: .84rem; }
    .product-card-unit { font-size: .66rem; }
    .product-card-price { font-size: .95rem; }
    .product-card-bottom .add-to-cart { width: 30px; height: 30px; }
    .rose-count-badge { font-size: .68rem; }
    .rose-tag-scrim { padding: 20px 10px 9px; }
    .stock-badge { top: 8px !important; left: 8px !important; font-size: .56rem !important; padding: 4px 8px !important; }
    .bestseller-badge { top: 8px; right: 8px; font-size: .56rem; padding: 4px 8px; }
}
