/* ========== Base & Brand ========== */
:root{
  --teal-900:#0D3B3F; --teal-800:#0F4F54; --teal-700:#13666C; --teal-600:#177B83;
  --mint-300:#B8E8C9; --ice-100:#E7F3FF; --platinum:#F8F9FA; --ink:#0F172A;
}
html{scroll-behavior:smooth}
body{font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; color:var(--ink); background:#fff}

/* ========== Components ========== */
.card{transition:transform .35s ease, box-shadow .35s ease}
.card:hover{transform:translateY(-4px); box-shadow:0 14px 30px rgba(2,6,23,.08)}

.btn-aura{position:relative}
@keyframes aura{
  0%{box-shadow:0 0 0 0 rgba(23,123,131,.35),0 0 0 0 rgba(184,232,201,.25)}
  50%{box-shadow:0 0 0 12px rgba(23,123,131,0),0 0 0 24px rgba(184,232,201,0)}
  100%{box-shadow:0 0 0 0 rgba(23,123,131,0),0 0 0 0 rgba(184,232,201,0)}
}
.btn-aura::after{
  content:""; position:absolute; inset:-2px; border-radius:9999px; filter:blur(8px);
  background:radial-gradient(80% 80% at 50% 50%, rgba(184,232,201,.6), rgba(23,123,131,.5) 70%, transparent 100%);
  opacity:.55; z-index:-1; animation:aura 2.6s infinite ease-out;
}

.molecule{position:absolute; pointer-events:none; opacity:.4}
.molecule svg{filter:drop-shadow(0 10px 20px rgba(13,59,63,.12))}
.glass{background:linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.4));
  backdrop-filter:blur(10px); border:1px solid rgba(255,255,255,.5)}

.snap-x{scroll-snap-type:x mandatory}.snap-start{scroll-snap-align:start}
.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}

/* Mobile safe area for the floating button */
@supports (padding: max(0px)) {
  .fixed-bottom {
    bottom: max(1rem, env(safe-area-inset-bottom)); /* used by Ask a Pharmacist */
  }
}

/* ===== Shared Header / Nav / Buttons ===== */
.header{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.9);backdrop-filter:blur(12px);border-bottom:1px solid #e2e8f0}
.header-container{max-width:1400px;margin:0 auto;padding:1rem 1.25rem;display:flex;align-items:center;justify-content:space-between}
.logo{font-weight:800;text-decoration:none;color:var(--ink);display:flex;align-items:center;gap:.5rem}
.logo-accent{color:var(--teal-600)}
.nav{display:none;gap:2rem;list-style:none;margin:0;padding:0}
.nav a{text-decoration:none;color:#475569;font-weight:600;font-size:.95rem}
.nav a:hover{color:var(--teal-600)}
.header-actions{display:flex;gap:.6rem;align-items:center}
.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1.1rem;border-radius:.75rem;font-weight:600;border:2px solid #e2e8f0;background:#fff;color:var(--ink);text-decoration:none}
.btn:hover{border-color:var(--teal-600);color:var(--teal-600)}
.btn-primary{background:linear-gradient(135deg,var(--teal-600),var(--teal-700));border:none;color:#fff}
.btn-primary:hover{filter:brightness(1.05)}
.btn-outline{background:#fff}
.mobile-menu-btn{display:block;background:none;border:2px solid #e2e8f0;border-radius:.5rem;padding:.5rem;font-size:1.1rem}
@media(min-width:768px){.nav{display:flex}.mobile-menu-btn{display:none}}

/* ===== Mobile Drawer ===== */
.menu-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:39;opacity:0;pointer-events:none;transition:.25s}
.menu-overlay.open{opacity:1;pointer-events:auto}
.mobile-menu{position:fixed;top:0;left:-100%;width:80%;max-width:300px;height:100vh;background:#fff;z-index:40;box-shadow:0 0 20px rgba(0,0,0,.1);transition:left .25s;padding:1.25rem;display:flex;flex-direction:column}
.mobile-menu.open{left:0}
.mobile-menu-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e2e8f0;padding-bottom:1rem;margin-bottom:1rem}
.mobile-nav{list-style:none;margin:0;padding:0;flex:1}
.mobile-nav a{display:block;padding:1rem 0;font-weight:600;color:var(--ink);text-decoration:none;border-bottom:1px solid #f1f5f9}

/* ===== Breadcrumbs / Containers ===== */
.breadcrumbs{background:#F8FAFC;border-bottom:1px solid #e2e8f0}
.container{max-width:1200px;margin:0 auto;padding:1.25rem}
.container--narrow{max-width:1000px}

/* ===== Cart page pieces ===== */
.cart-grid{display:grid;gap:1rem}
@media(min-width:900px){.cart-grid{grid-template-columns:7fr 5fr;gap:1.5rem}}
.cart-list{display:grid;gap:.75rem;margin:0 0 1rem;padding:0;list-style:none}
.empty-note{color:#94a3b8;margin:0 0 1rem}
.summary-line{display:flex;justify-content:space-between;margin:.25rem 0;color:#334155}
.summary-line .v{font-weight:800}
.checkout-btn{display:inline-flex;justify-content:center;width:100%;padding:1rem;border-radius:.75rem;background:#177B83;color:#fff;font-weight:700;text-decoration:none}
.footer{border-top:1px solid #e2e8f0;background:#f8fafc;padding:2rem 1.5rem;text-align:center;color:#64748b;font-size:.9rem;margin-top:2rem}
/* ===== Header & Mobile Menu (shared) ===== */
.header{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.9);backdrop-filter:blur(8px);border-bottom:1px solid #e2e8f0}
.header-container{max-width:1280px;margin:0 auto;padding:1rem 1.25rem;display:flex;align-items:center;justify-content:space-between}
.logo{font-weight:800;color:var(--ink);text-decoration:none;display:flex;gap:.5rem;align-items:center}
.logo-accent{color:var(--teal-600)}

.nav{display:none;gap:2rem;list-style:none;margin:0;padding:0}
.nav a{color:#475569;text-decoration:none;font-weight:600}
.nav a:hover{color:var(--teal-600)}

.header-actions{display:flex;gap:.75rem;align-items:center}
.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1rem;border-radius:.75rem;border:2px solid #e2e8f0;background:#fff;color:var(--ink);text-decoration:none;font-weight:600}
.btn-primary{background:linear-gradient(135deg,var(--teal-600),var(--teal-700));border:none;color:#fff}
.btn-outline{background:#fff}
.mobile-menu-btn{display:block;background:none;border:2px solid #e2e8f0;border-radius:.5rem;padding:.5rem}

@media (min-width:768px){
  .nav{display:flex}
  .mobile-menu-btn{display:none}
}

/* Drawer */
.menu-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);opacity:0;pointer-events:none;transition:.25s;z-index:60}
.menu-overlay.open{opacity:1;pointer-events:auto}

.mobile-menu{position:fixed;top:0;left:-100%;width:80%;max-width:300px;height:100vh;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.12);transition:left .25s;z-index:70;padding:1rem;display:flex;flex-direction:column}
.mobile-menu.open{left:0}

.mobile-menu-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e2e8f0;padding-bottom:.75rem;margin-bottom:.75rem}
.mobile-nav{list-style:none;margin:0;padding:0}
.mobile-nav a{display:block;padding:.9rem 0;border-bottom:1px solid #f1f5f9;color:var(--ink);text-decoration:none;font-weight:600}

/* ---- Cart row mobile fixes ---- */
.cart-row { display:flex; gap:.75rem; align-items:flex-start; }

.cart-main { flex:1 1 auto; min-width:0; }           /* allow text to shrink */
.cart-side { flex:0 0 auto; text-align:right; }      /* price / qty / remove */

.cart-title {
  font-weight:700;
  line-height:1.25;
  word-break:break-word;          /* break long words */
  overflow-wrap:anywhere;         /* last-resort wrap */
  hyphens:auto;                   /* nicer breaking when possible */
}

/* simple line-clamp utilities (no Tailwind plugin needed) */
.lc-1, .lc-2 { display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden; }
.lc-1 { -webkit-line-clamp:1; }
.lc-2 { -webkit-line-clamp:2; }

/* keep the small badges from wrapping ugly */
.cart-meta { display:flex; flex-wrap:wrap; gap:.5rem; color:#475569; font-size:.9rem; }

/* make the small quantity input consistent */
.cart-qty { width:56px; text-align:center; }

/* spacing on each item card */
.cart-item { border:1px solid #e5e7eb; border-radius:14px; padding:14px; background:#fff; }

/* === Fix for long product names on the Cart page === */
.cart-item {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.cart-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cart-main {
  flex: 1;
  min-width: 0; /* allows wrapping instead of stretching */
}

.cart-side {
  flex: 0 0 auto;
  text-align: right;
}

.cart-title {
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Limit name to two lines on small screens */
.cart-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* On tablets and desktop, only 1 line */
@media (min-width: 768px) {
  .cart-title { -webkit-line-clamp: 1; }
}

.cart-meta {
  color: #475569;
  font-size: 0.9rem;
  margin-top: 4px;
}

.cart-qty {
  width: 56px;
  text-align: center;
}