/* =========================================================
   TCGMAFIA — Design tokens (tema: Hitam & Merah / Pirate Syndicate)
   Palette:  bg #0A0A0C · surface #171113 · card #201417
             red #B7181F · red-bright #E8323D
             text #F3E9EA · muted #9C8285
   Type: Cinzel (display) · Manrope (body) · JetBrains Mono (data)
   Signature: siluet kapal bajak laut + tengkorak di background hero
   ========================================================= */

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

:root{
  --bg:#050505;
  --bg-alt:#0C0707;
  --surface:#120C0D;
  --card:#1A1113;
  --card-hover:#251519;
  --purple:#6B0F1D;
  --purple-2:#A8253B;
  --gold:#7A1420;
  --gold-bright:#B8293F;
  --text:#F3E9EA;
  --muted:#8F7678;
  --line:#2E1417;
  --stock:#4CC38A;
  --soldout:#6B6468;
  --preorder:#4C9FE2;
  --radius:14px;
  --shadow:0 12px 32px -12px rgba(0,0,0,.75);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(107,15,29,.30), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(168,37,59,.12), transparent 55%),
    var(--bg);
  color:var(--text);
  font-family:'Manrope',system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.display{font-family:'Cinzel',serif; letter-spacing:.02em;}
.mono{font-family:'JetBrains Mono',monospace;}
a{color:inherit; text-decoration:none;}
img{max-width:100%; display:block;}
.container{max-width:1180px; margin:0 auto; padding:0 20px;}
@media (prefers-reduced-motion: reduce){ *{animation:none !important; transition:none !important;} }

/* ---------- Logo mark (gambar) ---------- */
.logo-mark{
  width:48px; height:48px; object-fit:contain; flex-shrink:0;
  filter: drop-shadow(0 4px 14px rgba(168,37,59,.35));
}
.logo-mark.lg{ width:150px; height:150px; }
.logo-mark.sm{ width:34px; height:34px; }

/* ---------- Header ---------- */
header.site{
  position:sticky; top:0; z-index:40;
  background:rgba(18,12,30,.85); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.header-inner{display:flex; align-items:center; gap:14px; padding:14px 20px;}
.brand{display:flex; align-items:center; gap:12px;}
.brand-text .name{font-size:19px; font-weight:700; line-height:1.1;}
.brand-text .tag{font-size:11px; color:var(--muted); letter-spacing:.04em;}
nav.main{display:flex; gap:4px; margin-left:24px; flex-wrap:wrap;}
nav.main button{
  background:none; border:none; color:var(--muted); font:inherit; font-weight:600;
  font-size:14px; padding:8px 14px; border-radius:999px; cursor:pointer;
  transition:.15s;
}
nav.main button:hover{color:var(--text); background:rgba(255,255,255,.05);}
nav.main button.active{color:var(--bg); background:linear-gradient(135deg,var(--gold-bright),var(--gold));}
.header-actions{margin-left:auto; display:flex; align-items:center; gap:10px;}
.rate-pill{
  font-size:12px; color:var(--gold-bright); border:1px solid var(--line);
  padding:6px 12px; border-radius:999px; white-space:nowrap;
}
.cart-btn{
  position:relative; display:flex; align-items:center; gap:8px;
  background:var(--card); border:1px solid var(--line); color:var(--text);
  padding:9px 16px; border-radius:999px; cursor:pointer; font:inherit; font-weight:600; font-size:14px;
}
.cart-btn:hover{border-color:var(--purple-2);}
.cart-count{
  background:var(--purple); color:#fff; font-size:11px; font-weight:800;
  min-width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center;
}
.burger{display:none; background:none; border:1px solid var(--line); color:var(--text); border-radius:8px; padding:8px 10px; cursor:pointer;}

/* ---------- Hero ---------- */
.hero{
  padding:72px 0 48px; position:relative; overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(10,10,12,.55) 45%, rgba(10,10,12,.15) 100%),
    url('assets/pirate-bg.svg') no-repeat right -40px bottom -60px / 640px auto;
  opacity:.9;
}
.hero .container{position:relative; z-index:1;}
.hero .eyebrow{
  display:inline-flex; align-items:center; gap:8px; font-size:12px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--gold-bright); border:1px solid var(--line);
  padding:6px 14px; border-radius:999px; margin-bottom:22px;
}
.hero .eyebrow::before{content:"◆"; font-size:9px;}
.hero h1{font-size:clamp(34px,5.2vw,58px); line-height:1.05; margin:0 0 20px; max-width:760px;}
.hero h1 em{font-style:normal; color:var(--gold-bright);}
.hero p.lede{color:var(--muted); font-size:17px; max-width:600px; line-height:1.6; margin:0 0 32px;}
.hero-ctas{display:flex; gap:14px; flex-wrap:wrap; margin-bottom:36px;}
.btn{
  display:inline-flex; align-items:center; gap:8px; padding:14px 26px; border-radius:10px;
  font-weight:700; font-size:14px; cursor:pointer; border:1px solid transparent; font-family:inherit;
  transition:.15s;
}
.btn-gold{background:linear-gradient(135deg,var(--gold-bright),var(--gold)); color:#1a1208;}
.btn-gold:hover{filter:brightness(1.08); transform:translateY(-1px);}
.btn-ghost{background:transparent; border-color:var(--line); color:var(--text);}
.btn-ghost:hover{border-color:var(--purple-2);}
.stat-row{display:flex; gap:36px; flex-wrap:wrap;}
.stat b{display:block; font-family:'Cinzel',serif; font-size:26px; color:var(--gold-bright);}
.stat span{font-size:12px; color:var(--muted); letter-spacing:.03em;}

/* ---------- Section headers ---------- */
.section{padding:56px 0;}
.section-head{margin-bottom:28px;}
.section-head .eyebrow-sm{font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--purple-2); font-weight:700;}
.section-head h2{font-size:clamp(24px,3vw,32px); margin:8px 0 6px;}
.section-head p{color:var(--muted); margin:0; max-width:560px;}

/* ---------- Filter tabs ---------- */
.filters{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:26px;}
.filters button{
  background:var(--surface); border:1px solid var(--line); color:var(--muted);
  padding:9px 16px; border-radius:999px; font:inherit; font-size:13px; font-weight:600; cursor:pointer;
}
.filters button.active{background:var(--purple); border-color:var(--purple); color:#fff;}
.toolbar{display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:18px;}
.toolbar .count{color:var(--muted); font-size:13px;}
select.sort{
  background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px;
  padding:8px 12px; font:inherit; font-size:13px; cursor:pointer;
}

/* ---------- Product grid ---------- */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:18px;}
.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; position:relative; display:flex; flex-direction:column;
  transition:transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover{transform:translateY(-4px); border-color:var(--gold); box-shadow:var(--shadow);}
.card:hover .foil{opacity:1; transform:translateX(120%);}
.card-media{position:relative; aspect-ratio:1/1; background:var(--bg-alt); overflow:hidden;}
.card-media img{width:100%; height:100%; object-fit:cover;}
.foil{
  position:absolute; inset:0; pointer-events:none; opacity:0;
  background:linear-gradient(115deg, transparent 40%, rgba(168,37,59,.35) 50%, transparent 60%);
  transform:translateX(-120%); transition:transform .7s ease, opacity .3s;
}
.stamp{
  position:absolute; top:10px; left:10px; z-index:2;
  font-family:'Cinzel',serif; font-weight:700; font-size:10.5px; letter-spacing:.06em;
  text-transform:uppercase; padding:5px 10px; border-radius:5px;
  transform:rotate(-6deg); border:1.5px solid currentColor;
  background:rgba(18,12,30,.78); backdrop-filter:blur(2px);
}
.stamp.stock{color:var(--stock);}
.stamp.soldout{color:var(--soldout);}
.stamp.preorder{color:var(--preorder);}
.tag-origin{
  position:absolute; top:10px; right:10px; z-index:2; font-size:10px; font-weight:700;
  background:rgba(0,0,0,.55); color:var(--gold-bright); padding:4px 9px; border-radius:5px;
  text-transform:uppercase; letter-spacing:.04em;
}
.card-body{padding:14px 15px 16px; display:flex; flex-direction:column; gap:8px; flex:1;}
.card-body h3{font-size:14.5px; margin:0; line-height:1.3; font-family:'Manrope',sans-serif; font-weight:700;}
.card-body .desc{font-size:12px; color:var(--muted); line-height:1.5; margin:0; min-height:2.4em;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.price-row{display:flex; align-items:baseline; gap:8px; margin-top:2px;}
.price-usd{font-family:'JetBrains Mono',monospace; font-weight:700; color:var(--gold-bright); font-size:16px;}
.price-idr{font-family:'JetBrains Mono',monospace; color:var(--muted); font-size:12px;}
.stock-line{font-size:11.5px; color:var(--muted); font-family:'JetBrains Mono',monospace;}
.add-btn{
  margin-top:auto; width:100%; padding:10px; border-radius:8px; border:1px solid var(--purple);
  background:rgba(107,15,29,.16); color:var(--purple-2); font-weight:700; font-size:13px; cursor:pointer;
  font-family:inherit; transition:.15s;
}
.add-btn:hover{background:var(--purple); color:#fff;}
.add-btn:disabled{opacity:.4; cursor:not-allowed; border-color:var(--line); color:var(--muted); background:transparent;}
.empty-state{text-align:center; padding:60px 20px; color:var(--muted);}
.empty-state .logo-mark{margin:0 auto 18px;}

/* ---------- About / trust strip ---------- */
.about-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:48px; align-items:center;}
.about-grid p{color:var(--muted); line-height:1.7;}
.trust-list{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:22px;}
.trust-item{display:flex; align-items:center; gap:10px; font-size:13.5px; font-weight:600;}
.trust-item .dot{width:8px; height:8px; border-radius:50%; background:var(--gold);}
.about-emblem{
  aspect-ratio:1/1; border-radius:20px; border:1px solid var(--line);
  background:radial-gradient(circle at 50% 40%, rgba(168,37,59,.14), transparent 65%), var(--surface);
  display:flex; align-items:center; justify-content:center;
}

/* ---------- Footer ---------- */
footer.site{border-top:1px solid var(--line); padding:44px 0 28px; margin-top:20px;}
.footer-grid{display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; align-items:flex-start;}
.social-row{display:flex; gap:10px; flex-wrap:wrap;}
.social-row a{
  border:1px solid var(--line); border-radius:999px; padding:8px 16px; font-size:13px; font-weight:600;
}
.social-row a:hover{border-color:var(--gold);}
.copyright{color:var(--muted); font-size:12.5px; margin-top:26px;}

/* ---------- Product detail modal ---------- */
.detail-modal{
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%) scale(.96); z-index:70;
  width:min(560px,92vw); max-height:88vh; overflow-y:auto; background:var(--surface);
  border:1px solid var(--line); border-radius:16px; opacity:0; pointer-events:none; transition:.2s;
}
.detail-modal.open{opacity:1; pointer-events:auto; transform:translate(-50%,-50%) scale(1);}
.detail-close{
  position:absolute; top:14px; right:14px; z-index:2; background:rgba(5,5,5,.6); border-radius:50%;
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
}
.detail-media{background:var(--bg-alt); display:flex; align-items:center; justify-content:center; min-height:220px; border-radius:16px 16px 0 0; overflow:hidden;}
.detail-media img{max-height:340px; width:auto; object-fit:contain;}
.detail-body{padding:22px 24px 26px;}
.detail-body h3{font-size:20px; margin:0 0 8px;}
.detail-body .desc{-webkit-line-clamp:unset; min-height:auto; margin-bottom:18px;}
.detail-grid{display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:16px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-bottom:18px;}
.detail-label{font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:4px;}
.detail-value{font-size:14px; font-weight:700;}
.detail-footer{display:flex; align-items:center; justify-content:space-between; gap:16px;}
.detail-footer .price-usd{font-size:22px;}

/* ---------- Cart drawer ---------- */
.overlay{position:fixed; inset:0; background:rgba(8,5,15,.6); z-index:60; opacity:0; pointer-events:none; transition:.2s;}
.overlay.open{opacity:1; pointer-events:auto;}
.drawer{
  position:fixed; top:0; right:0; height:100%; width:min(400px,92vw);
  background:var(--surface); border-left:1px solid var(--line); z-index:61;
  transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column;
}
.drawer.open{transform:translateX(0);}
.drawer-head{display:flex; justify-content:space-between; align-items:center; padding:18px 20px; border-bottom:1px solid var(--line);}
.drawer-head h3{margin:0; font-size:18px;}
.close-btn{background:none; border:none; color:var(--muted); font-size:22px; cursor:pointer; line-height:1;}
.drawer-body{flex:1; overflow-y:auto; padding:16px 20px;}
.cart-item{display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--line);}
.cart-item img{width:56px; height:56px; border-radius:8px; object-fit:cover; background:var(--bg-alt);}
.cart-item .ci-info{flex:1; min-width:0;}
.cart-item .ci-info h4{margin:0 0 4px; font-size:13px; line-height:1.3;}
.cart-item .ci-price{font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--gold-bright);}
.qty-row{display:flex; align-items:center; gap:8px; margin-top:6px;}
.qty-row button{
  width:22px; height:22px; border-radius:6px; border:1px solid var(--line); background:var(--card);
  color:var(--text); cursor:pointer; font-size:14px; line-height:1;
}
.qty-row .remove{border:none; background:none; color:var(--soldout); font-size:11px; margin-left:auto; cursor:pointer;}
.drawer-empty{color:var(--muted); text-align:center; padding:40px 0; font-size:14px;}
.drawer-foot{border-top:1px solid var(--line); padding:18px 20px; display:flex; flex-direction:column; gap:10px;}
.total-row{display:flex; justify-content:space-between; font-size:14px;}
.total-row b{font-family:'JetBrains Mono',monospace; color:var(--gold-bright);}
.checkout-note{font-size:11.5px; color:var(--muted); text-align:center;}

.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--card); border:1px solid var(--gold); color:var(--text); padding:12px 20px;
  border-radius:10px; font-size:13.5px; font-weight:600; z-index:80; opacity:0; pointer-events:none;
  transition:.2s; display:flex; align-items:center; gap:10px;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}

@media (max-width: 860px){
  .about-grid{grid-template-columns:1fr;}
  nav.main{display:none; position:absolute; top:100%; left:0; right:0; background:var(--surface);
    flex-direction:column; padding:10px; border-bottom:1px solid var(--line);}
  nav.main.open{display:flex;}
  .burger{display:block; margin-left:auto;}
  .header-actions{margin-left:0;}
  .rate-pill{display:none;}
}
