/* =========================================================================
   Tramadol Shop — Optimized Medical Pharmacy Design System & Stylesheet
   Complete Multi-Page Stylesheet: Home · Shop · Detail · Blog · Contact · Admin
   Palette: Medical Cyan (#0284C7) · Deep Clinical Navy (#0369A1)
            Clean Ice (#E0F2FE) · Midnight Slate (#0F172A) · Snow (#FAFCFE)
   ========================================================================= */

:root {
  /* Design Tokens: Medical & Pharmacy Palette (WCAG AAA/AA Compliant) */
  --pharmacy-bg: #FAFCFE;
  --pharmacy-surface: #F0F6F9;
  --pharmacy-surface-mint: #E0F2FE; /* Soft Ice Cyan */
  
  --ink: #0F172A;           /* Midnight Slate Ink (16.1:1 on white) */
  --ink-soft: #334155;      /* Deep Muted Slate (9.5:1 on white) */
  --ink-light: #475569;     /* Steel Slate (7.0:1 on white - passes AAA) */
  
  --teal-primary: #0284C7;  /* Medical Cyan-Blue (Primary Accent) */
  --teal-dark: #0369A1;     /* Deep Clinical Navy */
  --teal-light: #E0F2FE;    /* Soft Ice Pearl */
  
  --blue-medical: #0284C7;  /* Clean Medical Blue */
  --blue-medical-light: #E0F2FE;
  
  --rx-amber: #92400E;      /* Muted Sand Gold */
  --rx-amber-bg: #FEF3C7;   /* Soft Sand Linen */
  
  --alert-red: #991B1B;     /* High-Contrast Alert Red */
  --alert-red-bg: #FEE2E2;  
  
  --line: #E2E8F0;          /* Subtle Border Line */
  --white: #FFFFFF;

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Borders & Shadows */
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.11);
}

/* ---------- Accessibility & Screen Reader Helpers ---------- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible { outline: 3px solid var(--teal-primary); outline-offset: 3px; }

/* ---------- Global Reset & Layout Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background: var(--pharmacy-bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  width: 100%;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 .5em;
  color: var(--ink);
  letter-spacing: -0.02em;
  word-wrap: break-word;
}

/* ---------- Core Container ---------- */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

/* ---------- Top Medical & Regulatory Bar ---------- */
.pharmacy-topbar {
  background: #0F172A;
  color: #94A3B8;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.pharmacy-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pharmacy-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #E2E8F0;
}
.pharmacy-badge-item svg { color: #38BDF8; }
.pharmacy-topbar-secondary { display: none; }

/* ---------- Eyebrow & Tags ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.eyebrow::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--teal-primary);
  display: inline-block;
}

.rx-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--rx-amber-bg);
  border: 1px solid rgba(180, 83, 9, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--rx-amber);
}
.rx-tag.otc {
  background: var(--pharmacy-surface-mint);
  border-color: rgba(2, 132, 199, 0.3);
  color: var(--teal-dark);
}

.label-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 28px;
  color: var(--ink-light);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.label-divider::before, .label-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--teal-dark); color: var(--white); }
.btn-primary:hover { background: #074E72; box-shadow: var(--shadow-md); }
.btn-amber { background: var(--rx-amber); color: var(--white); }
.btn-amber:hover { background: #883B07; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 2px solid var(--teal-dark); color: var(--teal-dark); }
.btn-outline:hover { background: var(--teal-light); color: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--pharmacy-surface); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--line);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.brand .mark {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284C7, #0369A1);
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-weight: 600;
  font-size: 14.5px;
}
.nav-links a { position: relative; padding: 4px 0; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a.active { color: var(--teal-dark); font-weight: 700; }
.nav-links a.active::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 2px; background: var(--teal-dark);
  border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  position: relative;
  background: var(--pharmacy-surface);
  border: 1px solid var(--line); 
  border-radius: 50%;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--ink);
}
.cart-btn:hover { border-color: var(--teal-dark); color: var(--teal-dark); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--teal-dark); color: #fff;
  font-size: 11px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-toggle { 
  display: none; 
  background: none; 
  border: none; 
  font-size: 24px;
  padding: 4px;
  color: var(--ink, #0F172A);
  cursor: pointer;
}

/* ---------- Hero Section ---------- */
.hero {
  padding-top: 48px;
  padding-bottom: 32px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.18;
  margin: 14px 0 18px;
  color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--teal-dark); }
.hero p.lead { font-size: 16.5px; color: var(--ink-soft); max-width: 500px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 24px; margin-top: 32px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; }
.hero-trust div { font-family: var(--font-mono); font-size: 12px; color: var(--ink-light); }
.hero-trust b { display: block; font-family: var(--font-display); font-size: 19px; color: var(--ink); }

.hero-visual {
  position: relative;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, #F0F6F9 0%, #E0F2FE 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
}
.hero-visual .sticker {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  z-index: 2;
  max-width: 90%;
}
.hero-visual .sticker.s1 { top: 12px; left: 12px; }
.hero-visual .sticker.s2 { bottom: 12px; right: 12px; }

/* ---------- Sections ---------- */
.section { padding-top: 50px; padding-bottom: 50px; content-visibility: auto; contain-intrinsic-size: 800px; }
.section-tight { padding-top: 24px; padding-bottom: 24px; }
.section-head { max-width: 600px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(22px, 2.8vw, 32px); }
.section-head p { color: var(--ink-soft); font-size: 15.5px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-dark); }
.card .icon-box {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--teal-light); color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.card h3 { font-size: 16.5px; margin-bottom: 6px; }
.card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---------- Product & Medication Cards ---------- */
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #7DD3FC; }
.product-thumb {
  background: #FFFFFF;
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.product-thumb img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform .3s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.05); }
.product-thumb .rx-tag { position: absolute; top: 10px; left: 10px; z-index: 2; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-category { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .05em; }
.product-body h3 { font-size: 15.5px; margin: 0; color: var(--ink); }
.product-ingredient { font-size: 12px; color: var(--ink-light); }
.product-rating { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 4px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.price { font-family: var(--font-display); font-size: 18px; color: var(--ink); font-weight: 700; }
.price .size { font-family: var(--font-body); font-size: 11.5px; color: var(--ink-light); display: block; font-weight: 400; }

.medication-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.medication-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(35,28,26,0.08);
  border-color: var(--teal-primary);
}
.medication-img-wrap {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: #F0F6F9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.medication-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.3s ease;
}
.medication-card:hover .medication-img-wrap img { transform: scale(1.05); }
.medication-card .card-action {
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--teal-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.medication-card:hover .card-action { text-decoration: underline; }
.home-medication-section { margin-bottom: 36px; }
.home-medication-heading {
  border-bottom: 2px solid var(--teal-primary);
  padding-bottom: 8px;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
}
.home-medication-category {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-primary);
  margin-bottom: 6px;
}
.home-medication-price { margin-top: 10px; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.home-medication-size { font-size: 12px; font-weight: 500; color: var(--ink-light); margin-left: 6px; }
.home-medication-loading,
.home-medication-error {
  padding: 36px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  background: var(--pharmacy-surface);
}

/* ---------- Shop & Catalog Layout ---------- */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.filter-box { background: var(--pharmacy-surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; position: sticky; top: 85px; }
.filter-box h4 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 12px; }
.filter-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.filter-opt input { accent-color: var(--teal-dark); }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------- Product Detail Page ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; padding-top: 20px; padding-bottom: 20px; }
.product-detail-visual { background: var(--pharmacy-surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; position: relative; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.breadcrumb { font-family: var(--font-mono); font-size: 12px; color: var(--ink-light); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--teal-dark); }
.product-price-row { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 18px; }
.product-price-row .big-price { font-family: var(--font-display); font-size: 30px; color: var(--ink); font-weight: 700; }
.stars { color: var(--rx-amber); font-size: 14px; }
.accordion-item { border-top: 1px solid var(--line); padding: 14px 0; }
.accordion-item summary { cursor: pointer; font-weight: 700; font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.accordion-item p { margin-top: 10px; color: var(--ink-soft); font-size: 14px; }
.qty-select { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; width: fit-content; background: var(--white); }
.qty-select button { border: none; background: none; width: 36px; height: 36px; font-size: 18px; }
.qty-select span { width: 28px; text-align: center; font-family: var(--font-mono); font-weight: 600; }

/* ---------- Blog & Health Advisory Articles ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.blog-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-dark); }
.blog-cover {
  height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--pharmacy-surface);
}
.blog-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.6) 0%, transparent 70%);
  pointer-events: none;
}
.blog-cover .badge { position: relative; z-index: 2; }
.blog-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.blog-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-light); margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.blog-card-body h3 { font-size: 18px; line-height: 1.35; margin-bottom: 8px; color: var(--ink); font-weight: 700; }
.blog-card-body p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin-bottom: 16px; }
.blog-read-link { font-size: 13.5px; font-weight: 700; color: var(--teal-dark); display: inline-flex; align-items: center; gap: 4px; margin-top: auto; }
.blog-read-link:hover { text-decoration: underline; }

.article-header { max-width: 800px; margin: 0 auto 32px; }
.article-content { max-width: 800px; margin: 0 auto; font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.article-content h2 { font-size: 24px; margin: 32px 0 16px; color: var(--ink); }
.article-content h3 { font-size: 20px; margin: 24px 0 12px; color: var(--ink); }
.article-content p { margin-bottom: 20px; }
.article-content blockquote {
  border-left: 4px solid var(--teal-dark);
  background: var(--pharmacy-surface);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink);
}
.simple-textarea-blog { width: 100%; min-height: 180px; font-family: var(--font-body); font-size: 16px; padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--line); }

/* ---------- Forms & Status Messages ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, .15);
}

.form-status {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
}
.form-status.show { display: block; }
.form-status.ok {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}
.form-status.err {
  background: var(--alert-red-bg);
  color: var(--alert-red);
  border: 1px solid rgba(153, 27, 27, 0.3);
}

/* ---------- Contact Components ---------- */
.contact-hero-banner { padding: 24px 0 12px; }
.contact-grid-wrapper { display: grid; grid-template-columns: 1fr 1.35fr; gap: 32px; align-items: start; margin-top: 24px; }
.pharmacy-info-card {
  background: linear-gradient(145deg, #0F172A 0%, #0369A1 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pharmacy-info-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(56, 189, 248, 0.2);
  border-radius: 50%; filter: blur(36px); pointer-events: none;
}
.status-badge-live {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7DD3FC;
  padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; font-family: var(--font-mono);
  margin-bottom: 20px;
}
.status-dot {
  width: 8px; height: 8px; background: #38BDF8; border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite; will-change: transform, opacity;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(0.95); opacity: 0.75; }
  50% { transform: scale(1); opacity: 1; }
}
.contact-feature-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-feature-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-light); flex-shrink: 0;
}
.contact-feature-text strong { display: block; font-size: 14.5px; color: var(--white); margin-bottom: 2px; }
.contact-feature-text span { font-size: 13px; color: #CBD5E1; line-height: 1.45; display: block; }

.modern-contact-form-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm);
}
.form-header-title { font-size: 20px; color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.form-header-subtitle { color: var(--ink-soft); font-size: 14px; margin-bottom: 24px; }
.modern-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.input-icon-group { position: relative; display: flex; align-items: center; }
.input-icon-group svg { position: absolute; left: 12px; color: var(--ink-light); pointer-events: none; transition: color .2s ease; }
.input-icon-group input, .input-icon-group select, .input-icon-group textarea { padding-left: 40px !important; }
.input-icon-group input:focus ~ svg, .input-icon-group select:focus ~ svg, .input-icon-group textarea:focus ~ svg { color: var(--teal-dark); }

.select-wrapper { position: relative; }
.select-wrapper::after {
  content: ''; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 5px solid var(--ink-light); pointer-events: none;
}
.select-wrapper select { appearance: none; -webkit-appearance: none; padding-right: 36px !important; }

.security-note-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pharmacy-surface); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: var(--radius-md); font-size: 12px; color: var(--ink-light); margin-top: 18px;
}

/* ---------- Floating WhatsApp & Telegram Widget ---------- */
.floating-chat-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}
.floating-chat-btn {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-chat-btn svg { width: 24px; height: 24px; }
.floating-chat-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.floating-chat-btn:active { transform: translateY(0) scale(0.96); }
.telegram-btn { background: #229ED9 !important; }
.whatsapp-btn { background: #25D366 !important; }

.chat-tooltip {
  position: absolute;
  right: 62px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #0F172A;
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.floating-chat-btn:hover .chat-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

/* ---------- Admin Dashboard & Graph Analytics ---------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--pharmacy-surface); }
.admin-sidebar {
  width: 250px; background: var(--ink); color: #CBD5E1; padding: 28px 20px;
  flex-shrink: 0; display: flex; flex-direction: column; border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-sidebar .brand { color: #FFFFFF; margin-bottom: 32px; font-size: 19px; }
.admin-sidebar .brand .mark { background: var(--teal-dark); color: #FFFFFF; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: var(--radius-md); font-size: 14px; font-weight: 500; color: #CBD5E1; transition: all .15s ease;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(3, 105, 161, 0.25); color: #FFFFFF; }
.admin-nav a svg { color: #38BDF8; }
.admin-main { flex: 1; padding: 36px 40px; max-width: 1280px; width: 100%; overflow-x: hidden; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.stat-card .lbl { font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--ink-light); letter-spacing: .05em; }
.stat-card .val { font-family: var(--font-display); font-size: 28px; color: var(--ink); margin-top: 6px; font-weight: 700; }
.stat-card .delta { font-size: 12px; color: var(--teal-dark); margin-top: 4px; font-weight: 500; }

.admin-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 28px; box-shadow: var(--shadow-sm); overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.admin-panel h2 { font-size: 18px; color: var(--ink); margin-bottom: 16px; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding: 16px 12px 0;
  background: var(--pharmacy-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-top: 14px;
}
.bar-chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--teal-primary) 0%, var(--teal-dark) 100%);
  border-radius: 4px 4px 0 0;
  min-height: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
  position: relative;
  cursor: pointer;
}
.bar-chart .bar:hover {
  background: linear-gradient(180deg, #38BDF8 0%, var(--teal-primary) 100%);
  transform: scaleY(1.04);
}

.image-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.image-preview img { max-height: 180px; border-radius: var(--radius-md); border: 1px solid var(--line); object-fit: cover; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 600px; }
table.data-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--ink-light); padding: 12px 10px; border-bottom: 1px solid var(--line); }
table.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--pharmacy-surface); vertical-align: top; color: var(--ink); }
table.data-table tr:hover td { background: var(--pharmacy-surface); }

.badge { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--teal-light); color: var(--teal-dark); display: inline-block; }

.drop-zone { border: 2px dashed var(--line); border-radius: var(--radius-md); padding: 28px; text-align: center; background: var(--pharmacy-surface); cursor: pointer; transition: border-color .2s ease, background .2s ease; position: relative; }
.drop-zone.dragover { border-color: var(--teal-dark); background: var(--teal-light); }
.drop-zone-content { display: flex; flex-direction: column; align-items: center; color: var(--ink-soft); }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); padding: 20px; }
.login-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px 32px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.1); }

/* ---------- Cart Drawer ---------- */
.cart-overlay {
  visibility: hidden;
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 200;
}
.cart-overlay.cart-ready { visibility: visible; }
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  visibility: hidden;
  position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 100vw;
  background: var(--white); z-index: 201; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.cart-ready { visibility: visible; }
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item .thumb { width: 52px; height: 52px; border-radius: 8px; background: var(--pharmacy-surface); flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.cart-item .info { flex: 1; }
.cart-item .info h5 { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; }
.qty-control { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.qty-control button { width: 24px; height: 24px; border-radius: 4px; border: 1px solid var(--line); background: var(--white); font-weight: 600; }
.cart-foot { padding: 18px 20px; border-top: 1px solid var(--line); background: var(--pharmacy-surface); }
.cart-empty { padding: 50px 20px; text-align: center; color: var(--ink-light); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0F172A;
  color: #CBD5E1;
  margin-top: 70px;
  padding: 56px 0 28px;
  border-top: 3px solid var(--teal-dark);
  font-size: 13.5px;
  line-height: 1.6;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr; gap: 36px; }
.footer-grid h2, .footer-grid h3, .footer-grid h4 {
  color: #FFFFFF; font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px;
}
.footer-grid p { color: #CBD5E1; font-size: 13.5px; line-height: 1.6; margin: 0 0 12px 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { color: #CBD5E1; font-size: 13.5px; margin-bottom: 10px; line-height: 1.5; }
.footer-grid li strong { color: #FFFFFF; font-weight: 600; }
.footer-grid a { color: #CBD5E1; font-size: 13.5px; transition: color .15s ease; text-decoration: none; }
.footer-grid a:hover, .footer-grid a.active { color: #FFFFFF; }
.footer-grid .pharmacy-badge-item { color: #CBD5E1; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; padding: 0; background: transparent; border: none; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .mark {
  width: 28px; height: 28px; border-radius: var(--radius-md); background: linear-gradient(135deg, #0284C7, #0369A1);
  display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.footer-brand strong { color: #FFFFFF; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.disclaimer-box { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-md); padding: 12px 14px; font-size: 12px; color: #CBD5E1; margin-top: 16px; line-height: 1.5; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 40px; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: #CBD5E1;
}
.footer-bottom span { color: #CBD5E1; }

/* ---------- Utility Classes ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-light); }

/* =========================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (min-width: 768px) {
  .pharmacy-topbar-secondary { display: inline-flex; }
}

@media (max-width: 1024px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .grid-4, .grid-3, .footer-grid, .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; padding-bottom: 16px; }
  .hero-visual { min-height: 280px; aspect-ratio: 3 / 2; }
  
  .nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .nav-links {
    position: fixed; top: 65px; left: 0; right: 0;
    background: #FFFFFF; flex-direction: column; align-items: stretch;
    padding: 20px 24px; gap: 12px; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.11); display: none; z-index: 150; max-height: calc(100vh - 65px); overflow-y: auto;
  }
  
  .nav-links.open { display: flex !important; }
  .nav-links a { padding: 10px 0; font-size: 15.5px; border-bottom: 1px solid var(--pharmacy-surface); }
  .nav-links a.active::after { display: none; }
  
  .shop-layout { grid-template-columns: 1fr; gap: 20px; }
  .filter-box { position: static; width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail, .grid-2, .contact-grid-wrapper, .modern-form-row, .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .modern-contact-form-card, .pharmacy-info-card { padding: 24px; }
}

@media (max-width: 640px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .section {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  .section-tight {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  .hero {
    padding-top: 20px !important;
    padding-bottom: 12px !important;
    gap: 20px;
  }

  [style*="padding:32px"],
  [style*="padding:30px"],
  [style*="padding: 32px"],
  [style*="padding: 30px"],
  [style*="padding:40px 24px"] {
    padding: 20px 16px !important;
  }

  .article-content,
  .article-header {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 15px;
    line-height: 1.7;
  }

  .article-content h2 { font-size: 24px; line-height: 1.35; }
  .article-content p { margin-bottom: 18px; }
  .article-content h1, .article-content h2, .article-content h3, .article-content h4, .article-content p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .brand img {
    width: 125px !important;
    height: 42px !important;
  }

  .site-footer img[alt="Tramadol.shop"] {
    width: 155px !important;
    height: 52px !important;
  }

  .pharmacy-topbar { font-size: 11.5px; text-align: center; }
  .pharmacy-topbar .container { justify-content: center; flex-direction: column; gap: 4px; }
  .navbar { padding: 12px 16px; }
  .brand { font-size: 18px; }
  .hero h1 { font-size: 26px; line-height: 1.25; margin: 10px 0 14px; }
  .hero p.lead { font-size: 14.5px; margin-bottom: 18px; }
  .hero-trust { gap: 12px; justify-content: space-between; }
  .hero-trust div { font-size: 11px; }
  .hero-trust b { font-size: 16px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; text-align: center; justify-content: center; }
  .hero form { flex-direction: column; max-width: 100% !important; }
  .hero form input { width: 100%; }
  .hero form .btn { width: 100%; padding: 12px 16px !important; }
  
  .grid-4, .grid-3, .grid-2, .product-grid, .blog-grid, .footer-grid, .form-grid, .stat-grid { 
    grid-template-columns: 1fr; 
    gap: 20px; 
  }

  .product-thumb { height: 160px; }
  .cart-drawer { width: 100vw; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  .floating-chat-container {
    bottom: 16px;
    right: 16px;
    gap: 10px;
  }
  .floating-chat-btn {
    width: 44px;
    height: 44px;
  }
  .chat-tooltip {
    display: none;
  }
}

@media (max-width: 400px) {
  .brand { font-size: 16px; gap: 8px; }
  .brand .mark { width: 30px; height: 30px; font-size: 14px; }
  .hero h1 { font-size: 22px; }
  .hero-visual { min-height: 220px; aspect-ratio: 3 / 2; padding: 12px; }
  .card, .product-card, .modern-contact-form-card, .pharmacy-info-card, .blog-card { padding: 14px; }
  .product-price-row .big-price { font-size: 24px; }
  .footer-grid h2, .footer-grid h3, .footer-grid h4 { font-size: 12px; }
  .footer-grid li, .footer-grid a, .footer-grid p { font-size: 12.5px; }
}

/* =========================================================
   Professional Clinical Gate Modal Styling
   ========================================================= */
.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.25s ease-out;
}

body.gate-locked {
  overflow: hidden !important;
  height: 100vh !important;
}

.gate-modal {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 32px 28px 26px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top Accent Line */
.gate-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284C7, #075985, #38BDF8);
}

/* Trust Pill */
.gate-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #E0F2FE;
  color: #0369A1;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.gate-badge-top svg {
  color: #0284C7;
}

.gate-header {
  text-align: left;
  margin-bottom: 20px;
}

.gate-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #F0F6F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #075985;
  margin-bottom: 12px;
}

.gate-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.gate-header p {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.gate-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.gate-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Position icon cleanly inside on the left */
.gate-input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none; /* Prevents icon from blocking input clicks */
  z-index: 2;
}

/* Add left padding so text starts AFTER the icon */
.gate-input-wrapper input {
  width: 100%;
  padding-left: 42px !important; /* <-- Fixes the overlap */
  padding-right: 14px;
  height: 44px;
  box-sizing: border-box;
}

.gate-input-wrapper input:focus {
  border-color: #0284C7;
  background: #FFFFFF;
  box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.14);
}

.gate-input-wrapper input:focus + .input-icon,
.gate-input-wrapper input:focus ~ .input-icon {
  color: #0284C7;
}

.gate-submit-btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #075985;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 12px rgba(7, 89, 133, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
}

.gate-submit-btn:hover {
  background: #0369A1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(7, 89, 133, 0.35);
}

.gate-submit-btn:active {
  transform: translateY(0);
}

.gate-error {
  color: #991B1B;
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}

/* Trust Disclaimers at Bottom */
.gate-trust-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
  font-size: 11.5px;
  color: #64748B;
}

.gate-trust-footer .trust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gate-trust-footer .trust-item svg {
  color: #0284C7;
}

.trust-dot {
  color: #CBD5E1;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
  .gate-modal {
    padding: 24px 20px 20px;
  }
  .gate-header h3 {
    font-size: 18px;
  }
}