/* ============================================
   داروخانه رایکا — Design tokens
   ============================================ */
:root {
  --ink: #101828;
  --bg: #F5F7FB;
  --surface: #FFFFFF;

  --brand: #12B886;
  --brand-dark: #0B7A5B;
  --brand-light: #E3F9F0;

  --violet: #7C5CFC;
  --violet-light: #EFEAFF;

  --coral: #FF6B6B;
  --coral-dark: #C13E2E;
  --coral-light: #FFE9E9;

  --muted: #64748B;
  --line: #E7EAF3;

  --gradient-primary: linear-gradient(135deg, var(--brand), var(--violet));
  --gradient-accent: linear-gradient(135deg, var(--violet), var(--coral));

  --font-body: "Vazirmatn", system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 16px 40px rgba(16, 24, 40, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 24px;
}

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}

p { line-height: 1.85; margin: 0; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================
   Scroll reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background-position 0.5s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-accent {
  background: var(--gradient-primary);
  background-size: 220% 220%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 10px 26px rgba(18, 184, 134, 0.28);
}
.btn-accent:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(124, 92, 252, 0.32);
}
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }
.btn-block { width: 100%; }

/* ============================================
   Header
   ============================================ */
.site-header { position: sticky; top: 0; z-index: 50; }
.header-bar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-block: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 800; }
.logo-mark { width: 32px; height: 32px; }
.logo em { font-style: normal; color: var(--violet); }

.search-form {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 100px;
  padding: 4px 6px;
  max-width: 520px;
  justify-self: center;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-form:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-light); }
.search-form input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 8px 6px;
  color: var(--ink);
}
.search-form input:focus { outline: none; }
.search-form button {
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative;
  border: none;
  background: transparent;
  color: var(--ink);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { background: var(--brand-light); transform: scale(1.06); }
.cart-count {
  position: absolute;
  top: -2px; inset-inline-end: -2px;
  background: var(--coral);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  padding: 0 2px;
}
@keyframes cartPop { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.cart-count.pop { animation: cartPop 0.4s ease; }

.category-bar {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 12px 24px;
  background: linear-gradient(90deg, var(--brand-dark), var(--violet));
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-bar a {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.category-bar a:hover { color: #fff; }

/* ============================================
   Hero — prescription label + animated blobs
   ============================================ */
.hero { position: relative; overflow: hidden; padding: 64px 0 44px; }

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -28px) scale(1.08); }
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  z-index: 0;
  animation: floatBlob 11s ease-in-out infinite;
  pointer-events: none;
}
.hero-blob-1 { width: 400px; height: 400px; background: var(--brand); inset-inline-start: -100px; top: -80px; }
.hero-blob-2 { width: 340px; height: 340px; background: var(--violet); inset-inline-end: -80px; top: 140px; animation-duration: 14s; animation-delay: 1.2s; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: start;
}

.rx-label {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 42px 30px;
  position: relative;
  box-shadow: var(--shadow-md);
}
.rx-label-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--violet);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-title {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 20px;
  max-width: 50ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.rx-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.rx-meta dt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.rx-meta dd { margin: 0; font-weight: 700; font-size: 0.92rem; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.rx-perforation {
  position: absolute;
  inset-inline: -1.5px; bottom: -1px;
  height: 0;
  border-bottom: 2px dotted var(--line);
}

.hero-side { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; position: relative; z-index: 1; }
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.stat-card-accent { background: var(--gradient-primary); border-color: transparent; color: #fff; }
.stat-num { font-size: 2rem; font-weight: 800; }
.stat-label { font-size: 0.84rem; color: var(--muted); }
.stat-card-accent .stat-label { color: rgba(255,255,255,0.85); }

/* ============================================
   Full-width banner carousel
   ============================================ */
.banner-carousel {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}
.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.banner-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-inline: 60px;
}
.banner-slide::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--slide-gradient, linear-gradient(120deg, var(--brand-dark), var(--violet)));
  z-index: 0;
}
.banner-slide-blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  z-index: 0;
}
.banner-slide-content { position: relative; z-index: 1; max-width: 680px; color: #fff; }
.banner-tag {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.banner-slide-content h3 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.35; margin-bottom: 12px; }
.banner-slide-content p { color: rgba(255,255,255,0.88); font-size: 1rem; margin-bottom: 22px; }
.banner-slide-cta {
  display: inline-flex;
  padding: 13px 26px;
  border-radius: 100px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.banner-arrow {
  display: none;
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  z-index: 2;
  transition: background 0.2s ease;
}
.banner-arrow:hover { background: rgba(255,255,255,0.3); }
.banner-arrow-prev { inset-inline-start: 24px; }
.banner-arrow-next { inset-inline-end: 24px; }

.banner-dots {
  position: absolute;
  bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}
.banner-dot {
  width: 8px; height: 8px;
  border-radius: 100px;
  background: rgba(255,255,255,0.45);
  border: none;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.banner-dot.is-active { width: 26px; background: #fff; }

@media (max-width: 680px) {
  .banner-carousel { height: 320px; }
  .banner-slide { padding-inline: 28px; }
}

/* ============================================
   Discount / countdown section
   ============================================ */
.discount-section { background: var(--violet-light); }
.discount-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.discount-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 6px; }

.global-countdown {
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.global-countdown-label { font-size: 0.8rem; font-weight: 600; }
.global-countdown-boxes { display: flex; gap: 8px; }
.time-box {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 46px;
  text-align: center;
}
.time-box span { display: block; font-weight: 800; font-size: 1.1rem; }
.time-box small { font-size: 0.62rem; opacity: 0.85; }

.discount-badge {
  position: absolute;
  top: 14px; inset-inline-start: 14px;
  background: var(--coral);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 100px;
  z-index: 1;
}
.discount-timer-pill {
  margin-top: 4px;
  background: var(--coral-light);
  color: var(--coral-dark);
  border-radius: 100px;
  padding: 8px 10px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ============================================
   Signature pulse divider
   ============================================ */
.pulse-divider { background: var(--bg); line-height: 0; }
.pulse-divider svg { width: 100%; height: 46px; }
.pulse-divider path {
  fill: none;
  stroke: url(#pulseGrad);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw-pulse 2.2s ease-out forwards;
  filter: drop-shadow(0 2px 6px rgba(124, 92, 252, 0.3));
}
@keyframes draw-pulse { to { stroke-dashoffset: 0; } }

/* ============================================
   Sections
   ============================================ */
.section { padding: 76px 0; }
.section-tint { background: var(--violet-light); }
.section-brand { background: linear-gradient(120deg, var(--brand-dark), var(--violet)); color: #fff; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--violet);
  margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.category-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: start;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.category-card:hover { border-color: var(--violet); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.category-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease;
}
.category-card:hover .category-icon { transform: rotate(-8deg) scale(1.12); background: var(--gradient-primary); color: #fff; }
.category-name { font-weight: 700; font-size: 0.96rem; }
.category-count { font-size: 0.78rem; color: var(--muted); }

/* Chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip.is-active { background: var(--gradient-primary); border-color: transparent; color: #fff; }
.chip:hover:not(.is-active) { border-color: var(--violet); color: var(--violet); }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.skeleton-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skeleton-card {
  height: 300px;
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, var(--line) 25%, #F0F2FA 37%, var(--line) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.product-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.product-card:hover { box-shadow: 0 18px 40px rgba(124, 92, 252, 0.18); transform: translateY(-6px); border-color: var(--violet); }

@keyframes badgePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.product-badge {
  position: absolute;
  top: 14px; inset-inline-start: 14px;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 100px;
  animation: badgePulse 2.4s ease-in-out infinite;
  z-index: 1;
}
.product-badge.rx { background: var(--ink); animation: none; }

.product-thumb {
  height: 300px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-light), var(--violet-light));
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  overflow: hidden;
  cursor: pointer;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-category { font-size: 0.74rem; font-weight: 600; color: var(--violet); }
.product-name { font-weight: 700; font-size: 0.98rem; line-height: 1.5; min-height: 3em; cursor: pointer; }
.product-rating { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.product-rating strong { color: var(--ink); }

.product-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.product-price { font-size: 1.05rem; font-weight: 800; }
.product-price-old { font-size: 0.82rem; color: var(--muted); text-decoration: line-through; }
.product-low-stock { font-size: 0.78rem; color: var(--coral-dark, #C13E2E); font-weight: 600; }

.add-to-cart-btn {
  margin-top: 6px;
  border: 1.5px solid var(--brand);
  background: var(--surface);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 11px;
  border-radius: 100px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}
.add-to-cart-btn:hover { background: var(--gradient-primary); color: #fff; border-color: transparent; }
.add-to-cart-btn:active { transform: scale(0.97); }
.add-to-cart-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Upload / Rx pad */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.upload-copy h2 { margin-top: 8px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.upload-copy p { margin-top: 16px; color: var(--muted); max-width: 44ch; }
.check-list { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: 0.94rem; font-weight: 600; }
.check-list li::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gradient-accent);
  flex-shrink: 0;
}

.rx-pad {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rx-pad-header { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.rx-pad-header span { font-size: 1.7rem; color: var(--violet); font-weight: 800; }
.rx-pad-header p { font-size: 0.8rem; font-weight: 700; color: var(--muted); }

.rx-pad label { display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; font-weight: 700; }
.rx-pad label span { font-weight: 400; color: var(--muted); }
.rx-pad input, .rx-pad textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rx-pad input:focus, .rx-pad textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-light); }
.rx-pad-note { font-size: 0.84rem; color: var(--brand-dark); font-weight: 600; min-height: 1.2em; }
.consultation-price-tag {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  text-align: center;
}
.consultation-price-tag strong { font-size: 1.05rem; }

/* Trust strip */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item svg { flex-shrink: 0; margin-top: 2px; }
.trust-item h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: 4px; }
.trust-item p { font-size: 0.86rem; color: rgba(255,255,255,0.85); }

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial {
  margin: 0;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.testimonial p { font-size: 1.05rem; line-height: 1.8; font-weight: 500; }
.testimonial cite { display: block; margin-top: 18px; font-style: normal; font-size: 0.84rem; color: var(--muted); font-weight: 600; }

/* Newsletter */
.newsletter-section { padding-bottom: 96px; }
.newsletter-inner {
  background: linear-gradient(120deg, var(--ink), #2A2452);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 46px 50px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  align-items: center;
}
.newsletter-inner h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 8px; }
.newsletter-inner p { color: #B8BFDA; margin-top: 10px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1;
  padding: 13px 18px;
  border-radius: 100px;
  border: 1.5px solid #3A3568;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 0.9rem;
}
.newsletter-form input::placeholder { color: #8A8FBE; }
.newsletter-inner .rx-pad-note { grid-column: 1 / -1; color: #8FE0C4; }

/* ============================================
   Cart drawer
   ============================================ */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(400px, 92vw);
  background: var(--surface);
  z-index: 95;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
  box-shadow: 12px 0 40px rgba(0,0,0,0.12);
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.cart-drawer-head h2 { font-size: 1.3rem; }
.cart-drawer-head button { background: none; border: none; color: var(--ink); }

.cart-items { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 16px; }
.cart-empty { color: var(--muted); text-align: center; padding: 40px 0; }

.cart-item { display: flex; gap: 12px; align-items: center; animation: itemIn 0.3s ease; }
@keyframes itemIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cart-item-thumb { width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-light), var(--violet-light)); color: var(--brand-dark); display: grid; place-items: center; flex-shrink: 0; font-weight: 800; overflow: hidden; }
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.88rem; font-weight: 700; line-height: 1.4; }
.cart-item-price { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-weight: 800; line-height: 1; transition: background 0.2s ease; }
.qty-btn:hover { background: var(--violet-light); }
.cart-item-remove { background: none; border: none; color: var(--coral); font-size: 0.76rem; font-weight: 600; text-decoration: underline; margin-inline-start: auto; }

.cart-drawer-foot { padding: 20px 24px; border-top: 1px solid var(--line); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 1.02rem; margin-bottom: 14px; font-weight: 700; }
.cart-total-row:not(.cart-total-row-grand) { font-weight: 500; color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.cart-total-row-grand { padding-top: 10px; border-top: 1px dashed var(--line); font-size: 1.08rem; }
.cart-shipping-free { color: var(--brand-dark); }

/* ============================================
   Product detail page
   ============================================ */
.product-page { padding: 32px 0 64px; }

.product-breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-breadcrumb a { color: var(--muted); }
.product-breadcrumb a:hover { color: var(--brand-dark); }
.product-breadcrumb span:last-child { color: var(--ink); font-weight: 600; }

.product-detail-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.product-detail-body { display: contents; }

.product-detail-media {
  position: relative;
  min-height: 380px;
  background: linear-gradient(135deg, var(--brand-light), var(--violet-light));
  display: grid;
  place-items: center;
}
.product-detail-media img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.product-detail-media-fallback { color: var(--brand-dark); transform: scale(3.4); }
.product-detail-media .product-badge { top: 18px; inset-inline-start: 18px; position: absolute; }

.product-detail-info {
  padding: 36px 38px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.product-detail-name { font-size: 1.65rem; line-height: 1.5; }
.product-detail-rx {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 12px;
  width: fit-content;
}

.product-detail-description {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
  padding-inline-end: 4px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.product-detail-add-btn { margin-top: 8px; align-self: flex-start; min-width: 220px; }

@media (max-width: 720px) {
  .product-detail-modal { grid-template-columns: 1fr; }
  .product-detail-media, .product-detail-media img { min-height: 260px; }
  .product-detail-info { padding: 24px 20px; }
  .product-detail-add-btn { width: 100%; }
}

.product-detail-skeleton { min-height: 420px; }

.related-products { margin-top: 56px; }
.related-products h2 { margin-bottom: 18px; font-size: 1.15rem; }

.checkout-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.checkout-form input {
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg);
}
.checkout-form input:focus { outline: none; border-color: var(--violet); }
.checkout-status { font-size: 0.82rem; color: var(--brand-dark); font-weight: 600; min-height: 1.2em; }

/* ============================================
   Footer
   ============================================ */
.site-footer { background: var(--ink); color: #C9CEDB; padding: 64px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: 14px; font-size: 0.86rem; color: #9BA2BD; max-width: 34ch; }
.footer-col h4 { font-size: 0.84rem; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 0.9rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { padding: 22px 24px; font-size: 0.78rem; color: #7A8099; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; overflow-x: auto; }
  .stat-card { min-width: 190px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .skeleton-row { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .newsletter-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .header-inner { grid-template-columns: auto auto; }
  .search-form { grid-column: 1 / -1; order: 3; max-width: none; }
  .rx-label { padding: 28px 22px 22px; }
  .rx-meta { gap: 18px; }
  .category-grid { grid-template-columns: 1fr; }
  .product-grid, .skeleton-row { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .hero-blob { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse-divider path { animation: none; stroke-dashoffset: 0; }
  .hero-blob { animation: none; }
  .product-badge { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .category-card:hover, .product-card:hover, .stat-card:hover, .testimonial:hover { transform: none; }
}

/* ---- Lightweight toast, used for cart/stock messages ---- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 400;
  max-width: 90vw;
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
