/* ============================================================
   PLENBI Store — Design System CSS
   Plenbi Narrative / Soft Heritage aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block');

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

:root {
  --bg:           #fff8f8;
  --surface:      #ffffff;
  --surface-low:  #fff0f3;
  --surface-ctn:  #fbeaed;
  --surface-high: #f5e4e8;
  --surface-top:  #efdee2;
  --on-surface:   #22191c;
  --on-surface-2: #534248;
  --outline:      #867278;
  --outline-v:    #d9c0c7;
  --primary:      #973b65;
  --primary-lt:   #b5537e;
  --primary-ctn:  #ffd9e5;
  --on-primary:   #ffffff;
  --sec-ctn:      #ffcddb;
  --error:        #ba1a1a;
  --shadow:       0 2px 12px rgba(151,59,101,0.08);
  --nav-h:        64px;
  --header-h:     56px;
  --radius:       8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-pill:  9999px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Plus Jakarta Sans',sans-serif;
  background:var(--bg);color:var(--on-surface);
  line-height:1.6;-webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button{font-family:inherit;cursor:pointer}

/* ---- Type ---- */
h1,h2,h3,.serif{font-family:'EB Garamond',serif;font-weight:500}

/* ---- Layout ---- */
.container{max-width:480px;margin:0 auto;padding:0 16px}
.page-pad{padding-top:16px;padding-bottom:calc(var(--nav-h)+20px)}

/* ---- Top Header ---- */
.store-header{
  position:sticky;top:0;z-index:100;
  background:rgba(255,248,248,0.95);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--outline-v);
  height:var(--header-h);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 16px;
}
.store-logo{
  font-family:'EB Garamond',serif;font-size:1.5rem;font-weight:600;
  color:var(--primary);letter-spacing:0.06em;
}
.header-actions{display:flex;gap:4px;align-items:center}
.icon-btn{
  position:relative;width:40px;height:40px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--on-surface);border:none;background:transparent;
  transition:background 0.15s;
}
.icon-btn:hover{background:var(--surface-ctn)}
.cart-badge{
  position:absolute;top:4px;right:4px;
  min-width:16px;height:16px;padding:0 4px;
  background:var(--primary);color:#fff;
  font-size:9px;font-weight:700;border-radius:99px;
  display:none;align-items:center;justify-content:center;
}
.cart-badge.on{display:flex}

/* ---- Bottom Nav ---- */
.bottom-nav{
  position:fixed;bottom:0;left:0;right:0;z-index:100;
  height:var(--nav-h);
  background:var(--surface);border-top:1px solid var(--outline-v);
  display:flex;
}
.bottom-nav a{
  flex:1;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:3px;
  color:var(--outline);font-size:10px;font-weight:600;
  transition:color 0.15s;position:relative;
}
.bottom-nav a .material-symbols-rounded{font-size:22px;line-height:1}
.bottom-nav a.active,.bottom-nav a:hover{color:var(--primary)}
.nav-badge{
  position:absolute;top:8px;left:calc(50% + 4px);
  min-width:16px;height:16px;padding:0 4px;
  background:var(--primary);color:#fff;
  font-size:9px;font-weight:700;border-radius:99px;
  display:none;align-items:center;justify-content:center;
}
.nav-badge.on{display:flex}

/* ---- Buttons ---- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:none;border-radius:var(--radius-pill);
  padding:0 28px;height:48px;
  font-family:'Plus Jakarta Sans',sans-serif;font-size:0.9rem;font-weight:700;
  cursor:pointer;transition:all 0.15s;text-decoration:none;
}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-lt)}
.btn-outline{background:transparent;color:var(--primary);border:1.5px solid var(--primary)}
.btn-outline:hover{background:var(--primary-ctn)}
.btn-ghost{background:var(--surface-high);color:var(--on-surface)}
.btn-ghost:hover{background:var(--surface-top)}
.btn-full{width:100%}
.btn-sm{height:36px;padding:0 16px;font-size:0.8rem}

/* ---- Product Card ---- */
.product-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.product-card{
  display:block;background:var(--surface);
  border-radius:var(--radius-lg);overflow:hidden;
  box-shadow:var(--shadow);transition:transform 0.15s;
}
.product-card:hover{transform:translateY(-2px)}
.product-img-wrap{
  position:relative;width:100%;aspect-ratio:3/4;
  overflow:hidden;background:var(--surface-ctn);
}
.product-img-wrap img{width:100%;height:100%;object-fit:cover}
.product-no-img{
  width:100%;height:100%;
  display:flex;align-items:center;justify-content:center;
  font-family:'EB Garamond',serif;font-size:2.5rem;color:var(--primary-lt);
}
.badge{
  position:absolute;top:8px;left:8px;
  padding:3px 10px;border-radius:var(--radius-pill);
  font-size:10px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;
}
.badge-new{background:var(--sec-ctn);color:var(--primary)}
.badge-pre{background:var(--surface-top);color:var(--on-surface-2)}
.product-info{padding:10px 12px 14px}
.product-name{font-size:0.82rem;font-weight:700;line-height:1.3;margin-bottom:4px}
.product-price{font-family:'EB Garamond',serif;font-size:1.05rem;color:var(--primary)}

/* ---- Hero ---- */
.hero{
  background:linear-gradient(150deg,var(--surface-ctn) 0%,var(--surface-low) 100%);
  padding:40px 16px 36px;text-align:center;
}
.hero-tag{
  display:inline-block;padding:4px 16px;
  background:var(--sec-ctn);color:var(--primary);
  border-radius:var(--radius-pill);
  font-size:0.7rem;font-weight:700;letter-spacing:0.1em;text-transform:uppercase;
  margin-bottom:16px;
}
.hero h1{font-size:2rem;line-height:1.15;letter-spacing:0.02em;margin-bottom:12px}
.hero p{font-size:0.875rem;color:var(--on-surface-2);margin-bottom:24px}

/* ---- Features ---- */
.feature-list{display:flex;flex-direction:column;gap:10px}
.feature-item{
  display:flex;align-items:flex-start;gap:14px;
  padding:14px;background:var(--surface);
  border-radius:var(--radius-lg);border:1px solid var(--outline-v);
}
.feature-icon{
  width:44px;height:44px;flex-shrink:0;
  background:var(--primary-ctn);border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;color:var(--primary);
}
.feature-item h4{font-size:0.875rem;font-weight:700;margin-bottom:2px}
.feature-item p{font-size:0.78rem;color:var(--on-surface-2)}

/* ---- Steps ---- */
.steps{display:flex;flex-direction:column}
.step-item{display:flex;gap:14px;padding-bottom:20px;position:relative}
.step-item:not(:last-child)::before{
  content:'';position:absolute;
  left:19px;top:42px;bottom:0;width:2px;
  background:var(--outline-v);
}
.step-num{
  width:40px;height:40px;flex-shrink:0;
  border-radius:50%;background:var(--primary);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:0.85rem;z-index:1;
}
.step-body{flex:1;padding-top:8px}
.step-body h4{font-size:0.875rem;font-weight:700;margin-bottom:3px}
.step-body p{font-size:0.78rem;color:var(--on-surface-2)}

/* ---- Section ---- */
.section{padding:24px 0}
.section-title{
  font-family:'EB Garamond',serif;font-size:1.5rem;
  letter-spacing:0.02em;margin-bottom:16px;
}
.section-header{
  display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;
}
.section-header a{font-size:0.8rem;color:var(--primary);font-weight:600}
hr.divider{border:none;border-top:1px solid var(--outline-v);margin:0}

/* ---- Chips / Category Filter ---- */
.cat-scroll{
  display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;
  scrollbar-width:none;
}
.cat-scroll::-webkit-scrollbar{display:none}
.cat-chip{
  flex-shrink:0;padding:6px 16px;border-radius:var(--radius-pill);
  background:var(--surface);border:1.5px solid var(--outline-v);
  font-size:0.8rem;font-weight:600;color:var(--on-surface-2);
  cursor:pointer;transition:all 0.15s;white-space:nowrap;
}
.cat-chip.active,.cat-chip:hover{
  background:var(--primary);color:#fff;border-color:var(--primary);
}

/* ---- Detail Produk ---- */
.product-gallery{
  width:100%;aspect-ratio:4/3;
  background:var(--surface-ctn);overflow:hidden;
}
.product-gallery img{width:100%;height:100%;object-fit:cover}
.gallery-thumbs{
  display:flex;gap:8px;padding:12px 16px;overflow-x:auto;
  scrollbar-width:none;
}
.gallery-thumbs::-webkit-scrollbar{display:none}
.thumb{
  width:56px;height:56px;flex-shrink:0;border-radius:var(--radius);
  overflow:hidden;border:2px solid transparent;cursor:pointer;
}
.thumb.active{border-color:var(--primary)}
.thumb img{width:100%;height:100%;object-fit:cover}
.size-selector{display:flex;flex-wrap:wrap;gap:8px}
.size-chip{
  padding:8px 16px;border-radius:var(--radius);
  border:1.5px solid var(--outline-v);
  font-size:0.85rem;font-weight:600;cursor:pointer;
  transition:all 0.15s;background:var(--surface);
}
.size-chip:hover,.size-chip.selected{
  border-color:var(--primary);background:var(--primary-ctn);color:var(--primary);
}
.size-chip.out{opacity:0.4;cursor:not-allowed}
.qty-ctrl{display:flex;align-items:center;gap:12px}
.qty-btn{
  width:36px;height:36px;border-radius:50%;
  border:1.5px solid var(--outline-v);background:var(--surface);
  display:flex;align-items:center;justify-content:center;
  font-size:1.1rem;font-weight:700;color:var(--primary);cursor:pointer;
  transition:background 0.15s;
}
.qty-btn:hover{background:var(--surface-ctn)}
.qty-num{font-size:1rem;font-weight:700;min-width:28px;text-align:center}

/* ---- Cart ---- */
.cart-item{
  display:flex;gap:12px;padding:14px 0;
  border-bottom:1px solid var(--outline-v);align-items:flex-start;
}
.cart-img{
  width:64px;height:80px;flex-shrink:0;
  border-radius:var(--radius);overflow:hidden;background:var(--surface-ctn);
}
.cart-img img{width:100%;height:100%;object-fit:cover}
.cart-item-body{flex:1}
.cart-item-name{font-size:0.875rem;font-weight:700;margin-bottom:3px}
.cart-item-size{font-size:0.78rem;color:var(--on-surface-2);margin-bottom:6px}
.cart-item-price{font-size:0.9rem;font-weight:700;color:var(--primary)}
.cart-qty-ctrl{display:flex;align-items:center;gap:8px;margin-top:8px}
.cart-qty-btn{
  width:28px;height:28px;border-radius:50%;
  border:1.5px solid var(--outline-v);background:var(--surface);
  display:flex;align-items:center;justify-content:center;
  font-size:0.9rem;font-weight:700;color:var(--primary);cursor:pointer;
}
.cart-qty-num{font-size:0.875rem;font-weight:700;min-width:20px;text-align:center}
.btn-del{background:none;border:none;color:var(--error);padding:4px;display:flex}
.cart-empty{text-align:center;padding:64px 24px}
.cart-empty-icon{font-size:52px;color:var(--outline-v);margin-bottom:16px}
.cart-empty h3{font-family:'EB Garamond',serif;font-size:1.4rem;margin-bottom:8px}
.cart-empty p{font-size:0.875rem;color:var(--on-surface-2);margin-bottom:24px}

/* ---- Summary ---- */
.price-summary{margin-top:16px}
.price-row{
  display:flex;justify-content:space-between;
  font-size:0.875rem;color:var(--on-surface-2);padding:6px 0;
}
.price-row.total{
  font-size:1rem;font-weight:700;color:var(--on-surface);
  border-top:1px solid var(--outline-v);padding-top:12px;margin-top:6px;
}
.price-row.total .amount{color:var(--primary)}

/* ---- Form (Checkout) ---- */
.form-group{margin-bottom:16px}
.form-label{
  display:block;font-size:0.82rem;font-weight:700;
  margin-bottom:6px;color:var(--on-surface);
}
.req{color:var(--error)}
.form-input,.form-textarea{
  width:100%;padding:12px 16px;
  background:var(--surface);border:1.5px solid var(--outline-v);
  border-radius:var(--radius);color:var(--on-surface);
  font-family:'Plus Jakarta Sans',sans-serif;font-size:0.9rem;
  transition:border-color 0.15s;outline:none;
}
.form-input:focus,.form-textarea:focus{border-color:var(--primary)}
.form-textarea{resize:vertical;min-height:80px;line-height:1.5}
.input-wrap{position:relative}
.input-spinner{
  position:absolute;top:50%;right:14px;transform:translateY(-50%);
  display:none;
}
.input-spinner.on{display:block}

/* ---- Lookup ---- */
.lookup-card{
  display:none;padding:14px;
  background:var(--surface-ctn);border:1px solid var(--outline-v);
  border-radius:var(--radius);margin-top:8px;
}
.lookup-card.on{display:block}
.lookup-name{font-weight:700;font-size:0.9rem;margin-bottom:4px}
.lookup-meta{font-size:0.78rem;color:var(--on-surface-2)}
.lookup-actions{display:flex;gap:8px;margin-top:10px}

/* ---- Choice (shipping/payment) ---- */
.choice-group{display:flex;flex-direction:column;gap:8px}
.choice-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 14px;border-radius:var(--radius);
  border:1.5px solid var(--outline-v);cursor:pointer;
  transition:all 0.15s;
}
.choice-item.selected{border-color:var(--primary);background:var(--primary-ctn)}
.choice-icon{
  width:38px;height:38px;flex-shrink:0;
  background:var(--surface-ctn);border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;color:var(--primary);
}
.choice-label{font-size:0.875rem;font-weight:700}
.choice-desc{font-size:0.75rem;color:var(--on-surface-2);margin-top:1px}

/* ---- Order summary in checkout ---- */
.order-summary-box{
  background:var(--surface);border:1px solid var(--outline-v);
  border-radius:var(--radius-lg);overflow:hidden;margin-bottom:16px;
}
.osb-header{
  padding:12px 16px;background:var(--surface-ctn);
  font-weight:700;font-size:0.875rem;
}
.osb-item{
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;border-top:1px solid var(--outline-v);
}
.osb-img{
  width:48px;height:48px;flex-shrink:0;
  border-radius:var(--radius);overflow:hidden;background:var(--surface-ctn);
}
.osb-img img{width:100%;height:100%;object-fit:cover}
.osb-name{font-size:0.82rem;font-weight:700}
.osb-meta{font-size:0.75rem;color:var(--on-surface-2)}
.osb-price{font-size:0.82rem;font-weight:700;color:var(--primary);white-space:nowrap;margin-left:auto}
.osb-totals{padding:12px 16px;border-top:1px solid var(--outline-v)}

/* ---- Alert ---- */
.alert{padding:12px 16px;border-radius:var(--radius);font-size:0.875rem;margin-bottom:16px}
.alert-err{background:#ffdad6;border:1px solid var(--error);color:#93000a}
.alert-info{background:var(--surface-ctn);border:1px solid var(--outline-v)}

/* ---- Sukses ---- */
.sukses-icon{
  width:80px;height:80px;border-radius:50%;
  background:var(--primary-ctn);color:var(--primary);
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 20px;
}
.info-card{
  background:var(--surface);border:1px solid var(--outline-v);
  border-radius:var(--radius-lg);overflow:hidden;margin-bottom:16px;
}
.info-card-header{
  padding:12px 16px;background:var(--surface-ctn);
  font-weight:700;font-size:0.875rem;
}
.info-row{
  display:flex;gap:8px;padding:10px 16px;
  border-top:1px solid var(--outline-v);font-size:0.875rem;
}
.info-lbl{color:var(--on-surface-2);min-width:90px;flex-shrink:0}
.info-val{font-weight:600;flex:1;word-break:break-word}

/* ---- Footer ---- */
.store-footer{
  background:var(--surface-ctn);padding:28px 16px;
  margin-bottom:var(--nav-h);
}
.store-footer p{font-size:0.78rem;color:var(--on-surface-2);margin-top:8px}

/* ---- Utility ---- */
.text-center{text-align:center}
.mt-4{margin-top:16px}
.mt-8{margin-top:32px}
.mb-4{margin-bottom:16px}
.mb-8{margin-bottom:32px}
.gap-y{display:flex;flex-direction:column;gap:12px}
.spinner{
  width:20px;height:20px;border:2px solid var(--outline-v);
  border-top-color:var(--primary);border-radius:50%;
  animation:spin 0.7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
