/* =========================================================
   ThriftFlow — Storefront (toko publik)
   Memakai token warna dari style.css (biru-putih + dark)
   ========================================================= */

body.store { background: var(--bg); }
.store-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; width: 100%; }
.btn-lg { padding: 13px 24px; font-size: 1rem; border-radius: 13px; }

/* ---------- Header ---------- */
.store-header { position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.store-header-inner { display: flex; align-items: center; gap: 16px; padding: 12px 20px; max-width: 1180px; margin: 0 auto; }
.store-brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.store-brand:hover { text-decoration: none; }
.store-brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.store-search { flex: 1; max-width: 460px; position: relative; display: flex; align-items: center; }
.store-search svg { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--text-soft); pointer-events: none; }
.store-search input { padding-left: 40px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.store-search input:focus { background: var(--surface); }
.store-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cart-btn { position: relative; }
.cart-btn .count { position: absolute; top: -5px; right: -5px; background: var(--primary); color: #fff;
  font-size: .66rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px;
  display: grid; place-items: center; border: 2px solid var(--surface); }
@media (max-width: 600px){ .store-brand-name { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; margin-bottom: 8px;
  background:
    linear-gradient(120deg, rgba(110,70,52,.94), rgba(201,139,133,.86)),
    var(--hero-img, none); background-size: cover; background-position: center; }
.hero::after { content:""; position:absolute; inset:0;
  background: radial-gradient(700px 340px at 82% 8%, rgba(255,255,255,.20), transparent 60%); }
.hero-inner { position: relative; padding: 64px 20px 72px; }
.hero-text { max-width: 620px; color: #fff; position: relative; }
.hero-eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(255,255,255,.16); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; font-weight: 900; margin: 0 0 14px; letter-spacing: -.02em; }
.hero-text p { font-size: 1.08rem; color: rgba(255,255,255,.9); margin: 0 0 26px; max-width: 500px; }
.hero .btn-primary { background: #fff; color: var(--primary-strong); }
.hero .btn-primary:hover { background: #eaf1ff; }

/* ---------- Category chips ---------- */
.cat-chips { display: flex; gap: 9px; overflow-x: auto; padding: 20px 0 6px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: .88rem; color: var(--text-muted); }
.chip:hover { color: var(--text); text-decoration: none; border-color: var(--border-strong); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Sections ---------- */
.section { padding: 24px 0; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-head h2 { font-size: 1.3rem; margin: 0; }
.section-head .spacer { margin-left: auto; }
.sort-form select { padding: 8px 30px 8px 12px; border-radius: 10px; font-size: .86rem; }

/* ---------- Product grid & card ---------- */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px){ .pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px){ .pgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .18s; box-shadow: var(--shadow); }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.pcard-img { display: block; position: relative; aspect-ratio: 1/1; background: var(--surface-2); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-soft); }
.pcard-noimg svg { width: 44px; height: 44px; }
.pcard-badge { position: absolute; top: 10px; font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.pcard-badge.sale { left: 10px; background: var(--danger); color: #fff; }
.pcard-badge.out { right: 10px; background: rgba(15,23,42,.72); color: #fff; }
.pcard-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-cat { font-size: .72rem; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pcard-name { font-weight: 650; font-size: .94rem; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-name:hover { color: var(--primary-strong); text-decoration: none; }
.pcard-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 4px; }
.pcard-price .now { font-weight: 800; font-size: 1.02rem; color: var(--text); }
.pcard-price .was { font-size: .82rem; color: var(--text-soft); text-decoration: line-through; }
.pcard .add-cart { margin-top: 8px; }

/* ---------- Product detail ---------- */
.crumbs { font-size: .82rem; color: var(--text-soft); padding: 18px 0 4px; }
.crumbs a { color: var(--text-muted); }
.pdetail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 12px 0 8px; }
@media (max-width: 820px){ .pdetail { grid-template-columns: 1fr; gap: 20px; } }
.pdetail-img { position: relative; aspect-ratio: 1/1; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); }
.pdetail-img img { width: 100%; height: 100%; object-fit: cover; }
.pdetail-thumb { margin-top: 12px; width: 90px; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.pdetail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdetail-info h1 { font-size: 1.7rem; margin: 6px 0 12px; }
.pdetail-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.pdetail-price .now { font-size: 1.9rem; font-weight: 900; color: var(--primary-strong); }
.pdetail-price .was { font-size: 1.05rem; color: var(--text-soft); text-decoration: line-through; }
.pdetail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pdetail-desc { color: var(--text-muted); line-height: 1.65; margin-bottom: 22px; font-size: .95rem; }
.pdetail-actions { display: flex; gap: 12px; align-items: stretch; }
.qty-box { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; flex: none; }
.qty-box input { width: 52px; text-align: center; border: none; border-radius: 0; padding: 10px 0; -moz-appearance: textfield; }
.qty-box input::-webkit-outer-spin-button, .qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { width: 42px; border: none; background: var(--surface-2); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.qty-btn:hover { background: var(--surface-3); }

/* ---------- Cart & checkout ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; padding-bottom: 40px; }
@media (max-width: 820px){ .cart-layout { grid-template-columns: 1fr; } }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; align-items: center; }
.cart-item img { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.cart-item .ci-noimg { width: 74px; height: 74px; border-radius: 10px; background: var(--surface-2); flex: none; display:grid; place-items:center; color: var(--text-soft); }
.cart-item .ci-main { flex: 1; min-width: 0; }
.cart-item .ci-name { font-weight: 650; font-size: .94rem; }
.cart-item .ci-var { font-size: .76rem; color: var(--primary-strong); font-weight: 600; margin-top: 1px; }
.cart-item .ci-price { color: var(--text-muted); font-size: .84rem; margin-top: 2px; }
.cart-item .ci-remove { background: none; border: none; color: var(--text-soft); cursor: pointer; font-size: .8rem; padding: 2px 4px; }
.cart-item .ci-remove:hover { color: var(--danger); }
.cart-item .qty-box { transform: scale(.92); }
.cart-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: sticky; top: 84px; }
.cart-summary h3 { margin: 0 0 16px; font-size: 1.05rem; }
.cart-summary .row-between { padding: 5px 0; font-size: .92rem; }
.cart-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px !important;
  font-weight: 800; font-size: 1.15rem; }
.cart-total span:last-child { color: var(--primary-strong); }
.co-items { display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 6px; }
.co-item { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; }
.co-item .n { color: var(--text-muted); }

/* ---------- Order success ---------- */
.order-success { text-align: center; padding: 32px 0 8px; }
.order-check { width: 76px; height: 76px; border-radius: 50%; background: var(--success-soft); color: var(--success);
  display: grid; place-items: center; margin: 0 auto 18px; }
.order-check svg { width: 38px; height: 38px; }
.order-success h1 { font-size: 1.5rem; margin: 0 0 8px; }

/* ---------- Footer ---------- */
.store-footer { border-top: 1px solid var(--border); margin-top: 40px; background: var(--surface); }
.store-footer-inner { display: flex; justify-content: space-between; gap: 24px; padding: 36px 20px 24px; flex-wrap: wrap; }
.store-foot-links { display: flex; gap: 18px; align-items: flex-start; }
.store-foot-links a { color: var(--text-muted); font-weight: 600; font-size: .9rem; }
.store-copy { padding: 0 20px 28px; color: var(--text-soft); font-size: .82rem; }
.btn-block.mt-8 { margin-top: 8px; }

/* ---------- Halaman info (Tentang/FAQ/Cara Order/Kebijakan) ---------- */
.info-page { padding-bottom: 48px; max-width: 860px; }
.info-hero { padding: 18px 0 22px; }
.info-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 12px 0 8px; }
.info-hero .lead { color: var(--text-muted); font-size: 1.05rem; max-width: 620px; }
.prose { color: var(--text); line-height: 1.7; }
.prose h3 { margin: 26px 0 10px; font-size: 1.2rem; }
.prose h4 { margin: 0 0 6px; }
.prose p { margin: 0 0 14px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 16px; }
.faq-item summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--text-soft); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--text-muted); padding: 0 0 14px; margin: 0; }
.steps { display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; align-items: flex-start; }
.step-no { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--primary-soft); color: var(--primary-strong); font-family: var(--font-display); }
.step h4 { margin: 4px 0 4px; }
.step p { margin: 0; }
.store-foot-cols { display: flex; gap: 40px; flex-wrap: wrap; }
.store-foot-links { display: flex; flex-direction: column; gap: 8px; }
.foot-title { font-weight: 700; font-size: .82rem; color: var(--text); margin-bottom: 2px; }

/* ---------- Promo bar ---------- */
.promo-bar { display: block; text-align: center; color: #fff; font-weight: 600; font-size: .86rem;
  padding: 9px 16px; background: linear-gradient(90deg, var(--primary), var(--rose)); }
.promo-bar:hover { text-decoration: none; filter: brightness(1.05); }

/* ---------- Wishlist heart di kartu ---------- */
.pcard .wish-btn { position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text-muted);
  display: grid; place-items: center; box-shadow: var(--shadow); backdrop-filter: blur(4px); }
.pcard .wish-btn:hover { color: var(--rose); }
.wish-btn.on { color: var(--rose) !important; }
.wish-btn.on svg { fill: var(--rose); }

/* ---------- Bintang rating ---------- */
.stars { color: #d9c6b6; font-size: .9rem; letter-spacing: 1px; white-space: nowrap; }
.stars .on { color: #e0a72e; }
.stars-lg { font-size: 1.15rem; }
.pcard-rating { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.pcard-rating .rc { color: var(--text-soft); }
.review-item p { line-height: 1.6; }

.rating-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; font-size: 1.8rem; gap: 3px; }
.rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-input label { color: #d9c6b6; cursor: pointer; transition: color .1s; }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: #e0a72e; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 4px 0 4px; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.filter-group input, .filter-group select { padding: 8px 11px; }

/* Tombol WhatsApp mengambang */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 120;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: transform .15s; }
.wa-float:hover { transform: scale(1.08); text-decoration: none; }

