/* =====================================================================
   flawless — design system
   Palette: пепел от рози (ash of roses) · black · gold. Elegant.
   ===================================================================== */

:root {
  /* core palette */
  --black: #0e0c0d;
  --ink: #161213;
  --surface: #1c1719;
  --surface-2: #241d20;
  --line: #352a2d;

  --ash: #c9a6a2;          /* пепел от рози */
  --ash-soft: #e4cdc9;
  --ash-deep: #a37f7b;
  --rose-glow: rgba(201, 166, 162, 0.18);

  --gold: #c9a24b;
  --gold-bright: #e6c87a;
  --gold-deep: #9d7c33;

  --text: #f3eae8;
  --muted: #b6a6a3;
  --faint: #8b7c79;

  --grad-rosegold: linear-gradient(120deg, #c9a6a2 0%, #e6c87a 55%, #c9a24b 100%);
  --grad-ink: linear-gradient(180deg, #1c1719 0%, #120f10 100%);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.85);
  --shadow-gold: 0 14px 40px -18px rgba(201, 162, 75, 0.45);

  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans: 'Jost', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --container: 1180px;
}

/* =====================================================================
   Втори skin — „Пепел от рози": фон пепел от рози, текст златен,
   останалото (хедър, карти, ленти, бутони) черно.
   Активира се с data-theme="rose" на <html> (бутонът в хедъра).
   ===================================================================== */
html[data-theme="rose"] {
  --black: #6b4b48;        /* основен фон — пепел от рози (дълбок, опушен) */
  --ink: #1b1416;          /* черно — ленти/хедър/футър/инпути */
  --surface: #181113;      /* черно — карти/панели */
  --surface-2: #211719;
  --line: #8a615c;         /* розово-златна линия — видима и на черно, и на розе */

  --ash: #e4cdc9;
  --ash-soft: #f0ddd9;
  --ash-deep: #c9a6a2;
  --rose-glow: rgba(243, 220, 160, 0.12);

  --gold: #d9af56;
  --gold-bright: #f1d896;
  --gold-deep: #b08a3a;

  --text: #f1d896;         /* текст — златно */
  --muted: #dcc794;
  --faint: #bda06f;

  --grad-rosegold: linear-gradient(120deg, #f3dca0 0%, #e6c87a 55%, #c9a24b 100%);
  --grad-ink: linear-gradient(180deg, #1d1517 0%, #120d0e 100%);
}
html[data-theme="rose"] body::before {
  background:
    radial-gradient(60vw 60vw at 80% -10%, rgba(243, 220, 160, 0.10), transparent 60%),
    radial-gradient(50vw 50vw at -10% 100%, rgba(201, 162, 75, 0.10), transparent 60%);
}
html[data-theme="rose"] .site-header { background: rgba(20, 15, 16, 0.84); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; } /* clear the 74px sticky header on #anchor jumps */

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--black);
  color: var(--text);
  line-height: 1.65;
  font-weight: 300;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient rose/gold glow in the background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60vw 60vw at 80% -10%, var(--rose-glow), transparent 60%),
    radial-gradient(50vw 50vw at -10% 100%, rgba(201, 162, 75, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0 0 0.4em; letter-spacing: 0.4px; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(var(--container), 92vw); margin-inline: auto; position: relative; z-index: 1; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.gold-text { color: var(--gold-bright); }
.ash-text { color: var(--ash); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 1rem;
  display: inline-block;
}

.serif-script { font-family: var(--serif); font-style: italic; }

/* divider rule */
.rule { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 2.5rem 0; }
.gold-line { width: 64px; height: 2px; background: var(--grad-rosegold); border: 0; margin: 1.2rem 0; }
.center .gold-line { margin-inline: auto; }

/* =========================== buttons =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font-family: var(--sans); font-size: 0.86rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  padding: 0.95em 2em; border-radius: 100px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.3s ease; white-space: nowrap;
}
.btn-primary {
  background: var(--grad-rosegold); color: #211a10; box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-gold { background: transparent; color: var(--gold-bright); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: #211a10; }
.btn-block { width: 100%; }
.btn-sm { padding: 0.6em 1.2em; font-size: 0.74rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* =========================== header / nav =========================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(14, 12, 13, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: baseline; gap: 0.5rem; }
.brand .logo { font-family: var(--serif); font-size: 1.7rem; letter-spacing: 1px; color: var(--text); }
.brand .logo b { background: var(--grad-rosegold); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.brand .tag { font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--faint); }

.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color 0.25s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px; background: var(--grad-rosegold); transition: width 0.3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 1.1rem; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--text); background: none; border: 0; font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; }
.cart-count {
  position: absolute; top: -10px; right: -12px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--grad-rosegold); color: #211a10; border-radius: 100px; font-size: 0.66rem; font-weight: 600;
  display: grid; place-items: center;
}
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; font-size: 1.5rem; }

/* mobile nav */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  /* compact dropdown card — as wide as the longest label, anchored top-right */
  .nav-links {
    position: fixed; top: 70px; right: 4vw; left: auto;
    width: max-content; min-width: 150px; max-width: 88vw;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--ink); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow); overflow: hidden;
    max-height: 0; opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.open { max-height: 80vh; opacity: 1; transform: none; pointer-events: auto; }
  /* links are <a> inside <li>: block so padding + separators render correctly */
  .nav-links a { display: block; padding: 0.8rem 1.6rem; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a::after { display: none; } /* no animated underline on mobile */
}

/* =========================== hero =========================== */
.hero { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 0.3rem; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 30rem; margin-bottom: 2rem; }
.hero-motto { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--ash); margin-bottom: 1.5rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-art {
  aspect-ratio: 1; border-radius: 28px; position: relative; overflow: hidden;
  background: var(--grad-ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.hero-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, var(--rose-glow), transparent 60%); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 460px; margin-inline: auto; } }

/* =========================== product grid / cards =========================== */
.grid { display: grid; gap: 1.6rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s; position: relative;
}
.card:hover { transform: translateY(-6px); border-color: var(--ash-deep); box-shadow: var(--shadow); }
.card .media { aspect-ratio: 4 / 3; background: var(--grad-ink); display: grid; place-items: center; position: relative; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 1.2rem 1.3rem 1.5rem; }
.card .body h3 { font-size: 1.35rem; margin-bottom: 0.2rem; }
.card .cat { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.card .price { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.6rem 0 1rem; }
.card .price .now { font-size: 1.4rem; font-family: var(--serif); color: var(--gold-bright); }
.card .price .was { color: var(--faint); text-decoration: line-through; font-size: 0.95rem; }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--grad-rosegold); color: #211a10; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 0.35em 0.85em; border-radius: 100px;
}
.badge.sale { background: var(--ink); color: var(--gold-bright); border: 1px solid var(--gold); }
.badge.out { background: var(--ink); color: var(--ash); border: 1px solid var(--line); }

/* =========================== rating stars =========================== */
.stars { color: var(--gold-bright); letter-spacing: 2px; font-size: 0.95rem; }
.stars .off { color: var(--line); }

/* =========================== forms =========================== */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.input, .select, textarea.input {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); padding: 0.85em 1em; font-family: var(--sans); font-size: 0.95rem; transition: border-color 0.25s, box-shadow 0.25s;
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.15); }
textarea.input { resize: vertical; min-height: 110px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

/* =========================== footer =========================== */
.site-footer { border-top: 1px solid var(--line); background: var(--ink); padding: 3.5rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.site-footer a { color: var(--muted); font-size: 0.9rem; display: block; padding: 0.25rem 0; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--faint); font-size: 0.8rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================== scroll-to-top sticky bar =========================== */
.to-top {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(140%);
  z-index: 60; display: inline-flex; align-items: center; gap: 0.6rem;
  background: rgba(28, 23, 25, 0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--gold); color: var(--gold-bright);
  padding: 0.7em 1.4em; border-radius: 100px; cursor: pointer;
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  box-shadow: var(--shadow); transition: transform 0.4s ease, opacity 0.4s; opacity: 0;
}
.to-top.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.to-top:hover { background: var(--gold); color: #211a10; }

/* =========================== cart drawer =========================== */
.cart-drawer-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(8, 6, 7, 0.6); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw); z-index: 95;
  background: var(--ink); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(.4,.0,.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: none; }
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--line); }
.cart-drawer-head h3 { margin: 0; font-size: 1.4rem; }
.cart-drawer-head .close { background: none; border: 0; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.cart-drawer-head .close:hover { color: var(--text); }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.6rem; }
.cart-drawer-foot { padding: 1.4rem 1.6rem; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-line-img { width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { display: flex; flex-direction: column; gap: 0.3rem; }
.cart-line-info .qty { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.cart-line-info .qty button { width: 24px; height: 24px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 6px; cursor: pointer; }
.cart-line-info .qty button:hover { border-color: var(--gold); color: var(--gold-bright); }
.cart-line-price { text-align: right; font-size: 0.92rem; position: relative; }
.cart-line-price .remove { display: block; margin-top: 0.4rem; background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.1rem; margin-left: auto; }
.cart-line-price .remove:hover { color: var(--ash); }

/* =========================== popup modal =========================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 6, 7, 0.7); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 1.5rem; opacity: 0; pointer-events: none; transition: opacity 0.35s;
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2.4rem; position: relative; transform: translateY(14px); transition: transform 0.35s;
  text-align: center;
}
.modal-backdrop.show .modal { transform: none; }
.modal .close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--faint); font-size: 1.4rem; cursor: pointer; }
.modal .close:hover { color: var(--text); }
.modal h3 { font-size: 1.9rem; }

/* =========================== toast =========================== */
.toast-wrap { position: fixed; top: 88px; right: 18px; z-index: 120; display: flex; flex-direction: column; gap: 0.6rem; }
.toast {
  background: var(--surface-2); border: 1px solid var(--gold); color: var(--text);
  padding: 0.85em 1.2em; border-radius: var(--radius-sm); box-shadow: var(--shadow);
  font-size: 0.9rem; min-width: 220px; animation: toastIn 0.3s ease;
}
.toast.err { border-color: #b5564e; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

/* =========================== misc =========================== */
.tag-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35em 0.9em; border: 1px solid var(--line); border-radius: 100px; font-size: 0.78rem; color: var(--muted); }
.tag-chip.active { border-color: var(--gold); color: var(--gold-bright); }
.glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: clamp(1.4rem, 3vw, 2.2rem); }
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap { gap: 1rem; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 1.5rem; }
.mb { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.spin { width: 32px; height: 32px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; color: var(--faint); padding: 3rem 1rem; }

/* editable About / Returns content */
.page-sections { display: grid; gap: 1.4rem; }
.page-section { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.page-section:first-child { border-top: 0; padding-top: 0; }
.page-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.6rem; }
.page-section .rich p { color: var(--muted); margin: 0 0 0.9rem; }
.page-section .rich ul { color: var(--muted); padding-left: 1.2rem; margin: 0 0 0.9rem; }
.page-section .rich li { padding: 0.15rem 0; }

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
