/* ===========================================================
   SquadScored — Luxury Marketplace
   Shared stylesheet: tokens, layout, components
   =========================================================== */

:root {
  /* Palette */
  --navy:        #0A0F2C;
  --navy-2:      #111733;
  --navy-3:      #1a2147;
  --gold:        #D4A853;
  --gold-soft:   #e6c178;
  --coral:       #FF5F4B;
  --ivory:       #FAF7F2;
  --teal:        #1A6B5A;
  --teal-soft:   #2a8e78;
  --blush:       #E8A5A0;
  --platinum:    #C8D4E0;
  --platinum-dim: rgba(200, 212, 224, 0.55);

  /* Surfaces */
  --glass:        rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(212, 168, 83, 0.22);
  --line:         rgba(200, 212, 224, 0.12);

  /* Type */
  --f-display: "Playfair Display", Georgia, serif;
  --f-sub:     "Cormorant Garamond", Georgia, serif;
  --f-body:    "DM Sans", system-ui, sans-serif;
  --f-num:     "Bebas Neue", "DM Sans", sans-serif;

  /* Shape */
  --r-card: 16px;
  --r-pill: 50px;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.45);

  --header-h: 122px;
}

/* ---------------- Base ---------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ivory);
  background: var(--navy);
  background-image:
    radial-gradient(1200px 800px at 12% -8%, rgba(26, 107, 90, 0.20), transparent 55%),
    radial-gradient(1000px 700px at 92% 4%, rgba(91, 60, 140, 0.22), transparent 55%),
    radial-gradient(900px 900px at 50% 120%, rgba(212, 168, 83, 0.08), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* Custom gold scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--navy-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold), #8c6f33);
  border-radius: 20px;
  border: 2px solid var(--navy-2);
}
::selection { background: var(--gold); color: var(--navy); }

.container-x { width: min(1320px, 92vw); margin-inline: auto; }

/* ---------------- Typo helpers ---------------- */
.display { font-family: var(--f-display); font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.sub     { font-family: var(--f-sub); font-weight: 500; }
.num     { font-family: var(--f-num); letter-spacing: .02em; }
.eyebrow {
  font-family: var(--f-body); text-transform: uppercase; letter-spacing: .32em;
  font-size: .72rem; font-weight: 600; color: var(--gold);
}
.text-gold { color: var(--gold); }
.text-coral { color: var(--coral); }
.muted { color: var(--platinum-dim); }

/* Section heading w/ decorative gold rule */
.sec-head { margin-bottom: 2.4rem; }
.sec-head .eyebrow { display: block; margin-bottom: .7rem; }
.sec-head h2 {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 3rem); margin: 0; line-height: 1.05;
}
.sec-head h2::after {
  content: ""; display: block; width: 78px; height: 3px; margin-top: 1rem;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}
.sec-head.center { text-align: center; }
.sec-head.center h2::after { margin-inline: auto; }

section.block { padding: clamp(3.5rem, 7vw, 6.5rem) 0; position: relative; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--f-body); font-weight: 600; font-size: .92rem;
  padding: .85rem 1.8rem; border-radius: var(--r-pill);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap; letter-spacing: .02em; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy); box-shadow: 0 8px 26px rgba(212, 168, 83, 0.32);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(212, 168, 83, 0.45); }
.btn-coral {
  background: transparent; color: var(--coral);
  border: 1.5px solid var(--coral);
}
.btn-coral:hover { background: var(--coral); color: #fff; transform: translateY(-3px); }
.btn-ghost {
  background: var(--glass); color: var(--ivory);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 2.4rem; font-size: 1rem; }

/* ---------------- Badges ---------------- */
.badge-x {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--f-body); font-weight: 700; font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .34rem .7rem; border-radius: 6px; line-height: 1;
}
.badge-sale { background: var(--coral); color: #fff; }
.badge-new  { background: var(--teal); color: var(--ivory); }
.badge-best { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: var(--navy); }

/* Glass card */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Grain overlay utility */
.grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* =================================================================
   HEADER
   ================================================================= */
.topbar {
  background: linear-gradient(90deg, var(--navy-3), var(--teal));
  color: var(--ivory); font-size: .78rem; letter-spacing: .04em;
  text-align: center; padding: .5rem 1rem; font-weight: 500;
}
.topbar b { color: var(--gold); font-weight: 700; }

.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10, 15, 44, 0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-main {
  display: flex; align-items: center; gap: 1.6rem;
  padding: 1.05rem 0;
}
.logo {
  font-family: var(--f-display); font-weight: 800; font-size: 1.7rem;
  color: var(--ivory); letter-spacing: -.01em; white-space: nowrap;
}
.logo span { color: var(--gold); }
.logo small { display: block; font-family: var(--f-body); font-weight: 500;
  font-size: .56rem; letter-spacing: .42em; color: var(--platinum-dim);
  text-transform: uppercase; margin-top: 1px; padding-left: 2px; }

/* Search */
.search-wrap { flex: 1; position: relative; max-width: 560px; }
.search-box {
  display: flex; align-items: center; gap: .6rem;
  background: var(--glass-strong); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: .65rem 1.1rem;
  transition: border-color .25s ease;
}
.search-box:focus-within { border-color: var(--gold); }
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--ivory); font-family: var(--f-body); font-size: .92rem;
}
.search-box input::placeholder { color: var(--platinum-dim); }
.search-box svg { flex: none; }
.search-suggest {
  position: absolute; top: calc(100% + .55rem); left: 0; right: 0; z-index: 50;
  background: var(--navy-2); border: 1px solid var(--glass-border);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
  display: none;
}
.search-suggest.open { display: block; }
.search-suggest a {
  display: flex; align-items: center; gap: .85rem; padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.search-suggest a:last-child { border-bottom: none; }
.search-suggest a:hover { background: var(--glass); }
.search-suggest img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.search-suggest .s-name { font-size: .9rem; }
.search-suggest .s-price { margin-left: auto; font-family: var(--f-num); color: var(--gold); font-size: 1.1rem; }

/* Header actions */
.head-actions { display: flex; align-items: center; gap: .35rem; }
.icon-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ivory);
  transition: background .25s ease, color .25s ease;
}
.icon-btn:hover { background: var(--glass-strong); color: var(--gold); }
.count-badge {
  position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 20px; background: var(--coral); color: #fff;
  font-family: var(--f-body); font-size: .68rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--navy);
}
.login-btn {
  margin-left: .4rem; padding: .62rem 1.3rem; border-radius: var(--r-pill);
  border: 1px solid var(--glass-border); font-weight: 600; font-size: .88rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.login-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Nav / mega menu */
.nav-bar { border-top: 1px solid var(--line); }
.nav-list { display: flex; align-items: center; gap: 2rem; padding: .2rem 0; }
.nav-list > li > a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .85rem 0; font-size: .9rem; font-weight: 600; letter-spacing: .03em;
  color: var(--platinum); position: relative;
}
.nav-list > li > a:hover { color: var(--gold); }
.nav-list > li > a::after {
  content: ""; position: absolute; left: 0; bottom: .55rem; height: 2px; width: 0;
  background: var(--gold); transition: width .3s ease;
}
.nav-list > li > a:hover::after { width: 100%; }
.has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 150;
  background: var(--navy-2); border-top: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.has-mega:hover .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-inner { display: grid; grid-template-columns: repeat(4, 1fr) 1.2fr; gap: 2rem; padding: 2.2rem 0; }
.mega-col h5 {
  font-family: var(--f-sub); font-size: 1.15rem; color: var(--gold);
  margin: 0 0 .9rem; font-weight: 600; display: flex; align-items: center; gap: .5rem;
}
.mega-col a { display: block; padding: .32rem 0; color: var(--platinum-dim); font-size: .88rem; }
.mega-col a:hover { color: var(--ivory); padding-left: 6px; }
.mega-feature {
  border-radius: 14px; overflow: hidden; position: relative; min-height: 200px;
  display: flex; align-items: flex-end; color: #fff;
}
.mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mega-feature .mf-body { position: relative; padding: 1.2rem; background: linear-gradient(transparent, rgba(10,15,44,.9)); width: 100%; }
.mega-feature .mf-body b { font-family: var(--f-display); font-size: 1.2rem; }

/* Mobile */
.hamburger { display: none; }
.mobile-nav { display: none; }

/* =================================================================
   PRODUCT CARD
   ================================================================= */
.product-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(4, 1fr);
}
.product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.pcard {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  background: var(--glass); border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  display: flex; flex-direction: column;
}
.pcard:hover { transform: translateY(-8px); border-color: var(--glass-border); box-shadow: var(--shadow); }
.pcard-media { position: relative; aspect-ratio: 1/1.05; overflow: hidden; background: var(--navy-3); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pcard:hover .pcard-media img { transform: scale(1.07); }
.pcard-badges { position: absolute; top: .8rem; left: .8rem; display: flex; flex-direction: column; gap: .4rem; z-index: 2; }
.pcard-actions {
  position: absolute; top: .8rem; right: .8rem; display: flex; flex-direction: column; gap: .5rem; z-index: 2;
}
.pcard-icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10,15,44,.6); backdrop-filter: blur(6px); color: var(--ivory);
  border: 1px solid var(--line);
  opacity: 0; transform: translateX(10px); transition: all .3s ease;
}
.pcard:hover .pcard-icon { opacity: 1; transform: translateX(0); }
.pcard-icon:hover { background: var(--gold); color: var(--navy); }
.pcard-icon.active { background: var(--coral); color: #fff; border-color: var(--coral); opacity: 1; transform: none; }
.pcard-quick {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: .8rem; background: linear-gradient(transparent, rgba(10,15,44,.92));
  transform: translateY(100%); transition: transform .35s ease;
}
.pcard:hover .pcard-quick { transform: translateY(0); }
.pcard-body { padding: 1rem 1.1rem 1.3rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.pcard-vendor { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-soft); font-weight: 600; }
.pcard-name { font-family: var(--f-sub); font-size: 1.22rem; font-weight: 600; line-height: 1.2; color: var(--ivory); }
.pcard-name:hover { color: var(--gold); }
.stars { display: inline-flex; gap: 2px; color: var(--gold); font-size: .8rem; }
.stars .muted { color: var(--platinum-dim); }
.rating-row { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--platinum-dim); }
.price-row { display: flex; align-items: baseline; gap: .6rem; margin-top: auto; padding-top: .35rem; }
.price-now { font-family: var(--f-num); font-size: 1.65rem; color: var(--gold); line-height: 1; }
.price-was { font-size: .92rem; color: var(--platinum-dim); text-decoration: line-through; }
.price-off { font-size: .74rem; font-weight: 700; color: var(--coral); }

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer {
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.35)), var(--navy-2);
  border-top: 1px solid var(--glass-border); margin-top: 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 2rem;
  padding: 4rem 0 2.5rem;
}
.footer-col h5 {
  font-family: var(--f-body); text-transform: uppercase; letter-spacing: .16em;
  font-size: .78rem; color: var(--gold); margin: 0 0 1.2rem; font-weight: 700;
}
.footer-col a { display: block; padding: .35rem 0; color: var(--platinum-dim); font-size: .9rem; }
.footer-col a:hover { color: var(--ivory); }
.footer-about p { color: var(--platinum-dim); font-size: .92rem; max-width: 30ch; }
.footer-social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--platinum);
}
.footer-social a:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); transform: translateY(-3px); }
.footer-news input {
  width: 100%; background: var(--glass-strong); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: .8rem 1.1rem; color: var(--ivory);
  font-family: var(--f-body); outline: none; margin-bottom: .7rem;
}
.footer-news input:focus { border-color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 1.4rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: .82rem; color: var(--platinum-dim); flex-wrap: wrap;
}

/* =================================================================
   FORMS
   ================================================================= */
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .04em; margin-bottom: .45rem; color: var(--platinum); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--glass-strong); border: 1px solid var(--line);
  border-radius: 12px; padding: .85rem 1rem; color: var(--ivory);
  font-family: var(--f-body); font-size: .94rem; outline: none; transition: border-color .25s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--platinum-dim); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field select option { background: var(--navy-2); }

/* Breadcrumb */
.breadcrumb-x { display: flex; align-items: center; gap: .55rem; font-size: .82rem; color: var(--platinum-dim); padding: 1.6rem 0; flex-wrap: wrap; }
.breadcrumb-x a:hover { color: var(--gold); }
.breadcrumb-x .sep { opacity: .5; }
.breadcrumb-x .current { color: var(--ivory); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: .6rem; }
.toast {
  background: var(--navy-2); border: 1px solid var(--glass-border); border-left: 4px solid var(--gold);
  border-radius: 12px; padding: .9rem 1.2rem; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .7rem; font-size: .9rem; min-width: 240px;
  animation: toastIn .4s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.toast svg { color: var(--gold); flex: none; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about, .footer-news { grid-column: span 3; }
}
@media (max-width: 860px) {
  .search-wrap { display: none; }
  .nav-bar { display: none; }
  .hamburger { display: grid; }
  .mega-inner { grid-template-columns: 1fr 1fr; }
  .product-grid, .product-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about, .footer-news { grid-column: span 2; }
  :root { --header-h: 86px; }
}
@media (max-width: 540px) {
  .product-grid, .product-grid.cols-3 { grid-template-columns: 1fr 1fr; gap: .9rem; }
  .logo { font-size: 1.35rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-about, .footer-news { grid-column: span 1; }
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 500; background: rgba(5,8,24,.6);
  backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s;
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(82vw, 340px);
  background: var(--navy-2); padding: 1.5rem; overflow-y: auto;
  transform: translateX(-100%); transition: transform .35s ease;
  border-right: 1px solid var(--glass-border);
}
.mobile-nav.open .mobile-nav-panel { transform: none; }
.mobile-nav-panel .search-box { margin: 1rem 0 1.5rem; }
.mobile-nav-panel a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); font-weight: 600; }

/* Bottom nav (mobile) */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 180;
    background: rgba(10,15,44,.95); backdrop-filter: blur(16px); border-top: 1px solid var(--glass-border);
  }
  .bottom-nav a { display: grid; place-items: center; gap: 3px; padding: .6rem 0; font-size: .62rem; color: var(--platinum-dim); position: relative; }
  .bottom-nav a.active, .bottom-nav a:hover { color: var(--gold); }
  .bottom-nav .count-badge { top: 2px; right: 50%; margin-right: -22px; }
  body { padding-bottom: 64px; }
}
