:root{
  --bg: #eef5ff;
  --bg2:#f7fbff;
  --card:#ffffff;
  --stroke: rgba(10,30,60,.10);
  --text:#0b1630;
  --muted: rgba(11,22,48,.62);
  --blue:#1f6fff;
  --blue2:#3aa0ff;
  --shadow: 0 16px 40px rgba(10,30,60,.10);
  --r: 18px;
  --r2: 22px;
  --max: 1120px;

  /* ukuran kartu default (biar flex wrap rapi) */
  --card-min: 170px;  /* mobile 2 kolom */
  --card-max: 1fr;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 450px at 20% 0%, rgba(31,111,255,.12), transparent 60%),
    radial-gradient(800px 450px at 85% 10%, rgba(58,160,255,.10), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  overflow-x:hidden;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===========================
   CONTAINER RESPONSIVE
   =========================== */
.container{width:min(var(--max), calc(100% - 28px)); margin:0 auto;}

@media (min-width: 1024px){
  :root{ --max: 1440px; }
  .container{ width:min(var(--max), calc(100% - 56px)); }
}

@media (min-width: 1440px){
  :root{ --max: 1600px; }
  .container{ width:min(var(--max), calc(100% - 80px)); }
}

.page{padding: 14px 0 calc(96px + env(safe-area-inset-bottom));}

.h1{
  margin:0;
  font-family:"Space Grotesk", "Plus Jakarta Sans", system-ui;
  font-size:26px;
  letter-spacing:-.02em;
  line-height:1.12;
}
.h2{
  margin:0;
  font-family:"Space Grotesk", "Plus Jakarta Sans", system-ui;
  font-size:20px;
  letter-spacing:-.02em;
  line-height:1.2;
}
.muted{color:var(--muted)}
.small{font-size:12px}

/* ===== animated wave bg (smooth) ===== */
.waves{position:fixed; inset:0; pointer-events:none; z-index:-1; overflow:hidden;}
.wave{
  position:absolute;
  left:-20%;
  width:140%;
  height:55%;
  border-radius: 100%;
  filter: blur(18px);
  opacity:.55;
  background: radial-gradient(circle at 30% 30%, rgba(31,111,255,.22), transparent 55%),
              radial-gradient(circle at 70% 70%, rgba(58,160,255,.18), transparent 55%);
  transform: translate3d(0,0,0);
  animation: drift 12s ease-in-out infinite;
}
.wave.w1{top:-22%; animation-duration: 12s; opacity:.55;}
.wave.w2{top:18%; animation-duration: 15s; opacity:.40;}
.wave.w3{top:58%; animation-duration: 18s; opacity:.32;}
@keyframes drift{
  0%   {transform: translateX(-2%) translateY(0) scale(1.02);}
  50%  {transform: translateX(2%) translateY(-1%) scale(1.04);}
  100% {transform: translateX(-2%) translateY(0) scale(1.02);}
}

/* ===== topbar ===== */
.topbar{
  position:sticky; top:0; z-index:50;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding: 10px 0;
}
.brand{display:flex; align-items:center; gap:10px; min-width:max-content;}
.back{
  text-decoration:none; color:var(--text);
  width:34px; height:34px; display:grid; place-items:center;
  border-radius: 12px; border:1px solid var(--stroke);
  background: rgba(255,255,255,.65);
}
.brand-badge{
  width:36px; height:36px; border-radius: 14px;
  display:grid; place-items:center;
  background: linear-gradient(180deg, rgba(31,111,255,.14), rgba(255,255,255,.9));
  border:1px solid rgba(31,111,255,.18);
  box-shadow: 0 10px 26px rgba(31,111,255,.10);
}
.shield{
  width:16px; height:16px; border-radius:5px;
  background: linear-gradient(180deg, var(--blue2), var(--blue));
  display:inline-block;
}
.brand-name{
  font-family:"Space Grotesk", "Plus Jakarta Sans";
  font-weight:700;
  letter-spacing:.10em;
  font-size:12px;
}

.search-wrap{flex:1; display:flex; justify-content:center; min-width:0;}
.search{
  width:min(560px, 100%);
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.90);
  border:1px solid var(--stroke);
  box-shadow: 0 10px 22px rgba(10,30,60,.05);
}
.search input{
  flex:1; min-width:0;
  border:none; outline:none;
  background:transparent; font-size:14px;
}
.search-ic{opacity:.55}

.topbar-actions{display:flex; gap:10px; align-items:center;}
.icon-pill{
  position:relative;
  width:40px; height:40px; display:grid; place-items:center;
  border-radius: 14px; border:1px solid var(--stroke);
  background: rgba(255,255,255,.90);
  text-decoration:none; color:var(--text);
}
.notif{
  position:absolute; top:6px; right:6px;
  width:16px; height:16px; border-radius:999px;
  background: #ff3b3b; color:#fff; font-size:11px;
  display:grid; place-items:center;
}

/* ===== banner ===== */
.banner{
  border-radius: var(--r2);
  background: rgba(255,255,255,.55);
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  padding: 12px;
}
.banner-head{
  display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
  margin-bottom: 10px;
}
.banner-actions{display:flex; gap:8px;}
.ghost{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.92);
  padding: 9px 11px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:800;
}
.ghost:hover{border-color: rgba(31,111,255,.25)}

.banner-track{
  display:flex; gap:12px;
  overflow:auto; scroll-snap-type:x mandatory;
  padding-bottom: 6px;
}
.banner-track::-webkit-scrollbar{height:10px}
.banner-track::-webkit-scrollbar-thumb{background: rgba(10,30,60,.22); border-radius:999px}
.banner-track::-webkit-scrollbar-track{background: rgba(10,30,60,.08); border-radius:999px}

.banner-item{
  min-width: min(560px, 92%);
  scroll-snap-align:start;
  border-radius: 18px;
  padding: 12px;
  border:1px solid rgba(31,111,255,.16);
  background:
    radial-gradient(360px 160px at 18% 0%, rgba(31,111,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.74));
  box-shadow: 0 14px 30px rgba(31,111,255,.08);
}
.banner-title{
  font-family:"Space Grotesk";
  font-weight:700;
  font-size:14px;
}
.banner-desc{margin-top:6px; line-height:1.45; font-size:13px}
.banner-cta{
  margin-top:10px; display:inline-flex; gap:8px; align-items:center;
  color:var(--blue);
  font-weight:900;
  text-decoration:none;
}

/* ===== controls ===== */
.controls{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px; flex-wrap:wrap;
  margin-top: 14px;
}

/* chips jadi 1 baris scroll horizontal */
.chips{
  display:flex;
  gap:10px;
  overflow:auto;
  padding: 2px 0 6px;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling: touch;
  flex:1;
  min-width:0;
}
.chips::-webkit-scrollbar{height:8px}
.chips::-webkit-scrollbar-thumb{background: rgba(10,30,60,.16); border-radius:999px}
.chips::-webkit-scrollbar-track{background: rgba(10,30,60,.06); border-radius:999px}

.chip{
  scroll-snap-align:start;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.86);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  display:flex; gap:8px; align-items:center;
  font-weight:900; font-size:13px;
  white-space:nowrap;
  flex:0 0 auto;
}
.chip .dot{
  width:8px; height:8px; border-radius:999px;
  background: rgba(31,111,255,.20);
  box-shadow: 0 0 0 4px rgba(31,111,255,.08);
}
.chip.active{
  border-color: rgba(31,111,255,.24);
  background: rgba(31,111,255,.12);
}
.chip.active .dot{background: var(--blue);}

.controls-right{display:flex; gap:10px; align-items:center;}
.select{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.92);
  padding: 10px 12px;
  border-radius: 14px;
  outline:none;
  font-weight:800;
}

/* ===== count pill ===== */
.count-row{margin-top: 10px;}
.pill{
  display:inline-flex; gap:10px; align-items:center;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.86);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight:800;
}
.pill .dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(180deg, var(--blue2), var(--blue));
  box-shadow: 0 0 0 5px rgba(31,111,255,.10);
}

/* ===== sections ===== */
.section{margin-top: 18px;}

/* ===== CATEGORY HEADER jadi PEMISAH & CENTER (HP + PC) ===== */
.section-head{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:4px;
  margin: 14px 0 14px;
  padding: 10px 0;
}

/* garis pembatas */
.section-head::before{
  content:"";
  position:absolute;
  left:0; right:0;
  top:50%;
  height:1px;
  background: rgba(10,30,60,.10);
}

/* judul kategori jadi pill di tengah garis */
.section-title{
  position:relative;
  z-index:1;
  font-size:13px;
  font-family:"Space Grotesk";
  font-weight:800;
  letter-spacing:.10em;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding: 8px 14px;
  border-radius: 999px;

  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 24px rgba(10,30,60,.06);
}

.section-sub{
  position:relative;
  z-index:1;
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
  padding: 0 10px;
  max-width: 680px;
}

/* ===== LIST PRODUK: FLEX WRAP (CENTER PER BARIS) ===== */
.grid{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;       /* <— ini yang bikin tiap baris ketengah */
  gap: 12px;
}

/* 2 kolom di HP (tetap), tapi kalau cuma 1 item tetap ketengah */
.product-card{
  flex: 0 1 calc(50% - 6px);    /* 2 kolom */
  max-width: calc(50% - 6px);

  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(10,30,60,.10);
  box-shadow: 0 12px 26px rgba(10,30,60,.08);
  overflow:hidden;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;

  transform: translateZ(0);
  backface-visibility: hidden;
}

.product-card:hover{
  transform: translate3d(0,-2px,0);
  border-color: rgba(31,111,255,.22);
  box-shadow: 0 16px 34px rgba(31,111,255,.10);
}

/* layar super kecil: 1 kolom */
@media (max-width: 360px){
  .product-card{
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Desktop: card fixed width biar baris yang kurang item tetap center */
@media (min-width: 720px){
  .grid{ gap: 16px; }
  .product-card{
    flex: 0 1 300px;
    max-width: 300px;
  }
}

/* Desktop besar: sedikit lebih lebar */
@media (min-width: 1400px){
  .product-card{
    flex-basis: 320px;
    max-width: 320px;
  }
}

/* image 3:2 */
.thumb{
  aspect-ratio: 3 / 2;
  background: linear-gradient(180deg, rgba(31,111,255,.08), rgba(255,255,255,.95));
  border-bottom: 1px solid rgba(10,30,60,.08);
  overflow:hidden;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.thumb-fallback{
  height:100%;
  display:grid;
  place-items:center;
  font-family:"Space Grotesk";
  font-weight:700;
  color: rgba(11,22,48,.70);
}
.thumb-fallback small{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31,111,255,.18);
  background: rgba(255,255,255,.82);
}

/* body card */
.pbody{
  padding: 10px 10px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height: 138px;
}

.ptop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
}

.ptitle{
  margin:0;
  font-weight:800;
  font-size:13.5px;
  line-height:1.25;
  letter-spacing:-.01em;
}
.psub{
  margin:4px 0 0 0;
  font-size:12px;
  line-height:1.35;
  color:var(--muted);
}

.badge{
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  padding: 6px 9px;
  border-radius: 999px;
  border:1px solid rgba(31,111,255,.18);
  background: rgba(31,111,255,.10);
  color: rgba(11,22,48,.86);
  white-space:nowrap;
}
.badge.ready{background: rgba(70,200,140,.12); border-color: rgba(70,200,140,.20)}
.badge.promo{background: rgba(31,111,255,.12); border-color: rgba(31,111,255,.22)}
.badge.sold{background: rgba(255,80,80,.10); border-color: rgba(255,80,80,.20)}

.tags{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.tag{
  font-size:10.5px;
  padding: 6px 8px;
  border-radius: 999px;
  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.82);
  color: rgba(11,22,48,.72);
  font-weight:800;
}

.priceRow{
  margin-top:auto;
  padding-top: 8px;
  border-top: 1px solid rgba(10,30,60,.08);
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:10px;
}
.priceLabel{font-size:11px; color:var(--muted); font-weight:700}
.price{
  font-weight:900;
  font-size:14px;
  letter-spacing:-.01em;
}
.cardHint{
  font-size:11px;
  font-weight:800;
  color: rgba(31,111,255,.85);
  white-space:nowrap;
}

/* ===== generic card (checkout/howto) ===== */
.card{
  border-radius: var(--r2);
  background: rgba(255,255,255,.78);
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  padding: 14px;
}

/* checkout layout */
.checkout .grid-2{
  display:grid; grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px){
  .checkout .grid-2{grid-template-columns: 1.25fr .75fr;}
}
.hidden{display:none !important}

.prod-head{display:flex; gap:12px; align-items:flex-start;}
.prod-logo{
  width:50px; height:50px; border-radius: 18px;
  display:grid; place-items:center;
  background: rgba(31,111,255,.10);
  border:1px solid rgba(31,111,255,.18);
  font-weight:900;
  font-family:"Space Grotesk";
}
.prod-cover{
  margin-top: 12px;
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.75);
  aspect-ratio: 3 / 2;
}
.prod-cover img{width:100%; height:100%; object-fit:cover; display:block;}

.row{display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-top: 12px;}
.kv{
  padding: 12px;
  border-radius: 18px;
  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.84);
}
.k{font-size:12px; color:var(--muted); font-weight:800;}
.v{margin-top:6px; font-weight:900;}

.block{margin-top: 14px;}
.variants{display:grid; gap:10px; margin-top: 10px;}
.variant{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 12px;
  border-radius: 18px;
  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.84);
  cursor:pointer;
}
.variant.active{
  border-color: rgba(31,111,255,.26);
  background: rgba(31,111,255,.08);
}
.v-left{display:flex; gap:10px; align-items:center;}
.radio{
  width:16px; height:16px; border-radius:999px;
  border:2px solid rgba(31,111,255,.35);
  display:inline-block;
  position:relative;
}
.variant.active .radio::after{
  content:"";
  width:8px; height:8px; border-radius:999px;
  background: var(--blue);
  position:absolute; inset:0; margin:auto;
}
.v-title{font-weight:900}
.v-sub{font-size:12px; color:var(--muted); margin-top:2px}

.info{margin:10px 0 0 0; padding-left: 18px; color: rgba(11,22,48,.78);}
.info li{margin:6px 0}

.faq{display:grid; gap:10px; margin-top:10px;}
.faqitem{
  padding: 12px;
  border-radius: 18px;
  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.84);
}
.faqq{font-weight:900}
.faqq + .muted{margin-top:6px}

.btn{
  display:inline-flex; justify-content:center; align-items:center; gap:10px;
  padding: 12px 14px;
  border-radius: 16px;
  border:1px solid rgba(10,30,60,.12);
  background: rgba(255,255,255,.92);
  text-decoration:none;
  color: var(--text);
  font-weight:900;
  cursor:pointer;
}
.btn.primary{
  border-color: rgba(31,111,255,.25);
  background: linear-gradient(180deg, rgba(31,111,255,.14), rgba(255,255,255,.92));
}
.cta-row{display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px;}

.summary-title{
  font-family:"Space Grotesk";
  font-weight:700;
  margin-bottom: 10px;
}
.summary-row{display:flex; justify-content:space-between; gap:10px; margin:8px 0}
.divider{height:1px; background: rgba(10,30,60,.10); margin: 12px 0}
.promo-box{
  margin-top:12px;
  border-radius: 18px;
  padding: 12px;
  border:1px solid rgba(31,111,255,.18);
  background: rgba(31,111,255,.06);
}
.promo-title{font-weight:900}

/* modal */
.modal{position:fixed; inset:0; display:none; z-index:100}
.modal.show{display:block}
.modal-backdrop{position:absolute; inset:0; background: rgba(0,0,0,.28)}
.modal-card{
  position:relative;
  width:min(520px, calc(100% - 24px));
  margin: 78px auto;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  border:1px solid rgba(10,30,60,.12);
  box-shadow: 0 26px 70px rgba(0,0,0,.20);
  overflow:hidden;
}
.modal-head{
  padding: 12px 14px;
  display:flex; justify-content:space-between; align-items:center;
  border-bottom: 1px solid rgba(10,30,60,.08);
}
.modal-title{font-weight:900}
.modal-body{padding: 14px}
.field{display:grid; gap:8px; margin-bottom: 12px;}
.input{
  border:1px solid rgba(10,30,60,.12);
  background: rgba(255,255,255,.92);
  padding: 12px 12px;
  border-radius: 14px;
  outline:none;
}

/* bottom nav */
.bottomnav{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(10,30,60,.10);
  display:flex;
  justify-content:space-around;
  padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
}
.bn-item{
  text-decoration:none; color: rgba(11,22,48,.72);
  display:flex; flex-direction:column; gap:6px; align-items:center;
  font-size:12px; font-weight:900;
}
.bn-item .bn-ic{font-size:16px}
.bn-item.active{color: var(--blue)}

/* Category button in controls */
.controls-left{display:flex; gap:10px; align-items:center;}
.chipBtn{
  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.86);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
  white-space:nowrap;
}
.chipBtn b{font-family:"Space Grotesk";}

/* Category list (modal) */
.catList{display:grid; gap:10px;}
.catItem{
  display:flex; justify-content:space-between; align-items:center;
  padding: 12px;
  border-radius: 16px;
  border:1px solid rgba(10,30,60,.10);
  background: rgba(255,255,255,.92);
  cursor:pointer;
  font-weight:900;
}
.catItem.active{
  border-color: rgba(31,111,255,.26);
  background: rgba(31,111,255,.08);
}
.catItem .tick{
  width:18px; height:18px; border-radius:999px;
  border:2px solid rgba(31,111,255,.35);
  display:inline-block;
  position:relative;
}
.catItem.active .tick::after{
  content:"";
  width:10px; height:10px; border-radius:999px;
  background: #1f6fff;
  position:absolute; inset:0; margin:auto;
}
