/* ═══════════════════════════════════════════
   TheChap Global — Main Stylesheet
   Dark Editorial Luxury aesthetic
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ─────────────────────────────── */
:root {
  --bg:         #0d0b08;
  --bg2:        #161310;
  --bg3:        #1e1a15;
  --surface:    #252018;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.13);
  --gold:       #c9963c;
  --gold-lt:    #e4b96a;
  --terracotta: #b5481d;
  --cream:      #f0e8d8;
  --text:       #e8dece;
  --muted:      #8a7d6a;
  --faint:      #4a4035;
  --sans:       'DM Sans', sans-serif;
  --serif:      'Playfair Display', Georgia, serif;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 8px 40px rgba(0,0,0,0.5);
  --ease:       0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html  { scroll-behavior:smooth; }
body  { background:var(--bg); color:var(--text); font-family:var(--sans);
        font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased; }
img   { display:block; max-width:100%; }
a     { color:inherit; text-decoration:none; }
button{ cursor:pointer; border:none; background:none; font-family:inherit; }
ul    { list-style:none; }

/* ── Typography ────────────────────────────── */
h1,h2,h3,h4 { font-family:var(--serif); line-height:1.15; }
h1 { font-size:clamp(2.4rem,6vw,4.8rem); font-weight:900; }
h2 { font-size:clamp(1.8rem,3.5vw,2.8rem); font-weight:700; }
h3 { font-size:1.25rem; font-weight:700; }
.label { font-size:0.7rem; font-weight:500; letter-spacing:0.2em;
         text-transform:uppercase; color:var(--gold); }

/* ── Layout ────────────────────────────────── */
.container { max-width:1280px; margin:0 auto;
             padding:0 clamp(1.2rem,4vw,3rem); }

/* ── Grain overlay ─────────────────────────── */
body::before {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:1000; opacity:.025;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ══════════════ NAVIGATION ══════════════════ */
.nav {
  position:sticky; top:0; z-index:100;
  background:rgba(13,11,8,0.92);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.nav__inner {
  display:flex; align-items:center; justify-content:space-between;
  height:68px; gap:2rem;
}
.nav__logo        { display:flex; flex-direction:column; line-height:1; }
.nav__logo-main   { font-family:var(--serif); font-weight:900; font-size:1.2rem;
                    color:var(--cream); letter-spacing:0.04em; }
.nav__logo-sub    { font-size:0.6rem; letter-spacing:0.22em; text-transform:uppercase;
                    color:var(--gold); margin-top:1px; }
.nav__links       { display:flex; gap:2rem; font-size:0.85rem; font-weight:500;
                    letter-spacing:0.05em; }
.nav__links a     { color:var(--muted); transition:color var(--ease); }
.nav__links a:hover,.nav__links a.active { color:var(--cream); }
.nav__actions     { display:flex; align-items:center; gap:1rem; }
.nav__icon-btn    { position:relative; display:flex; align-items:center;
                    justify-content:center; width:40px; height:40px; border-radius:50%;
                    color:var(--muted); transition:background var(--ease),color var(--ease); }
.nav__icon-btn:hover { background:var(--surface); color:var(--cream); }
.nav__icon-btn svg   { width:20px; height:20px; stroke:currentColor; fill:none;
                       stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.cart-badge { position:absolute; top:4px; right:4px; width:16px; height:16px;
              background:var(--gold); color:var(--bg); font-size:0.6rem; font-weight:700;
              border-radius:50%; display:flex; align-items:center; justify-content:center; }

/* ── Hamburger ── */
.nav__burger { display:none; flex-direction:column; justify-content:center;
               align-items:center; gap:5px; width:40px; height:40px;
               border-radius:50%; color:var(--muted); background:none; border:none; cursor:pointer;
               transition:background var(--ease),color var(--ease); flex-shrink:0; }
.nav__burger:hover { background:var(--surface); color:var(--cream); }
.nav__burger span { display:block; width:20px; height:1.5px; background:currentColor;
                    border-radius:2px; transition:all .3s ease; transform-origin:center; }
.nav__burger.open span:nth-child(1) { transform:translateY(6.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity:0; transform:scaleX(0); }
.nav__burger.open span:nth-child(3) { transform:translateY(-6.5px) rotate(-45deg); }

/* ── Mobile drawer ── */
.nav__drawer { display:none; background:rgba(13,11,8,.98); border-bottom:1px solid var(--border); }
.nav__drawer.open { display:block; }
.nav__drawer-link { display:flex; align-items:center; justify-content:space-between;
                    padding:.9rem 1.5rem; font-size:.9rem; font-weight:500;
                    color:var(--muted); border-bottom:1px solid var(--border);
                    transition:color var(--ease), background var(--ease); }
.nav__drawer-link:last-child { border-bottom:none; }
.nav__drawer-link:hover { color:var(--cream); background:rgba(255,255,255,.03); }
.nav__drawer-link svg { width:14px; height:14px; stroke:currentColor; fill:none;
                        stroke-width:2; stroke-linecap:round; stroke-linejoin:round; opacity:.4; }

/* ══════════════ HERO ════════════════════════ */
.hero { position:relative; overflow:hidden; padding:6rem 0 3.5rem; }
.hero::before {
  content:''; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 30%, rgba(201,150,60,.11) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 80% 60%, rgba(181,72,29,.06) 0%, transparent 60%);
}
.hero__center { position:relative; z-index:1; text-align:center;
                max-width:680px; margin:0 auto; padding:0 1rem; }
.hero__eyebrow{ display:flex; align-items:center; gap:.75rem;
                margin-bottom:1.5rem; justify-content:center; }
.hero__eyebrow-line { width:36px; height:1px; background:var(--gold); }
.hero__title  { color:var(--cream); margin-bottom:1.25rem;
                font-size:clamp(2.4rem,5vw,4rem); line-height:1.15; }
.hero__title em{ font-style:italic; color:var(--gold); }
.hero__desc   { font-size:1.05rem; color:var(--muted); max-width:520px;
                margin:0 auto 2rem; line-height:1.8; }
.hero__cta    { display:inline-flex; }

/* ══════════════ BUTTONS ═════════════════════ */
.btn { display:inline-flex; align-items:center; gap:.5rem; padding:.85rem 1.8rem;
       border-radius:var(--radius); font-family:var(--sans); font-size:.875rem;
       font-weight:500; letter-spacing:.04em; transition:all var(--ease); white-space:nowrap; }
.btn svg { width:18px; height:18px; stroke:currentColor; fill:none;
           stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.btn-primary { background:var(--gold); color:var(--bg); }
.btn-primary:hover { background:var(--gold-lt); transform:translateY(-1px);
                     box-shadow:0 6px 24px rgba(201,150,60,.3); }
.btn-outline { border:1px solid var(--border2); color:var(--text); }
.btn-outline:hover { border-color:var(--gold); color:var(--gold);
                     background:rgba(201,150,60,.05); }

/* ══════════════ MARQUEE BAR ═════════════════ */
.marquee-bar   { border-top:1px solid var(--border); border-bottom:1px solid var(--border);
                 padding:1rem 0; overflow:hidden; background:var(--bg2); }
.marquee-track { display:flex; gap:3rem; animation:marquee 22s linear infinite; width:max-content; }
.marquee-item  { display:flex; align-items:center; gap:.6rem; font-size:.78rem;
                 letter-spacing:.12em; text-transform:uppercase; color:var(--muted); white-space:nowrap; }
.marquee-item span { color:var(--gold); font-size:.9rem; }
@keyframes marquee { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ══════════════ PRODUCTS SECTION ════════════ */
.products-section { padding:5rem 0 6rem; }
.section-header { display:flex; align-items:flex-end; justify-content:space-between;
                  margin-bottom:3rem; gap:2rem; }
.section-header__left  { flex:1; }
.section-header__title { color:var(--cream); margin-top:.5rem; }
.section-header__link  { font-size:.85rem; color:var(--gold); display:flex;
                          align-items:center; gap:.4rem; transition:gap var(--ease); white-space:nowrap; }
.section-header__link:hover { gap:.7rem; }
.section-header__link svg { width:16px; height:16px; stroke:currentColor; fill:none;
                             stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* Category tabs */
.category-tabs { display:flex; gap:.5rem; flex-wrap:nowrap; overflow-x:auto;
                 scrollbar-width:none; -webkit-overflow-scrolling:touch;
                 margin-bottom:2.5rem; padding-bottom:.25rem; }
.category-tabs::-webkit-scrollbar { display:none; }
.category-tab  { flex-shrink:0; padding:.5rem 1.1rem; border-radius:100px; font-size:.8rem;
                 font-weight:500; letter-spacing:.04em; border:1px solid var(--border);
                 color:var(--muted); transition:all var(--ease); }
.category-tab:hover  { border-color:var(--border2); color:var(--text); }
.category-tab.active { background:var(--gold); border-color:var(--gold); color:var(--bg); }

/* Product grid */
.product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.5rem; }

/* Product card */
.product-card { background:var(--bg2); border:1px solid var(--border);
                border-radius:var(--radius-lg); overflow:hidden; cursor:pointer;
                display:flex; flex-direction:column;
                transition:transform var(--ease),border-color var(--ease),box-shadow var(--ease); }
.product-card:hover { transform:translateY(-4px); border-color:var(--border2);
                      box-shadow:0 16px 48px rgba(0,0,0,.4); }

.product-card__image { position:relative; aspect-ratio:4/3; background:var(--surface);
                       overflow:hidden; display:flex; align-items:center; justify-content:center; }
.product-card__image img { width:100%; height:100%; object-fit:cover;
                            transition:transform .6s cubic-bezier(.4,0,.2,1); }
.product-card:hover .product-card__image img { transform:scale(1.05); }

.product-card__placeholder { display:flex; flex-direction:column; align-items:center;
                              justify-content:center; gap:.5rem; color:var(--faint);
                              height:100%; width:100%; }
.product-card__placeholder-icon  { font-size:2.8rem; }
.product-card__placeholder-label { font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; }

.product-card__badge { position:absolute; top:12px; left:12px; padding:.25rem .65rem;
                       border-radius:100px; font-size:.67rem; font-weight:500;
                       letter-spacing:.1em; text-transform:uppercase; }
.badge--bestseller { background:var(--gold); color:var(--bg); }
.badge--new        { background:#4ade80; color:#052e16; }
.badge--sale       { background:var(--terracotta); color:#fff; }

/* Quick add (hover reveal) */
.product-card__quick-add { position:absolute; bottom:12px; left:12px; right:12px;
                            padding:.65rem; background:var(--bg); border:1px solid var(--border2);
                            border-radius:8px; font-size:.8rem; font-weight:500; color:var(--text);
                            letter-spacing:.04em; transform:translateY(6px); opacity:0;
                            transition:all var(--ease); display:flex; align-items:center;
                            justify-content:center; gap:.5rem; }
.product-card__quick-add svg { width:16px; height:16px; stroke:currentColor; fill:none;
                                stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.product-card:hover .product-card__quick-add { opacity:1; transform:translateY(0); }
.product-card__quick-add:hover { background:var(--gold); border-color:var(--gold); color:var(--bg); }

/* Card body */
.product-card__body { padding:1.25rem; display:flex; flex-direction:column; flex:1; }
.product-card__category { font-size:.7rem; letter-spacing:.14em; text-transform:uppercase;
                           color:var(--gold); margin-bottom:.4rem; }
.product-card__name  { font-family:var(--serif); font-size:1.1rem; color:var(--cream);
                        margin-bottom:.5rem; line-height:1.25; }
.product-card__desc  { font-size:.82rem; color:var(--muted); line-height:1.6; flex:1;
                        margin-bottom:1rem; display:-webkit-box;
                        -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.product-card__footer { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.product-card__pricing { display:flex; align-items:baseline; gap:.5rem; }
.product-card__price   { font-family:var(--serif); font-size:1.2rem; font-weight:700; color:var(--cream); }
.product-card__compare { font-size:.82rem; color:var(--faint); text-decoration:line-through; }
.product-card__add-btn { width:38px; height:38px; border-radius:10px; background:var(--surface);
                         border:1px solid var(--border); display:flex; align-items:center;
                         justify-content:center; color:var(--text); transition:all var(--ease); flex-shrink:0; }
.product-card__add-btn:hover { background:var(--gold); border-color:var(--gold); color:var(--bg); }
.product-card__add-btn svg { width:18px; height:18px; stroke:currentColor; fill:none;
                              stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.product-card__stock { font-size:.7rem; color:#f87171; display:flex;
                       align-items:center; gap:.3rem; margin-top:.5rem; }
.product-card__stock::before { content:''; display:inline-block; width:5px; height:5px;
                                border-radius:50%; background:#f87171; }

/* ══════════════ FEATURES BAR ════════════════ */
.features-bar  { background:var(--bg2); border-top:1px solid var(--border);
                 border-bottom:1px solid var(--border); padding:3rem 0; }
.features-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:2rem; }
.feature-item  { display:flex; flex-direction:column; align-items:center;
                 text-align:center; gap:.75rem; }
.feature-icon  { width:48px; height:48px; border-radius:12px;
                 background:rgba(201,150,60,.1); border:1px solid rgba(201,150,60,.2);
                 display:flex; align-items:center; justify-content:center; font-size:1.3rem; }
.feature-title { font-weight:500; font-size:.9rem; color:var(--cream); }
.feature-desc  { font-size:.78rem; color:var(--muted); line-height:1.5; }

/* ══════════════ FOOTER ══════════════════════ */
.footer       { padding:3rem 0 2rem; border-top:1px solid var(--border); }
.footer__inner{ display:flex; align-items:center; justify-content:space-between;
                gap:2rem; flex-wrap:wrap; }
.footer__copy { font-size:.8rem; color:var(--muted); }
.footer__links{ display:flex; gap:1.5rem; }
.footer__links a { font-size:.8rem; color:var(--muted); transition:color var(--ease); }
.footer__links a:hover { color:var(--cream); }

/* ══════════════ FLASH / TOAST ═══════════════ */
.flash { position:fixed; bottom:1.5rem; right:1.5rem; z-index:500; padding:1rem 1.5rem;
         border-radius:var(--radius); font-size:.875rem; font-weight:500;
         display:flex; align-items:center; gap:.6rem; box-shadow:var(--shadow);
         animation:flashIn .4s cubic-bezier(.4,0,.2,1); }
.flash--success { background:#052e16; border:1px solid #4ade80; color:#4ade80; }
.flash--error   { background:#2d0606; border:1px solid #f87171; color:#f87171; }
@keyframes flashIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

/* ══════════════ RESPONSIVE ══════════════════ */

/* Touch devices — quick-add always visible, no hover lift */
@media (hover:none) {
  .product-card__quick-add { opacity:1; transform:translateY(0); }
  .product-card:hover { transform:none; box-shadow:none; }
}

@media (max-width:960px) {
  .features-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:640px) {
  /* Nav */
  .nav__links    { display:none; }
  .nav__burger   { display:flex; }
  .nav__actions  { gap:.25rem; }
  .nav__icon-btn { width:36px; height:36px; }
  .nav__icon-btn svg { width:18px; height:18px; }
  /* Hero */
  .hero { padding-top:5.5rem; padding-bottom:2.5rem; }
  /* Products */
  .products-section { padding:3rem 0 4rem; }
  .section-header   { flex-direction:column; align-items:flex-start; margin-bottom:1.75rem; }
  .product-grid     { grid-template-columns:repeat(2,1fr); gap:.875rem; }
  /* Features */
  .features-grid { grid-template-columns:1fr; }
  /* Toast — full width */
  .flash { left:.75rem; right:.75rem; bottom:.75rem; max-width:none; }
  /* Footer */
  .footer__inner { flex-direction:column; align-items:center; text-align:center; gap:1rem; }
}

@media (max-width:420px) {
  .product-grid { grid-template-columns:1fr; }
  .product-card__name { font-size:1rem; }
  .hero { padding-top:5rem; padding-bottom:2rem; }
}
/* ══════════════ WISHLIST HEART ══════════════ */
.wl-heart {
  position: absolute;
  top: .6rem;
  right: .6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(13,11,8,.7);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), color var(--ease);
  color: var(--muted);
  z-index: 2;
}
.wl-heart svg { width: 14px; height: 14px; }
.wl-heart:hover         { background: rgba(201,150,60,.15); color: var(--gold); transform: scale(1.1); }
.wl-heart--active       { color: #f87171; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.wl-heart--active:hover { background: rgba(248,113,113,.15); }
.wl-heart--lg {
  width: 42px; height: 42px;
}
.wl-heart--lg svg { width: 18px; height: 18px; }
