/* =========================================================
   AURAGOS — styles.css (CLEAN FULL FILE)
   Compatible with your current HTML:
   - Spot bar (#spotBar)
   - Header (header.utility-header .utility-inner)
   - Carousel (section.hero-carousel > .container > .carousel-shell
              .carousel-viewport > #carouselTrack)
   - Category tiles (section.category-grid .cat-grid)
   - Footer (footer.site-footer)
   - Cart drawer (#cartDrawer) + Checkout dialog (#checkoutDialog)
========================================================= */

/* ---------- Variables ---------- */
:root{
  --bg: #ffffff;
  --text: rgba(15,23,42,0.92);
  --muted: rgba(15,23,42,0.62);
  --line: rgba(15,23,42,0.10);

  --blue: #1e3a8a;
  --blue2:#2563eb;
  --gold:#b58b1b;

  --shadow-sm: 0 6px 18px rgba(15,23,42,0.08);
  --shadow-md: 0 12px 34px rgba(15,23,42,0.12);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 22px;

  --container: 1200px;
}

/* ---------- Reset ---------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}
img{ display:block; max-width:100%; height:auto; }
a{ color: inherit; }
button, input{ font: inherit; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* ---------- Layout helpers ---------- */
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.muted{ color: var(--muted); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration:none;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.btn.primary{
  background: linear-gradient(135deg, var(--blue2), var(--blue));
  color:#fff;
  box-shadow: 0 10px 22px rgba(37,99,235,0.20);
}
.btn.primary:hover{ filter: brightness(1.03); }
.btn.ghost{
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.10);
}
.btn.ghost:hover{ background: rgba(15,23,42,0.06); }

/* =========================================================
   Banner 1 — Spot bar
========================================================= */
.spot-bar{
  background:#0b1224;
  color: rgba(255,255,255,0.92);
  font-size: 0.92rem;
}
.spot-inner{
  display:flex;
  align-items:center;
  gap:14px;
  padding: 10px 20px;
  overflow-x:auto;
}
.spot-item{
  display:inline-flex;
  align-items:baseline;
  gap:10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.spot-item .metal{
  font-weight: 800;
  letter-spacing: 0.2px;
}
.spot-price{ font-variant-numeric: tabular-nums; }
.spot-change{
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  font-size: 0.88rem;
}
.spot-change.up{ color:#6ee7b7; }
.spot-change.down{ color:#fca5a5; }

.charts-link{
  margin-left:auto;
  text-decoration:none;
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}
.charts-link:hover{ background: rgba(255,255,255,0.10); }

/* =========================================================
   Banner 2 — Header (stable grid)
========================================================= */
.utility-header{
  background:#fff;
  border-bottom: 1px solid var(--line);
}
.utility-header .utility-inner{
  display:grid;
  grid-template-columns: max-content minmax(280px, 1fr) max-content;
  align-items:center;
  column-gap:16px;
  padding: 14px 20px;
}

/* Brand */
.brand-block{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.brand-logo{
  width:40px;
  height:40px;
  object-fit:contain;
  flex: 0 0 40px;
}
.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}
.brand-name{
  font-weight: 900;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand-tagline{
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Search */
.search-block{
  position:relative;
  display:flex;
  align-items:center;
  min-width:0;
}
.search-input{
  width:100%;
  height:44px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.14);
  background:#fff;
  padding: 0 46px 0 14px;
  outline:none;
}
.search-input:focus{
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.search-btn{
  position:absolute;
  right:6px;
  top:50%;
  transform: translateY(-50%);
  width:34px;
  height:34px;
  border:none;
  border-radius:999px;
  background: rgba(15,23,42,0.06);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.search-btn:hover{ background: rgba(15,23,42,0.08); }
.search-btn svg{
  width:18px;
  height:18px;
  fill: currentColor;
}

/* User/cart */
.user-block{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  white-space:nowrap;
}
.user-link, .cart-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color: rgba(15,23,42,0.92);
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 12px;
}
.user-link:hover, .cart-link:hover{
  background: rgba(15,23,42,0.06);
}
.user-link svg, .cart-link svg{
  width:20px;
  height:20px;
  fill: currentColor;
}
.cart-count-bubble{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  line-height:18px;
  background: var(--gold);
  color: #0b1224;
  font-weight: 900;
}
.cart-label{ display:inline-block; }

@media (max-width: 820px){
  .utility-header .utility-inner{
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    row-gap:10px;
  }
  .brand-block{ grid-column:1; grid-row:1; }
  .user-block{ grid-column:2; grid-row:1; justify-self:end; }
  .search-block{ grid-column:1 / -1; grid-row:2; }
  .cart-label{ display:none; }
}

/* =========================================================
   Banner 3 — Carousel (stable, no “partial slide”)
   Expects structure:
   section.hero-carousel > .container > .carousel-shell
     .carousel-viewport
       #carouselTrack.carousel-track
         a.carousel-slide ...
========================================================= */
.hero-carousel{
  background: linear-gradient(135deg, #f5f7fb, #ffffff);
  padding: 22px 0 26px;
}

.carousel-shell{
  position: relative;
}

/* The viewport is the key to prevent seeing other slides */
.carousel-viewport{
  overflow: hidden;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  background: #0b1224; /* fallback if images missing */
}

/* Track slides horizontally */
.carousel-track{
  display:flex;
  will-change: transform;
  transition: transform 420ms ease;
}

/* Each slide occupies 100% of viewport width */
.carousel-slide{
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  min-height: 320px;
  padding: 34px;
  color: #fff;
  text-decoration: none;

  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay for text readability */
.carousel-slide::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(11,18,36,0.75), rgba(11,18,36,0.15));
}

.carousel-content{
  position:relative;
  z-index:1;
  max-width: 540px;
}

.carousel-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
}
.carousel-eyebrow.sale{
  background: rgba(181,139,27,0.18);
  border-color: rgba(181,139,27,0.35);
}

.carousel-headline{
  margin: 14px 0 8px;
  font-size: 2.0rem;
  line-height: 1.15;
  letter-spacing: -0.2px;
}
.carousel-text{
  margin: 0 0 18px;
  color: rgba(255,255,255,0.90);
  line-height: 1.45;
  font-size: 1rem;
}

/* Make CTA gold like APMEX vibe */
.hero-carousel .btn.primary{
  height: 42px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--gold), #f4d06f);
  color: #0b1224;
  box-shadow: 0 10px 22px rgba(181,139,27,0.22);
  border: none;
}

/* Arrows */
.carousel-arrow{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:42px;
  height:42px;
  border-radius:999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.85);
  color: rgba(15,23,42,0.92);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow: var(--shadow-sm);
}
.carousel-arrow:hover{ background: rgba(255,255,255,0.95); }
.carousel-arrow.left{ left: 14px; }
.carousel-arrow.right{ right: 14px; }

/* Dots */
.carousel-dots{
  display:flex;
  justify-content:center;
  gap: 8px;
  margin-top: 12px;
}
.carousel-dots button{
  width: 8px;
  height: 8px;
  border-radius:999px;
  border:none;
  background: rgba(15,23,42,0.18);
  cursor:pointer;
  padding:0;
}
.carousel-dots button.active{
  width: 18px;
  background: rgba(15,23,42,0.78);
}

/* Mobile */
@media (max-width: 820px){
  .carousel-slide{ min-height: 280px; padding: 22px; }
  .carousel-headline{ font-size: 1.55rem; }
  .carousel-arrow{ display:none; }
}

/* =========================================================
   Banner 4 — Category tiles (3 + 3)
========================================================= */
.category-grid{
  padding: 34px 0 54px;
}
.section-title{
  margin: 0 0 14px;
  font-size: 1.55rem;
  letter-spacing: -0.2px;
}
.cat-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
}
.cat-card{
  display:flex;
  flex-direction:column;
  border-radius: var(--r-md);
  overflow:hidden;
  background:#fff;
  box-shadow: var(--shadow-sm);
  text-decoration:none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cat-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cat-thumb{
  background-image: var(--img, none);
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
}
.cat-info{ padding: 14px 16px 16px; }
.cat-name{ font-weight: 900; margin-bottom: 4px; }
.cat-desc{ color: var(--muted); font-size: 0.92rem; }

@media (max-width: 900px){
  .cat-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px){
  .cat-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   Footer
========================================================= */
.site-footer{
  border-top: 1px solid var(--line);
  background:#fff;
}
.footer-inner{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
  padding: 26px 20px;
}
.footer-brand{ font-weight: 900; letter-spacing: 0.2px; }
.footer-copy{ color: var(--muted); line-height: 1.45; margin-top: 8px; }

.footer-links, .footer-legal{
  display:grid;
  gap: 10px;
}
.footer-links a, .footer-legal a{
  text-decoration:none;
  color: rgba(15,23,42,0.82);
}
.footer-links a:hover, .footer-legal a:hover{ color: var(--blue); }
.footer-note{ margin-top: 12px; color: var(--muted); }

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

/* =========================================================
   Cart drawer + Checkout dialog
========================================================= */
.cart{
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(15,23,42,0.16);
  transform: translateX(110%);
  transition: transform 0.25s ease;
  z-index: 80;
  display:flex;
  flex-direction:column;
}
.cart.open{ transform: translateX(0); }

.cart-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 16px 16px;
  border-bottom: 1px solid var(--line);
}
.icon-btn{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(15,23,42,0.04);
  cursor:pointer;
}
.icon-btn:hover{ background: rgba(15,23,42,0.06); }

.cart-items{
  padding: 14px 16px;
  overflow:auto;
  flex: 1 1 auto;
}
.cart-footer{
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}
.totals{
  display:grid;
  gap: 10px;
  margin-bottom: 12px;
}
.totals > div{
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.hr{
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

/* Checkout dialog */
.checkout{
  border:none;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(15,23,42,0.25);
  width: min(720px, 92vw);
  padding:0;
}
.checkout::backdrop{ background: rgba(11,18,36,0.55); }
.checkout-inner{ padding: 18px 18px 16px; }
.checkout-inner h3{ margin: 0 0 10px; }
.steps{ margin: 0 0 10px; padding-left: 18px; color: rgba(15,23,42,0.82); }
.row.end{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top: 14px;
}
