/* =====================================================================
   Black Thread Society — storefront theme
   Dark, gothic, premium streetwear. Bone white on void black with a
   blood-red accent and a whisper of antique gold for premium touches.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --void: #0a0a0c;
  --void-2: #131316;
  --void-3: #1b1b1f;
  --line: #2a2a30;
  --bone: #ece8dd;
  --bone-dim: #b9b4a6;
  --ash: #8a8a90;
  --blood: #7a1128;
  --blood-bright: #b21e3c;
  --gold: #c9a227;
  --success: #3f8f5f;
  --radius: 3px;
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.8);
  --shadow-sm: 0 6px 18px -8px rgba(0,0,0,.6);
  --maxw: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(122,17,40,.10), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(122,17,40,.08), transparent 40%);
  pointer-events: none;
  z-index: 0;
}
h1, h2, h3, h4 { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .02em; margin: 0 0 .5em; color: var(--bone); }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.eyebrow { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; color: var(--blood-bright); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; font-size: .82rem;
  padding: 14px 28px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--blood-bright), var(--blood)); color: #fff; box-shadow: 0 8px 24px -8px rgba(178,30,60,.6); }
.btn-primary:hover { box-shadow: 0 10px 30px -6px rgba(178,30,60,.8); }
.btn-outline { background: transparent; border-color: var(--bone-dim); color: var(--bone); }
.btn-outline:hover { border-color: var(--bone); background: rgba(236,232,221,.06); }
.btn-dark { background: var(--void-3); border-color: var(--line); color: var(--bone); }
.btn-dark:hover { border-color: var(--bone-dim); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 9px 16px; font-size: .72rem; }

/* ---------------- Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,10,12,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 24px; max-width: var(--maxw); margin: 0 auto; gap: 16px; }
.brand-logo { grid-column: 2; justify-self: center; text-align: center; }
.brand-logo img { max-height: 54px; margin: 0 auto; }
.brand-logo .text-logo { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.2rem; letter-spacing: .16em; color: var(--bone); line-height: 1; }
.brand-logo .text-logo span { color: var(--blood-bright); }
.brand-logo .text-logo-sub { display: block; margin-top: 5px; font-family: 'Oswald', sans-serif; font-size: .62rem; letter-spacing: .46em; color: var(--ash); }
.announce-bar { text-align: center; font-family: 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase; font-size: .68rem; padding: 8px 16px; background: #070708; color: var(--bone-dim); border-bottom: 1px solid var(--line); }
.header-search input, .shop-tools input, .shop-tools select {
  background: var(--void-2); color: var(--bone); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius); font-family: inherit; font-size: .88rem;
}
.header-search input { width: 148px; padding: 8px 10px; }
.shop-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.page-wrap { padding: 56px 0 80px; }
.page-wrap h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.prose { max-width: 740px; }
.prose p, .prose li { color: var(--bone-dim); }
.prose h2 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--blood-bright); text-decoration: underline; }
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0 8px; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.data-table th { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--ash); font-weight: 500; }
.main-nav { display: flex; gap: 28px; justify-self: start; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; }
.main-nav a { color: var(--bone-dim); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--bone); border-color: var(--blood-bright); }
.header-actions { display: flex; gap: 18px; justify-self: end; align-items: center; }
.header-actions a { color: var(--bone-dim); position: relative; }
.header-actions a:hover { color: var(--bone); }
.cart-count { position: absolute; top: -8px; right: -12px; background: var(--blood-bright); color: #fff; font-size: .65rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.nav-toggle { display: none; background: none; border: none; color: var(--bone); font-size: 1.4rem; cursor: pointer; }

/* ---------------- Hero slider ---------------- */
.hero-slider { position: relative; height: min(78vh, 720px); min-height: 420px; overflow: hidden; background: var(--void-2); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img, .hero-slide video { width: 100%; height: 100%; object-fit: cover; filter: brightness(.5) saturate(1.05); }
.hero-slide .hero-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px; }
.hero-slide .hero-content .eyebrow { margin-bottom: 14px; }
.hero-slide h1 { text-shadow: 0 8px 30px rgba(0,0,0,.8); }
.hero-slide p { max-width: 560px; color: var(--bone-dim); font-size: 1.05rem; margin-bottom: 26px; }
.hero-dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--bone-dim); background: transparent; cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--blood-bright); border-color: var(--blood-bright); }
.hero-empty { display: flex; align-items: center; justify-content: center; height: 50vh; background: radial-gradient(circle at 50% 30%, #1b1b1f, var(--void)); }

/* ---------------- Sections ---------------- */
.section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { margin-top: 8px; }

.category-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.category-card { position: relative; height: 260px; border-radius: var(--radius); overflow: hidden; background: var(--void-3); border: 1px solid var(--line); display: flex; align-items: flex-end; }
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: transform .5s ease, opacity .3s; }
.category-card:hover img { transform: scale(1.08); opacity: .7; }
.category-card .cat-label { position: relative; z-index: 1; padding: 20px; font-family: 'Oswald',sans-serif; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.category-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85)); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.product-card { background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.product-card:hover { border-color: var(--blood); transform: translateY(-4px); }
.product-card .thumb { position: relative; aspect-ratio: 1/1.15; background: var(--void-3); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .badge { position: absolute; top: 12px; left: 12px; background: var(--blood-bright); color: #fff; font-family: 'Oswald',sans-serif; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 2px; z-index: 2; }
.product-card .badge.gold { background: var(--gold); color: #1a1400; }
.product-card .info { padding: 18px; }
.product-card .cat { color: var(--ash); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-family: 'Oswald',sans-serif; }
.product-card h3 { font-family: 'Oswald', sans-serif; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 10px; color: var(--bone); }
.price-row { display: flex; align-items: baseline; gap: 10px; }
.price { color: var(--bone); font-weight: 600; font-size: 1.05rem; }
.price-compare { color: var(--ash); text-decoration: line-through; font-size: .9rem; }
.swatch-row { display: flex; gap: 6px; margin-top: 10px; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }

/* ---------------- Product detail ---------------- */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; padding: 60px 0; align-items: flex-start; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 32px; } }
.pdp-gallery-main { aspect-ratio: 1/1; background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.pdp-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumbs { display: flex; gap: 10px; }
.pdp-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); cursor: pointer; opacity: .7; }
.pdp-thumbs img.active { opacity: 1; border-color: var(--blood-bright); }
.pdp h1 { font-size: 2rem; margin-bottom: 8px; }
.pdp .price-row { font-size: 1.4rem; margin: 18px 0; }
.pdp .desc { color: var(--bone-dim); margin-bottom: 26px; }
.option-group { margin-bottom: 22px; }
.option-label { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; color: var(--ash); margin-bottom: 10px; display: block; }
.color-options { display: flex; gap: 8px; flex-wrap: wrap; }
.color-opt {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 92px; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--void-2); cursor: pointer;
  font-family: 'Oswald', sans-serif; font-size: .85rem; letter-spacing: .04em;
}
.color-opt i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); display: block; }
.color-opt.selected { border-color: var(--blood-bright); box-shadow: 0 0 0 3px rgba(178,30,60,.25); }
.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-opt { min-width: 46px; padding: 10px 12px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-family: 'Oswald', sans-serif; font-size: .85rem; background: var(--void-2); color: var(--bone); }
.size-opt.selected { border-color: var(--blood-bright); background: rgba(178,30,60,.15); }
.size-opt.disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.qty-control button { background: none; border: none; color: var(--bone); width: 38px; height: 42px; cursor: pointer; font-size: 1.1rem; }
.qty-control input { width: 44px; text-align: center; background: none; border: none; color: var(--bone); font-size: 1rem; }
.stock-note { font-size: .8rem; color: var(--ash); margin-top: 10px; }
.trust-strip { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; color: var(--ash); font-size: .8rem; }

/* ---------------- Cart / checkout ---------------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--ash); padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 20px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item-row { display: flex; gap: 16px; align-items: center; }
.cart-item-row img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.cart-item-meta .name { font-weight: 600; }
.cart-item-meta .variant { color: var(--ash); font-size: .82rem; }
.remove-link { color: var(--ash); font-size: .78rem; text-decoration: underline; cursor: pointer; }
.remove-link:hover { color: var(--blood-bright); }

.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: flex-start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.summary-card { background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: sticky; top: 100px; }
.summary-line { display: flex; justify-content: space-between; padding: 10px 0; color: var(--bone-dim); }
.summary-line.total { color: var(--bone); font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--ash); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--bone); font-family: inherit; font-size: .95rem; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blood-bright); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
#card-element-wrap { background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-size: .9rem; }
.alert-error { background: rgba(178,30,60,.15); border: 1px solid var(--blood); color: #ffd7dc; }
.alert-success { background: rgba(63,143,95,.15); border: 1px solid var(--success); color: #c9f0d8; }
.alert-info { background: rgba(201,162,39,.12); border: 1px solid var(--gold); color: #f1e2a8; }

/* ---------------- Thank you ---------------- */
.thankyou-hero { text-align: center; padding: 90px 0 40px; }
.thankyou-hero .icon { font-size: 3rem; margin-bottom: 18px; }
.order-recap { max-width: 640px; margin: 0 auto; background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.social-cta { text-align: center; padding: 60px 0; }
.social-links { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.social-links a { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; transition: border-color .2s, transform .2s; }
.social-links a:hover { border-color: var(--blood-bright); transform: translateY(-3px); }

/* ---------------- Account ---------------- */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 60px 0; }
@media (max-width: 800px) { .account-layout { grid-template-columns: 1fr; } }
.account-nav { display: flex; flex-direction: column; gap: 4px; }
.account-nav a { padding: 12px 16px; border-radius: var(--radius); color: var(--bone-dim); font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; }
.account-nav a.active, .account-nav a:hover { background: var(--void-2); color: var(--bone); }
.order-card { background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.order-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.status-pill { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-family: 'Oswald', sans-serif; }
.status-pending { background: rgba(201,162,39,.2); color: var(--gold); }
.status-paid, .status-processing { background: rgba(122,17,40,.25); color: #ff9fae; }
.status-shipped { background: rgba(63,120,143,.25); color: #9fd4ff; }
.status-delivered { background: rgba(63,143,95,.25); color: #a8f0c4; }
.status-cancelled, .status-refunded { background: rgba(120,120,120,.25); color: var(--ash); }
.auth-card { max-width: 440px; margin: 60px auto; background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.auth-card h1 { font-size: 1.7rem; text-align: center; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--ash); font-size: .88rem; }
.auth-switch a { color: var(--blood-bright); text-decoration: underline; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 30px; margin-top: 60px; background: var(--void-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: .82rem; letter-spacing: .1em; color: var(--bone); margin-bottom: 16px; }
.footer-grid a { display: block; color: var(--ash); font-size: .88rem; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--bone); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ash); font-size: .8rem; }

/* ---------------- Misc ---------------- */
.empty-state { text-align: center; padding: 100px 20px; color: var(--ash); }
.breadcrumb { color: var(--ash); font-size: .82rem; margin-bottom: 20px; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.breadcrumb a:hover { color: var(--bone); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--bone-dim); }
.pagination .active { background: var(--blood); color: #fff; border-color: var(--blood); }

@media (max-width: 860px) {
  .header-search { display: none; }
  .brand-logo .text-logo { font-size: .95rem; letter-spacing: .1em; }
  .brand-logo .text-logo-sub { letter-spacing: .28em; font-size: .55rem; }
  .header-top { grid-template-columns: auto 1fr auto; padding: 12px 14px; }
  .main-nav { position: fixed; top: 78px; left: 0; right: 0; background: var(--void); flex-direction: column; padding: 20px 24px; border-bottom: 1px solid var(--line); display: none; gap: 14px; z-index: 60; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
}
