/* =========================================================================
   GLOJAS - Daftar Obat Penumbuh Rambut
   Token system
   Color:  --cream #FFFDF6 (bg), --white #FFFFFF (cards),
           --gold #B8872E (primary), --gold-light #E8CD8A (accent/lines),
           --ink #2B2620 (text), --footer #1C1712 (dark footer)
   Type:   Display - "Cormorant Garamond" (serif, clinic elegance)
           Body    - "Manrope" (sans, clean & readable)
           Utility - "IBM Plex Mono" (prescription / data feel)
   Signature: the cart & checkout are styled as a torn-edge "resep" (prescription
   slip) ticket — a nod to the clinic / apotek subject matter.
   ========================================================================= */

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

:root{
  --cream:#FFFDF6;
  --white:#FFFFFF;
  --gold:#B8872E;
  --gold-deep:#8C6418;
  --gold-light:#E8CD8A;
  --gold-pale:#F6ECD6;
  --ink:#2B2620;
  --ink-soft:#5E5648;
  --footer:#1C1712;
  --footer-text:#E9DEC4;
  --danger:#B3402F;
  --success:#3F7A4E;
  --radius:14px;
  --shadow:0 10px 30px -12px rgba(43,38,32,.25);
  --maxw:1180px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:'Manrope',sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.display{
  font-family:'Cormorant Garamond',serif;
  font-weight:600;
  letter-spacing:.2px;
  margin:0 0 .4em;
  color:var(--ink);
}
a{color:inherit;}
img{max-width:100%;display:block;}
button{font-family:inherit;cursor:pointer;}
:focus-visible{outline:3px solid var(--gold-deep);outline-offset:2px;}

.container{max-width:var(--maxw);margin:0 auto;padding:0 20px;}
.mono{font-family:'IBM Plex Mono',monospace;}
.eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--gold-deep);
  margin-bottom:8px;
  display:flex;
  align-items:center;
  gap:8px;
}
.eyebrow::before{content:'';width:18px;height:1px;background:var(--gold);}

/* ===== HEADER ===== */
.site-header{
  position:sticky;top:0;z-index:40;
  background:rgba(255,253,246,.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--gold-light);
}
.site-header .bar{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px;gap:16px;
}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;}
.brand img{height:38px;width:auto;}
.brand-name{font-family:'Cormorant Garamond',serif;font-size:19px;font-weight:700;color:var(--ink);}
.brand-name small{display:block;font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:1.5px;color:var(--gold-deep);font-weight:500;}

.header-actions{display:flex;align-items:center;gap:10px;}
.btn{
  border:none;border-radius:999px;padding:11px 20px;
  font-weight:700;font-size:14px;letter-spacing:.2px;
  display:inline-flex;align-items:center;gap:8px;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active{transform:translateY(1px);}
.btn-gold{background:linear-gradient(135deg,var(--gold-light),var(--gold));color:#241c0c;box-shadow:0 6px 18px -6px rgba(140,100,24,.55);}
.btn-gold:hover{box-shadow:0 8px 22px -6px rgba(140,100,24,.7);}
.btn-outline{background:transparent;border:1.5px solid var(--gold);color:var(--gold-deep);}
.btn-outline:hover{background:var(--gold-pale);}
.btn-dark{background:var(--ink);color:var(--gold-light);}
.btn-dark:hover{background:#3a3024;}
.btn-block{width:100%;justify-content:center;}
.btn-sm{padding:8px 14px;font-size:13px;}
.btn:disabled{opacity:.55;cursor:not-allowed;}

.cart-pill{
  position:relative;background:var(--ink);color:var(--gold-light);
  border-radius:999px;padding:10px 16px;display:flex;align-items:center;gap:8px;
  border:none;font-weight:700;
}
.cart-pill .count{
  background:var(--gold);color:#241c0c;border-radius:999px;
  min-width:20px;height:20px;font-size:11px;display:inline-flex;
  align-items:center;justify-content:center;padding:0 5px;
}

/* ===== HERO ===== */
.hero{
  position:relative;overflow:hidden;
  padding:56px 0 64px;
  background:
    radial-gradient(900px 420px at 85% -10%, var(--gold-pale) 0%, transparent 60%),
    linear-gradient(180deg,var(--cream),var(--white));
  border-bottom:1px solid var(--gold-light);
}
.hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center;}
.hero h1{font-size:clamp(28px,4vw,44px);line-height:1.12;max-width:640px;}
.hero p.lede{color:var(--ink-soft);font-size:16px;max-width:520px;margin:14px 0 26px;}
.hero-cta{display:flex;gap:12px;flex-wrap:wrap;}
.hero-badges{display:flex;gap:18px;margin-top:28px;flex-wrap:wrap;}
.hero-badge{font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--ink-soft);display:flex;align-items:center;gap:6px;}
.hero-badge strong{color:var(--gold-deep);font-size:13px;}

.rx-card{
  background:var(--white);
  border-radius:var(--radius);
  border:1px solid var(--gold-light);
  box-shadow:var(--shadow);
  padding:26px 24px 22px;
  position:relative;
}
.rx-card::before{
  content:'';position:absolute;top:-9px;left:24px;right:24px;height:18px;
  background:radial-gradient(circle at center, transparent 8px, var(--white) 8.5px) ;
  background-size:18px 18px;background-repeat:repeat-x;background-position:top;
}
.rx-card .rx-head{display:flex;justify-content:space-between;align-items:baseline;border-bottom:1px dashed var(--gold-light);padding-bottom:10px;margin-bottom:12px;}
.rx-card .rx-head span{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--gold-deep);letter-spacing:1px;}
.rx-list{list-style:none;margin:0;padding:0;font-family:'IBM Plex Mono',monospace;font-size:13px;color:var(--ink-soft);}
.rx-list li{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dotted #E6DCC2;}
.rx-list li b{color:var(--ink);font-weight:600;}

/* ===== CATALOG ===== */
.section{padding:54px 0;}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:26px;flex-wrap:wrap;}
.section-head h2{font-size:clamp(24px,3vw,32px);}
.section-head p{color:var(--ink-soft);max-width:480px;font-size:14px;margin:6px 0 0;}

.catalog-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(250px,1fr));
  gap:22px;
}
.product-card{
  background:var(--white);border:1px solid var(--gold-light);
  border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;
  box-shadow:0 6px 18px -10px rgba(43,38,32,.18);
  transition:transform .18s ease, box-shadow .18s ease;
}
.product-card:hover{transform:translateY(-4px);box-shadow:var(--shadow);}
.product-media{aspect-ratio:4/3;background:var(--gold-pale);overflow:hidden;position:relative;}
.product-media img{width:100%;height:100%;object-fit:cover;}
.product-body{padding:16px 16px 18px;display:flex;flex-direction:column;gap:8px;flex:1;}
.product-name{font-family:'Cormorant Garamond',serif;font-weight:700;font-size:18px;line-height:1.25;min-height:46px;}
.product-desc{font-size:12.5px;color:var(--ink-soft);flex:1;}
.product-price{font-family:'IBM Plex Mono',monospace;font-weight:600;color:var(--gold-deep);font-size:15px;margin-top:4px;}
.product-foot{display:flex;align-items:center;gap:10px;margin-top:6px;}
.qty-stepper{display:flex;align-items:center;border:1px solid var(--gold-light);border-radius:999px;overflow:hidden;}
.qty-stepper button{width:30px;height:30px;background:var(--gold-pale);border:none;font-size:15px;color:var(--gold-deep);font-weight:700;}
.qty-stepper input{width:34px;border:none;text-align:center;font-family:'IBM Plex Mono',monospace;font-size:13px;background:transparent;}
.add-btn{flex:1;}

/* ===== STICKY CART BAR (mobile) ===== */
.cart-bar{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  background:var(--ink);color:var(--gold-pale);
  display:none;align-items:center;justify-content:space-between;
  padding:12px 16px;box-shadow:0 -8px 24px -10px rgba(0,0,0,.35);
}
.cart-bar .info{font-family:'IBM Plex Mono',monospace;font-size:13px;}
.cart-bar .info b{display:block;font-size:15px;color:var(--gold-light);}

/* ===== CART / CHECKOUT DRAWER ===== */
.drawer-overlay{
  position:fixed;inset:0;background:rgba(20,16,8,.55);z-index:60;
  display:none;
}
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:min(440px,100%);
  background:var(--cream);z-index:61;
  transform:translateX(100%);transition:transform .28s ease;
  display:flex;flex-direction:column;
  box-shadow:-20px 0 40px -20px rgba(0,0,0,.4);
}
.drawer.open{transform:translateX(0);}
.drawer-overlay.open{display:block;}
.drawer-head{
  padding:18px 20px;border-bottom:1px dashed var(--gold-light);
  display:flex;align-items:center;justify-content:space-between;
  background:var(--white);
}
.drawer-head h3{margin:0;font-size:20px;}
.drawer-close{background:none;border:none;font-size:22px;color:var(--ink-soft);}
.drawer-body{flex:1;overflow-y:auto;padding:18px 20px 0;}
.drawer-foot{padding:16px 20px 20px;border-top:1px dashed var(--gold-light);background:var(--white);}

.cart-line{
  display:flex;gap:10px;padding:10px 0;border-bottom:1px dotted #E6DCC2;
  font-family:'IBM Plex Mono',monospace;
}
.cart-line img{width:48px;height:48px;border-radius:8px;object-fit:cover;border:1px solid var(--gold-light);}
.cart-line .meta{flex:1;min-width:0;}
.cart-line .meta .nm{font-size:12.5px;font-weight:600;color:var(--ink);}
.cart-line .meta .pr{font-size:12px;color:var(--gold-deep);}
.cart-line .ctrl{display:flex;align-items:center;gap:6px;}
.cart-line .remove{background:none;border:none;color:var(--danger);font-size:16px;line-height:1;}
.empty-cart{text-align:center;padding:40px 10px;color:var(--ink-soft);font-size:14px;}

.voucher-row{display:flex;gap:8px;margin:16px 0;}
.voucher-row input{flex:1;border:1px solid var(--gold-light);border-radius:10px;padding:10px 12px;font-family:'IBM Plex Mono',monospace;font-size:13px;text-transform:uppercase;}
.voucher-msg{font-size:12px;margin-top:6px;font-family:'IBM Plex Mono',monospace;}
.voucher-msg.ok{color:var(--success);}
.voucher-msg.err{color:var(--danger);}

.totals{font-family:'IBM Plex Mono',monospace;font-size:13.5px;}
.totals .row{display:flex;justify-content:space-between;padding:4px 0;}
.totals .row.grand{font-size:17px;font-weight:700;color:var(--ink);border-top:1px dashed var(--gold-light);margin-top:6px;padding-top:10px;}
.totals .row.disc{color:var(--success);}

/* ===== CHECKOUT FORM ===== */
.field{margin-bottom:14px;}
.field label{display:block;font-size:12.5px;font-weight:700;letter-spacing:.3px;margin-bottom:6px;color:var(--ink-soft);text-transform:uppercase;}
.field input,.field textarea,.field select{
  width:100%;border:1px solid var(--gold-light);border-radius:10px;
  padding:11px 12px;font-family:'Manrope',sans-serif;font-size:14px;background:var(--white);color:var(--ink);
}
.field textarea{resize:vertical;min-height:64px;}
.field small{color:var(--ink-soft);font-size:11.5px;}
.bank-box{
  background:var(--gold-pale);border:1px dashed var(--gold);border-radius:10px;
  padding:12px 14px;font-family:'IBM Plex Mono',monospace;font-size:13px;margin-bottom:14px;
}
.bank-box b{display:block;font-size:15px;color:var(--gold-deep);letter-spacing:.5px;}

.upload-box{
  border:1.5px dashed var(--gold);border-radius:10px;padding:16px;text-align:center;
  background:var(--white);cursor:pointer;font-size:13px;color:var(--ink-soft);
}
.upload-box.has-file{border-color:var(--success);color:var(--success);background:#F2F8F3;}
.upload-box input{display:none;}
.form-msg{font-size:13px;margin-top:10px;padding:10px 12px;border-radius:8px;display:none;}
.form-msg.show{display:block;}
.form-msg.err{background:#FBEAE6;color:var(--danger);}
.form-msg.ok{background:#EAF5EC;color:var(--success);}
.spinner{
  width:16px;height:16px;border:2px solid rgba(0,0,0,.15);border-top-color:currentColor;
  border-radius:50%;display:inline-block;animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}

/* ===== MAP / LOKASI ===== */
.map-wrap{border-radius:var(--radius);overflow:hidden;border:1px solid var(--gold-light);box-shadow:var(--shadow);}
.map-wrap iframe{width:100%;height:380px;border:0;display:block;}
.contact-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:30px;align-items:start;}
.contact-list{list-style:none;margin:0;padding:0;}
.contact-list li{display:flex;gap:10px;padding:10px 0;border-bottom:1px dotted var(--gold-light);font-size:14px;}
.contact-list li b{min-width:90px;color:var(--gold-deep);font-family:'IBM Plex Mono',monospace;font-size:12px;text-transform:uppercase;}

/* ===== FOOTER ===== */
.site-footer{background:var(--footer);color:var(--footer-text);padding:46px 0 24px;margin-top:20px;}
.footer-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:30px;}
.footer-grid h4{color:var(--gold-light);font-family:'Cormorant Garamond',serif;font-size:17px;margin:0 0 12px;}
.footer-grid p, .footer-grid a{color:var(--footer-text);font-size:13.5px;text-decoration:none;opacity:.9;}
.footer-grid ul{list-style:none;margin:0;padding:0;}
.footer-grid li{margin-bottom:8px;}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1);margin-top:30px;padding-top:18px;
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;font-size:12px;color:#B7A881;
}
.footer-brand{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.footer-brand img{height:32px;filter:brightness(0) invert(1) sepia(1) saturate(2) hue-rotate(10deg);opacity:.95;}

/* =========================================================================
   RESPONSIVE — tampilan mobile dipisah dari desktop agar elemen tidak
   bertabrakan saat ruang terbatas.
   ========================================================================= */

/* Tablet & below */
@media (max-width: 900px){
  .hero-grid{grid-template-columns:1fr;}
  .rx-card{order:-1;}
  .contact-grid{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr 1fr;}
}

/* Mobile-specific layout */
@media (max-width: 640px){
  .container{padding:0 16px;}
  .brand img{height:30px;}
  .brand-name{font-size:15px;}
  .brand-name small{font-size:9px;}
  .header-actions .btn-label{display:none;}
  .hero{padding:34px 0 90px;}
  .hero h1{font-size:24px;}
  .hero p.lede{font-size:14px;}
  .hero-cta{flex-direction:column;}
  .hero-cta .btn{width:100%;}
  .hero-badges{gap:12px;}

  .section{padding:36px 0;}
  .section-head{flex-direction:column;align-items:flex-start;}

  .catalog-grid{grid-template-columns:1fr 1fr;gap:12px;}
  .product-body{padding:12px;gap:6px;}
  .product-name{font-size:14px;min-height:36px;}
  .product-desc{display:none;} /* sembunyikan deskripsi panjang agar kartu tidak bertabrakan */
  .product-price{font-size:13px;}
  .product-foot{flex-direction:column;align-items:stretch;gap:8px;}
  .qty-stepper{align-self:flex-start;}
  .add-btn{font-size:12.5px;padding:9px 10px;}

  .cart-bar{display:flex;}
  .drawer{width:100%;}

  .footer-grid{grid-template-columns:1fr;text-align:left;}
  .map-wrap iframe{height:260px;}

  body{padding-bottom:64px;} /* ruang untuk cart-bar sticky */
}

/* Desktop: pastikan cart-bar mobile tersembunyi & beri ruang drawer */
@media (min-width: 641px){
  .cart-bar{display:none !important;}
  body{padding-bottom:0;}
}
