/* ==========================================================================
   MedNest — Design tokens
   Palette: soft mint surface, deep pharmacy green, coral CTA, apothecary red
   Type: Fraunces (display) + Plus Jakarta Sans (body) + IBM Plex Mono (data)
   Signature: prescription-label product cards + order-slip cart drawer
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,560;0,9..144,650;1,9..144,500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --bg: #F6FAF8;
  --surface: #FFFFFF;
  --surface-2: #EFF6F2;
  --ink: #0E241C;
  --ink-soft: #3E564C;
  --muted: #6E8C81;
  --line: #DCE8E2;
  --primary: #0B6E4F;
  --primary-dark: #063D2C;
  --primary-tint: #E4F3EC;
  --accent: #FF6B4A;
  --accent-dark: #E4502F;
  --offer: #E1483A;
  --gold: #D9A441;

  --font-display: 'Fraunces', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(14,36,28,0.06);
  --shadow: 0 10px 30px rgba(14,36,28,0.10);
  --shadow-lg: 0 20px 60px rgba(14,36,28,0.18);
  --container: 1200px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
input,select,textarea{ font-family:inherit; }
ul{ margin:0; padding:0; list-style:none; }
.wrap{ max-width: var(--container); margin:0 auto; padding:0 24px; }
.mono{ font-family: var(--font-mono); }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

::selection{ background: var(--accent); color:#fff; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============ Top utility strip ============ */
.topstrip{
  background: var(--primary-dark);
  color: #EAF6EF;
  font-size: 13px;
  letter-spacing:.2px;
}
.topstrip .wrap{
  display:flex; gap:24px; align-items:center; justify-content:center;
  padding:8px 24px; flex-wrap:wrap; text-align:center;
}
.topstrip span{ display:flex; align-items:center; gap:6px; opacity:.92; }

/* ============ Header ============ */
header.site-header{
  position: sticky; top:0; z-index:50;
  background: rgba(246,250,248,0.88);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.header-row{
  display:flex; align-items:center; gap:20px;
  padding:14px 24px;
}
.brand{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.brand-mark{
  width:38px; height:38px; border-radius:10px;
  background: var(--primary);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-family:var(--font-display); font-weight:650; font-size:19px;
}
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-text b{ font-family: var(--font-display); font-size:20px; font-weight:650; letter-spacing:.2px; }
.brand-text small{ font-size:11px; color:var(--muted); letter-spacing:.4px; text-transform:uppercase; }

.search-box{
  flex:1; max-width:520px; position:relative; margin:0 auto;
}
.search-box input{
  width:100%; padding:11px 44px 11px 16px;
  border:1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size:14px; color:var(--ink);
}
.search-box input:focus{ border-color:var(--primary); }
.search-box svg{ position:absolute; right:16px; top:50%; transform:translateY(-50%); color:var(--muted); }

.header-actions{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.icon-btn{
  position:relative; width:42px; height:42px; border-radius:50%;
  border:1px solid var(--line); background:var(--surface);
  display:flex; align-items:center; justify-content:center; color:var(--ink);
  transition: transform .15s ease, border-color .15s ease;
}
.icon-btn:hover{ border-color:var(--primary); transform:translateY(-1px); }
.cart-count{
  position:absolute; top:-6px; right:-6px; background:var(--accent); color:#fff;
  font-size:11px; font-weight:700; min-width:18px; height:18px; border-radius:999px;
  display:flex; align-items:center; justify-content:center; padding:0 4px;
  font-family: var(--font-mono);
}
.admin-link{
  font-size:13px; color:var(--muted); border:1px solid var(--line); padding:9px 14px;
  border-radius:999px; white-space:nowrap;
}
.admin-link:hover{ color:var(--primary); border-color:var(--primary); }

/* ============ Hero ============ */
.hero{
  position:relative; overflow:hidden;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(217,164,65,0.16), transparent 60%),
    linear-gradient(180deg, var(--primary-tint) 0%, var(--bg) 78%);
  border-bottom:1px solid var(--line);
}
.hero .wrap{
  padding:64px 24px 48px;
  display:grid; grid-template-columns: 1.1fr .9fr; gap:40px; align-items:center;
}
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-mono); font-size:12px; letter-spacing:.6px; text-transform:uppercase;
  color: var(--primary-dark); background:#fff; border:1px solid var(--line);
  padding:6px 12px; border-radius:999px; margin-bottom:18px;
}
.hero-eyebrow::before{ content:''; width:7px; height:7px; border-radius:50%; background:var(--accent); }
.hero h1{
  font-family: var(--font-display); font-weight:650; font-size:clamp(32px,4.4vw,52px);
  line-height:1.06; margin:0 0 16px; letter-spacing:-.5px;
}
.hero h1 em{ font-style:italic; color:var(--primary); }
.hero p.lede{ font-size:17px; color:var(--ink-soft); max-width:480px; margin:0 0 26px; line-height:1.6; }
.hero-ctas{ display:flex; gap:12px; flex-wrap:wrap; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 24px; border-radius:999px; font-weight:700; font-size:14.5px;
  border:1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space:nowrap;
}
.btn-primary{ background:var(--primary); color:#fff; box-shadow: 0 8px 20px rgba(11,110,79,0.25); }
.btn-primary:hover{ background:var(--primary-dark); transform:translateY(-2px); }
.btn-accent{ background:var(--accent); color:#fff; box-shadow: 0 8px 20px rgba(255,107,74,0.3); }
.btn-accent:hover{ background:var(--accent-dark); transform:translateY(-2px); }
.btn-outline{ background:#fff; color:var(--ink); border-color:var(--line); }
.btn-outline:hover{ border-color:var(--primary); color:var(--primary); }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; transform:none !important; }

.hero-trust{ display:flex; gap:22px; margin-top:32px; flex-wrap:wrap; }
.hero-trust div{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-soft); font-weight:600; }
.hero-trust svg{ color:var(--primary); flex-shrink:0; }

/* hero visual — apothecary label stack */
.hero-visual{ position:relative; height:340px; }
.rx-card{
  position:absolute; background:#fff; border:1.5px dashed #C9DED5; border-radius: var(--radius);
  box-shadow: var(--shadow); padding:18px 20px; width:230px;
}
.rx-card .rx-badge{
  display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; border-radius:7px; background:var(--primary-tint);
  color:var(--primary); font-family:var(--font-display); font-weight:700; font-size:14px;
  margin-bottom:10px;
}
.rx-card b{ display:block; font-size:14px; margin-bottom:2px; }
.rx-card span{ font-size:11.5px; color:var(--muted); }
.rx-card .price{ margin-top:10px; font-family:var(--font-mono); font-weight:600; color:var(--primary-dark); font-size:15px; }
.rx-card.c1{ top:6px; left:0; transform:rotate(-6deg); z-index:2; }
.rx-card.c2{ top:120px; left:130px; transform:rotate(4deg); z-index:3; box-shadow:var(--shadow-lg); }
.rx-card.c3{ top:230px; left:10px; transform:rotate(-2deg); z-index:1; }

/* ============ Category pills ============ */
.categories{ padding:28px 0 6px; }
.categories .wrap{ display:flex; gap:10px; overflow-x:auto; padding-bottom:10px; scrollbar-width:thin; }
.cat-pill{
  flex-shrink:0; padding:9px 18px; border-radius:999px; border:1px solid var(--line);
  background:#fff; font-size:13.5px; font-weight:600; color:var(--ink-soft);
  transition: all .15s ease;
}
.cat-pill.active, .cat-pill:hover{ background:var(--primary); border-color:var(--primary); color:#fff; }

/* ============ Product grid ============ */
.section-title{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  padding: 30px 0 18px; flex-wrap:wrap;
}
.section-title h2{ font-family:var(--font-display); font-size:26px; font-weight:650; margin:0; }
.section-title p{ font-size:13px; color:var(--muted); margin:0; font-family:var(--font-mono); }

.product-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(228px,1fr)); gap:20px;
  padding-bottom:40px;
}

/* Signature card: prescription-label styling */
.product-card{
  background:#fff; border-radius: var(--radius); border:1px solid var(--line);
  overflow:hidden; position:relative; display:flex; flex-direction:column;
  transition: transform .18s ease, box-shadow .18s ease;
  animation: rise .5s ease both;
}
.product-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow); }
.product-card .thumb{
  position:relative; aspect-ratio:1/0.86; background:var(--surface-2); overflow:hidden;
}
.product-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.product-card .thumb .stock-flag{
  position:absolute; top:10px; left:10px; background:rgba(14,36,28,0.85); color:#fff;
  font-size:10.5px; font-weight:700; padding:4px 9px; border-radius:6px; letter-spacing:.3px;
  font-family:var(--font-mono);
}
.product-card .thumb .offer-tag{
  position:absolute; top:10px; right:-1px; background:var(--offer); color:#fff;
  font-size:11.5px; font-weight:800; padding:5px 10px 5px 12px; border-radius:6px 0 0 6px;
  font-family:var(--font-mono);
}
.perf{
  height:0; border-top:1.5px dashed var(--line); position:relative; margin:0 14px;
}
.perf::before, .perf::after{
  content:''; position:absolute; top:-6px; width:12px; height:12px; border-radius:50%;
  background:var(--bg); border:1px solid var(--line);
}
.perf::before{ left:-20px; } .perf::after{ right:-20px; }

.product-card .body{ padding:14px 16px 16px; display:flex; flex-direction:column; gap:6px; flex:1; }
.product-card .cat{ font-size:10.5px; text-transform:uppercase; letter-spacing:.5px; color:var(--primary); font-weight:700; }
.product-card h3{ font-size:15px; margin:0; font-weight:700; line-height:1.3; min-height:39px; }
.product-card .desc{ font-size:12.5px; color:var(--muted); line-height:1.5; min-height:32px; overflow:hidden; }
.rx-flag{
  display:inline-flex; align-items:center; gap:4px; font-size:10.5px; color:var(--accent-dark);
  font-weight:700; font-family:var(--font-mono);
}

.price-row{ display:flex; align-items:baseline; gap:8px; margin-top:4px; }
.price-row .now{ font-family:var(--font-mono); font-weight:700; font-size:18px; color:var(--primary-dark); }
.price-row .was{ font-family:var(--font-mono); font-size:12.5px; color:var(--muted); text-decoration:line-through; }
.price-row .pct{ font-size:11px; font-weight:800; color:var(--offer); background:#FDECEA; padding:2px 6px; border-radius:5px; }

.qty-add{ display:flex; gap:8px; margin-top:10px; }
.stepper{
  display:flex; align-items:center; border:1px solid var(--line); border-radius:999px; overflow:hidden;
  flex-shrink:0; background:var(--surface-2);
}
.stepper button{ background:none; border:none; width:30px; height:34px; font-size:16px; color:var(--ink); }
.stepper button:hover{ background:#fff; }
.stepper span{ width:24px; text-align:center; font-family:var(--font-mono); font-weight:600; font-size:13px; }
/*.add-btn{*/
/*  flex:1; background:var(--ink); color:#fff; border:none; border-radius:999px; font-weight:700;*/
/*  font-size:12.5px; letter-spacing:.2px; transition: background .15s ease, transform .15s ease;*/
/*}*/
/*.add-btn:hover{ background:var(--primary); transform:translateY(-1px); }*/
/*.add-btn.added{ background:var(--primary); }*/



.add-btn{
  position:relative;
  flex:1; background:var(--ink); color:#fff; border:none; border-radius:999px; font-weight:700;
  font-size:12.5px; letter-spacing:.2px; transition: background .15s ease, transform .15s ease;
  display:flex; align-items:center; justify-content:center; gap:7px;
}
.add-btn::before{
  font-family:"Font Awesome 6 Free";
  font-weight:900;
  content:"\f217";      /* fa-cart-plus */
  font-size:13px;
  line-height:1;
}
.add-btn.added::before{ content:"\f058"; }   /* fa-circle-check */
.add-btn:disabled::before{ content:"\f05e"; } /* fa-ban */

.add-btn:hover{ background:var(--primary); transform:translateY(-1px); }
.add-btn.added{ background:var(--primary); }
.add-btn:disabled{ background:var(--muted); cursor:not-allowed; transform:none; }


@keyframes rise{ from{ opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }

.empty-state{
  text-align:center; padding:60px 20px; color:var(--muted); grid-column:1/-1;
}
.empty-state svg{ margin-bottom:14px; color:var(--line); }
.empty-state h3{ font-family:var(--font-display); color:var(--ink); margin:0 0 6px; }

.skeleton{ background:linear-gradient(90deg,#EEF3F0 25%,#F7FAF8 37%,#EEF3F0 63%); background-size:400% 100%; animation:sk 1.4s ease infinite; }
@keyframes sk{ 0%{background-position:100% 0} 100%{background-position:0 0} }

/* ============ Info strip ============ */
.info-strip{ background:var(--primary-tint); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.info-strip .wrap{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; padding:30px 24px; }
.info-item{ display:flex; gap:12px; align-items:flex-start; }
.info-item .ico{
  width:38px; height:38px; border-radius:10px; background:#fff; color:var(--primary);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:var(--shadow-sm);
}
.info-item b{ display:block; font-size:14px; margin-bottom:2px; }
.info-item span{ font-size:12.5px; color:var(--ink-soft); line-height:1.5; }

/* ============ Footer ============ */
footer.site-footer{ background: var(--primary-dark); color:#DCEFE4; padding:48px 0 22px; margin-top:20px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1.1fr; gap:32px; padding-bottom:30px; border-bottom:1px solid rgba(255,255,255,.12); }
.footer-grid h4{ font-size:13px; text-transform:uppercase; letter-spacing:.6px; color:#9FC9B4; margin:0 0 14px; }
.footer-grid p{ font-size:13px; line-height:1.7; color:#BFE1D0; max-width:280px; }
.footer-grid ul li{ margin-bottom:9px; }
.footer-grid ul a{ font-size:13.5px; color:#DCEFE4; opacity:.85; }
.footer-grid ul a:hover{ opacity:1; text-decoration:underline; }
.footer-bottom{ display:flex; justify-content:space-between; padding-top:18px; font-size:12px; color:#8FBBA3; flex-wrap:wrap; gap:10px; }

/* ============ WhatsApp FAB ============ */
.wa-fab{
  position:fixed; bottom:24px; right:24px; z-index:60;
  width:58px; height:58px; border-radius:50%; background:#25D366; color:#fff;
  display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-lg);
  transition: transform .2s ease;
}
.wa-fab:hover{ transform: scale(1.08); }

/* ============ Cart drawer (order slip) ============ */
.overlay{ position:fixed; inset:0; background:rgba(14,36,28,0.45); backdrop-filter:blur(2px); z-index:70; opacity:0; pointer-events:none; transition:opacity .25s ease; }
.overlay.open{ opacity:1; pointer-events:auto; }

.cart-drawer{
  position:fixed; top:0; right:0; height:100%; width:420px; max-width:92vw;
  background:var(--bg); z-index:80; transform:translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  display:flex; flex-direction:column; box-shadow:-10px 0 40px rgba(0,0,0,.15);
}
.cart-drawer.open{ transform:translateX(0); }
.cart-head{
  padding:20px 22px; border-bottom:1.5px dashed var(--line); display:flex; justify-content:space-between; align-items:center;
  background: repeating-linear-gradient(-45deg, var(--surface) 0 10px, var(--surface-2) 10px 20px);
}
.cart-head h3{ font-family:var(--font-display); font-size:20px; margin:0; }
.cart-head .slip-tag{ font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.close-x{ width:34px; height:34px; border-radius:50%; border:1px solid var(--line); background:#fff; display:flex; align-items:center; justify-content:center; }

.cart-items{ flex:1; overflow-y:auto; padding:14px 22px; }
.cart-line{ display:flex; gap:12px; padding:14px 0; border-bottom:1px dashed var(--line); }
.cart-line img{ width:56px; height:56px; border-radius:8px; object-fit:cover; background:var(--surface-2); flex-shrink:0; }
.cart-line .info{ flex:1; min-width:0; }
.cart-line .info b{ font-size:13.5px; display:block; margin-bottom:3px; }
.cart-line .info .unit{ font-size:11.5px; color:var(--muted); font-family:var(--font-mono); }
.cart-line .line-right{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.cart-line .line-total{ font-family:var(--font-mono); font-weight:700; font-size:13.5px; }
.remove-line{ font-size:11px; color:var(--offer); font-weight:700; }

.cart-empty{ text-align:center; padding:60px 20px; color:var(--muted); }
.cart-empty svg{ color:var(--line); margin-bottom:12px; }

.cart-summary{ padding:18px 22px 24px; border-top:1.5px dashed var(--line); background:var(--surface); }
.sum-row{ display:flex; justify-content:space-between; font-size:13.5px; color:var(--ink-soft); padding:4px 0; }
.sum-row.total{ font-size:17px; font-weight:800; color:var(--ink); padding-top:10px; margin-top:6px; border-top:1px solid var(--line); }
.sum-row .val{ font-family:var(--font-mono); }
.cod-note{ font-size:11.5px; color:var(--muted); margin:8px 0 14px; line-height:1.5; }

/* ============ Modals (checkout / admin login) ============ */
.modal-overlay{ position:fixed; inset:0; background:rgba(14,36,28,0.5); z-index:90; display:flex; align-items:center; justify-content:center; padding:20px; opacity:0; pointer-events:none; transition:opacity .2s ease; }
.modal-overlay.open{ opacity:1; pointer-events:auto; }
.modal{ position:relative; background:#fff; border-radius:var(--radius-lg); width:100%; max-width:440px; padding:30px; box-shadow:var(--shadow-lg); transform:translateY(12px); transition:transform .2s ease; max-height:90vh; overflow-y:auto; }
.modal-overlay.open .modal{ transform:translateY(0); }
.modal h3{ font-family:var(--font-display); font-size:22px; margin:0 0 6px; }
.modal p.sub{ font-size:13px; color:var(--muted); margin:0 0 20px; }
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:12.5px; font-weight:700; margin-bottom:6px; color:var(--ink-soft); }
.field input, .field select, .field textarea{
  width:100%; padding:11px 14px; border:1px solid var(--line); border-radius:10px; font-size:14px; background:var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--primary); }
.field-row{ display:flex; gap:12px; }
.field-row .field{ flex:1; }
.form-error{ font-size:12.5px; color:var(--offer); margin-top:-8px; margin-bottom:14px; display:none; }
.form-error.show{ display:block; }

/* toast */
.toast-wrap{ position:fixed; bottom:24px; left:24px; z-index:100; display:flex; flex-direction:column; gap:10px; }
.toast{
  background:var(--ink); color:#fff; padding:12px 18px; border-radius:10px; font-size:13.5px; font-weight:600;
  box-shadow:var(--shadow); display:flex; align-items:center; gap:10px; animation: toastIn .25s ease;
}
.toast.success{ background:var(--primary-dark); }
.toast.error{ background:var(--offer); }
@keyframes toastIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);} }

/* ============ Simple static pages (Terms/Privacy) ============ */
.legal-page{ padding:50px 0 80px; }
.legal-page .wrap{ max-width:820px; }
.legal-page h1{ font-family:var(--font-display); font-size:36px; margin:0 0 6px; }
.legal-page .updated{ font-size:12.5px; color:var(--muted); font-family:var(--font-mono); margin-bottom:34px; }
.legal-page h2{ font-family:var(--font-display); font-size:19px; margin:34px 0 10px; }
.legal-page p, .legal-page li{ font-size:14.5px; line-height:1.75; color:var(--ink-soft); }
.legal-page ul{ padding-left:20px; list-style:disc; margin:10px 0; }
.legal-page ul li{ margin-bottom:6px; }
.back-link{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:var(--primary); margin-bottom:24px; }

/* ============ Responsive ============ */
@media (max-width:960px){
  .hero .wrap{ grid-template-columns:1fr; }
  .hero-visual{ display:none; }
  .info-strip .wrap{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:720px){
  .header-row{ flex-wrap:wrap; }
  .search-box{ order:3; max-width:100%; width:100%; margin-top:8px; }
  .admin-link{ display:none; }
  .cart-drawer{ width:100%; max-width:100%; }
  .footer-grid{ grid-template-columns:1fr; }
  .product-grid{ grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:14px; }
  .hero .wrap{ padding:40px 20px 32px; }
  
  /* Add-to-cart button: icon-only on small screens */
  .add-btn{
    flex:0 0 auto;
    width:38px; height:38px; padding:0;
    border-radius:50%;
    font-size:0;              /* hide the text label, icon stays visible */
  }
  .add-btn::before{ font-size:16px; }

  .qty-add{ align-items:center; }
  
}


  .service-card{
    flex:1 1 280px; background:#fff; border:1px solid var(--line);
    border-radius:var(--radius); padding:24px; box-shadow:var(--shadow-sm);
  }
  .service-card h3{ font-family:var(--font-display); margin:0 0 6px; font-size:18px; }
  .service-card p{ color:var(--muted); font-size:13.5px; margin:0 0 16px; line-height:1.5; }