:root{
  --bg:#ffffff;
  --muted:#f3f4f6;
  --text:#111827;
  --sub:#6b7280;
  --line:#e5e7eb;
  --shadow:0 10px 30px rgba(0,0,0,.06);
  --radius:14px;
  --red:#ff1a1a;
  --dark:#0f172a;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:var(--bg);
  color:var(--text);
}

/* ================= HEADER ================= */

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:#fff;
  border-bottom:1px solid var(--line);
}

.topbar__inner{
  height:64px;
  display:flex;
  align-items:center;
  gap:18px;
  padding:0 18px;
  max-width:1240px;
  margin:0 auto;
}

.brand{
  display:flex;
  align-items:center;
}

.brand__logo{
  width:54px;
  height:54px;
  object-fit:contain;
}

.nav{
  display:flex;
  align-items:center;
  gap:8px;
}

.nav__burger{
  width:34px;
  height:34px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:10px;
  display:grid;
  place-content:center;
  gap:3px;
  cursor:pointer;
}

.nav__burger span{
  display:block;
  width:14px;
  height:2px;
  background:#111;
  border-radius:2px;
}

.nav__link{
  text-decoration:none;
  color:var(--text);
  font-weight:600;
}

.nav__chev{font-size:12px;color:var(--sub)}

.search{
  flex:1;
  display:flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:999px;
  overflow:hidden;
  min-width:260px;
}

.search__filter{
  padding:10px 14px;
  border-right:1px solid var(--line);
  font-weight:600;
  font-size:14px;
  white-space:nowrap;
}

.search__chev{font-size:12px;color:var(--sub)}

.search__input{
  border:0;
  outline:0;
  padding:10px 14px;
  width:100%;
  font-size:14px;
}

.region{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  padding:8px 10px;
  border-radius:999px;
  background:#fff;
  white-space:nowrap;
}
.region__text{font-weight:700}
.region__chev{font-size:12px;color:var(--sub)}

/* ================= LAYOUT ================= */

.page{
  padding:25px 0 40px;
}

.container{
  max-width:1240px;
  margin:0 auto;
  padding:0 18px;
}

.grid{
  display:grid;
  grid-template-columns:420px 1fr 360px;
  gap:26px;
  align-items:start;
}

.gallery{ grid-column:1; }
.middle{ grid-column:2; }
.buybox{ grid-column:3; }

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

/* ================= GALLERY ================= */

.gallery{
  padding:18px;
  position:relative;
}

.gallery__fav{
  position:absolute;
  top:14px;
  right:14px;
  width:34px;height:34px;
  display:grid;
  place-content:center;
  border:1px solid var(--line);
  border-radius:50%;
  background:#fff;
  color:#9ca3af;
  font-weight:700;
}

.gallery__main{
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--muted);
}

.gallery__main img{
  width:100%;
  height:300px;
  object-fit:cover;
  display:block;
}

.gallery__thumbs{
  display:flex;
  gap:10px;
  margin-top:12px;
  overflow:auto;
  padding-bottom:2px;
  -webkit-overflow-scrolling: touch;
}

.thumb{
  width:70px;
  height:56px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--line);
  cursor:pointer;
  padding:0;
  background:#fff;
  flex:0 0 auto;
}

.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.thumb.is-active{
  outline:2px solid #111;
  outline-offset:1px;
}

.gallery__desc{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--line);
  font-size:13px;
  line-height:1.6;
  color:var(--sub);
}

/* ================= MIDDLE ================= */

.vendor{
  color:var(--sub);
  font-size:12px;
  font-weight:700;
  margin-bottom:6px;
}

.title{
  font-size:22px;
  font-weight:800;
  margin:0 0 10px;
}

.meta{
  color:var(--sub);
  font-size:13px;
  margin-bottom:10px;
}

.price{
  font-size:26px;
  font-weight:900;
  margin-bottom:8px;
}

.rating{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:13px;
  color:var(--sub);
  margin-bottom:14px;
  flex-wrap:wrap;
}

.stars{
  display:flex;
  gap:2px;
  color:#111;
  font-size:14px;
}
.stars .dim{color:#d1d5db}

.rating__text{font-weight:700}

.rating__link{
  color:#111;
  font-weight:700;
  text-decoration:underline;
}

.powered{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:13px;
  color:var(--sub);
  margin-bottom:10px;
}

.powered__link{
  color:#111;
  font-weight:800;
  text-decoration:none;
}

.imported{
  display:flex;
  align-items:center;
  gap:12px;
  margin:10px 0 16px;
  font-size:13px;
  color:var(--sub);
}

.imported__logo{
  width:64px;
  height:64px;
  border-radius:10px;
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  line-height:1;
  background:#fff;
}

.option{
  padding:14px 16px;
  margin-bottom:14px;
}

.option__row{
  display:flex;
  gap:8px;
  font-size:13px;
}

.option__label{color:var(--sub);font-weight:700}
.option__value{color:#111;font-weight:900}

.shipnote{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:10px 0 18px;
  border-bottom:1px solid var(--line);
  margin-bottom:14px;
}

.shipnote__icons{
  display:flex;
  gap:10px;
  padding-top:2px;
}

.shipnote__text{
  font-size:13px;
  color:var(--sub);
  line-height:1.5;
}

.shipnote__ok{
  margin-top:6px;
  color:#111;
}

/* ================= PAYMENTS ================= */

.payments{
  padding:16px;
}

.payments__row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
}

.payments__row.small{
  margin-top:10px;
}

.bank{
  width:90px;
  height:45px;
  border:1px solid var(--line);
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  padding:6px;
  transition:all .2s ease;
}

.bank img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
}

.bank.is-active{
  outline:2px solid #a855f7;
  outline-offset:2px;
}

/* ================= BUYBOX ================= */

.buybox{
  padding:18px;
  position:sticky;
  top:96px;
}

.buybox__price{
  font-size:28px;
  font-weight:900;
  margin-bottom:10px;
}

.buybox__text{
  font-size:13px;
  line-height:1.6;
  color:var(--sub);
  margin-bottom:12px;
}

.buybox__reviews{
  color:var(--sub);
  font-size:13px;
  margin-bottom:14px;
}

.buybox__new{
  font-size:13px;
  margin-bottom:6px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.buybox__loginhint{
  color:#7c3aed;
  font-weight:800;
  text-decoration:underline;
}

.buybox__sub{
  color:#111;
  font-weight:700;
  font-size:13px;
  margin-bottom:14px;
}

.qty{
  display:flex;
  width:130px;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  margin-bottom:14px;
}

.qty__btn{
  width:40px;
  border:0;
  background:#fff;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}

.qty__input{
  width:50px;
  border:0;
  outline:0;
  text-align:center;
  font-weight:800;
}

.btn{
  display:block;
  width:100%;
  text-align:center;
  padding:12px;
  border-radius:10px;
  text-decoration:none;
  font-weight:900;
  margin-bottom:10px;
}

.btn--dark{
  background:var(--dark);
  color:#fff;
}

.btn--red{
  background:var(--red);
  color:#111;
}

.keywords{
  margin-top:12px;
  border-top:1px solid var(--line);
  padding-top:12px;
}

.keywords__title{
  color:#16a34a;
  font-weight:900;
  font-style:italic;
  margin-bottom:10px;
}

.keywords__list{
  margin:0;
  padding-left:18px;
  font-size:13px;
  line-height:1.8;
}

/* ================= RESPONSIVE ================= */

/* laptop kecil */
@media (max-width:1100px){
  .grid{
    grid-template-columns:380px 1fr 320px;
  }
  .brand__logo{
    width:48px;
    height:48px;
  }
}

/* ================= MOBILE FIX RAPiH ================= */
@media (max-width:700px){
  .page{ padding:14px 0 26px; }
  .container{ padding:0 12px; }

  /* header jadi rapih 2 baris */
  .topbar__inner{
    height:auto;
    padding:10px 12px;
    flex-wrap:wrap;
    gap:10px;
  }

  .brand{
    order:1;
  }
  .nav{
    order:2;
    margin-left:auto;
  }
  .region{
    order:3;
    margin-left:auto;
  }

  /* search full width di baris bawah */
  .search{
    order:4;
    width:100%;
    min-width:0;
  }

  /* grid jadi 1 kolom */
  .grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .gallery, .middle, .buybox{
    grid-column:auto;
  }

  /* buybox jangan sticky di mobile */
  .buybox{
    position:static;
    padding:16px;
  }

  /* gambar utama lebih proporsional di hp */
  .gallery{
    padding:14px;
  }
  .gallery__main img{
    height:240px;
  }

  /* thumbnails scroll rapi */
  .gallery__thumbs{
    gap:8px;
  }
  .thumb{
    width:64px;
    height:52px;
  }

  /* judul & spacing middle */
  .title{
    font-size:18px;
    line-height:1.25;
  }
  .price{
    font-size:22px;
  }

  /* payments logo biar muat */
  .payments{
    padding:14px;
  }
  .bank{
    width:78px;
    height:40px;
    padding:5px;
  }

  /* qty & button rapi */
  .qty{
    width:150px;
  }
  .btn{
    padding:12px 14px;
  }

  /* keyword list jangan kepanjangan */
  .keywords__list{
    max-height:160px;
    overflow:auto;
  }
}
