/* =========================================================================
   Tramadol Shop — Responsive Pharmacy Design System & Stylesheet
   Palette: Medical Teal (#0D9488) · Clinical Slate (#0F172A) 
            Clean Ice (#F8FAFC) · Rx Amber (#D97706) · Clinical Blue (#0284C7)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Design Tokens: Medical & Pharmacy Palette */
  --pharmacy-bg: #FFFFFF;
  --pharmacy-surface: #F8FAFC;
  --pharmacy-surface-mint: #F0FDF4;
  
  --ink: #0F172A;
  --ink-soft: #475569;
  --ink-light: #64748B;
  
  --teal-primary: #0D9488;
  --teal-dark: #0F766E;
  --teal-light: #CCFBF1;
  
  --blue-medical: #0284C7;
  --blue-medical-light: #E0F2FE;
  
  --rx-amber: #D97706;
  --rx-amber-bg: #FEF3C7;
  
  --alert-red: #DC2626;
  --alert-red-bg: #FEE2E2;
  
  --line: #E2E8F0;
  --white: #FFFFFF;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 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 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Reset & Horizontal Overflow Protection */
*, *::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;
}

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

/* ---------- Top Medical & Regulatory Bar ---------- */
.pharmacy-topbar {
  background: var(--ink);
  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: var(--teal-primary); }
.pharmacy-topbar-secondary { display: none; }

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

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

/* ---------- Prescription & OTC Tags ---------- */
.rx-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--rx-amber-bg);
  border: 1px solid rgba(217, 119, 6, 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(16, 185, 129, 0.3);
  color: #047857;
}

.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: 600;
  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: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: all .15s ease-in-out;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--teal-primary); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); box-shadow: var(--shadow-md); }
.btn-amber { background: var(--rx-amber); color: var(--white); }
.btn-amber:hover { background: #b45309; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--teal-primary); color: var(--teal-primary); }
.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, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  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: var(--teal-primary);
  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: 500;
  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-primary); font-weight: 600; }
.nav-links a.active::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 2px; background: var(--teal-primary);
  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-primary); color: var(--teal-primary); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--teal-primary); 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);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 48px 0 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-primary); }
.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;
  background: linear-gradient(135deg, var(--pharmacy-surface) 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; }

/* ---------- Section Layouts & Responsive Grids ---------- */
.section { padding: 50px 0; }
.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; }
.section-tight { padding: 24px 0; }

.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; }

/* ---------- Cards & Modules ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-primary); }
.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; }

.cat-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 135px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--pharmacy-surface);
  border: 1px solid var(--line);
  transition: all .2s ease;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--teal-primary); box-shadow: var(--shadow-md); }
.cat-card span.count { font-family: var(--font-mono); font-size: 12px; }
.cat-card h3 { margin: 4px 0 0; font-size: 17.5px; }

/* ---------- Product Cards & Thumbnails ---------- */
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all .2s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #CBD5E1; }
.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: 600; color: var(--teal-primary); 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;}

/* ---------- Shop Layout & Filters ---------- */
.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: 600; 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-primary); }
.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: 20px 0; }
.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-primary); }
.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: 600; 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;}

/* ---------- Forms & Inputs ---------- */
.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: 15px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* ---------- Contact Page 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, var(--ink) 0%, var(--teal-dark) 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(13, 148, 136, 0.2);
  border-radius: 50%;
  filter: blur(36px);
  pointer-events: none;
}

.status-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.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: #94A3B8;
  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 0.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-primary);
}

.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;
}

/* ---------- Admin Dashboard & Login Components ---------- */
.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-primary); 
  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: #94A3B8; 
  transition: all 0.15s ease;
}

.admin-nav a:hover, .admin-nav a.active { 
  background: rgba(255, 255, 255, 0.08); 
  color: #FFFFFF; 
}

.admin-nav a svg { color: var(--teal-primary); }

.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: 0.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-primary); 
  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; 
}

.admin-panel h3 { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  font-size: 17px; 
  color: var(--ink); 
  margin-bottom: 16px; 
}

/* Data Tables */
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; 
}

/* Drag and Drop Zone */
.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 0.2s ease, background 0.2s ease;
  position: relative;
}

.drop-zone.dragover {
  border-color: var(--teal-primary);
  background: var(--teal-light);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink-soft);
}

.image-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.image-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Bar Chart */
.bar-chart { 
  display: flex; 
  align-items: flex-end; 
  gap: 8px; 
  height: 120px; 
  padding-top: 10px; 
}

.bar-chart .bar { 
  flex: 1; 
  background: var(--teal-primary); 
  border-radius: 4px 4px 0 0; 
  position: relative; 
  min-height: 4px; 
  transition: background 0.2s ease; 
}

.bar-chart .bar:hover { 
  background: var(--rx-amber); 
}

.simple-textarea-blog { 
  width: 100%; 
  min-height: 180px; 
  font-family: var(--font-body); 
  font-size: 15px; 
  padding: 12px; 
  border-radius: var(--radius-md); 
  border: 1px solid var(--line); 
}

/* Login Shell */
.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 {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 200;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  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.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); }

/* ---------- Blog & Articles ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.blog-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.blog-cover { height: 150px; display: flex; align-items: flex-end; padding: 12px; position: relative; background-size: cover; background-position: center; }
.blog-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.blog-card-body h3 { font-size: 17px; margin-bottom: 6px; color: var(--ink); }
.blog-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-light); margin-bottom: 6px; }

/* ---------- Floating WhatsApp Support Button ---------- */
.whatsapp-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 90;
  background: #25D366; color: #fff; width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0B132B;
  color: #CBD5E1;
  margin-top: 70px;
  padding: 50px 0 24px;
  border-top: 3px solid var(--teal-primary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
}
.footer-grid h4 { color: #FFFFFF; font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: .05em; text-transform: uppercase;}
.footer-grid a, .footer-grid p { color: #94A3B8; font-size: 13.5px; }
.footer-grid a:hover { color: #FFFFFF; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 36px; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: #64748B;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .mark { background: var(--teal-primary); color: #FFFFFF; }
.disclaimer-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 11.5px;
  color: #94A3B8;
  margin-top: 16px;
  line-height: 1.5;
}

/* ---------- 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); }

/* =========================================================================
   3-TIER RESPONSIVE MEDIA QUERIES (Desktop, Tablet, Mobile)
   ========================================================================= */

/* Tier 1: Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tier 2: Mid Breakpoint (<= 860px) */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 24px 0 16px; }
  .hero-visual { min-height: 280px; }
  
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links { 
    position: fixed; 
    top: 65px; 
    left: 0; 
    right: 0; 
    background: var(--white); 
    flex-direction: column; 
    align-items: stretch;
    padding: 20px 24px; 
    gap: 12px;
    border-bottom: 1px solid var(--line); 
    box-shadow: var(--shadow-lg);
    display: none; 
    z-index: 150;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .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-template-columns: 1fr; gap: 24px; }
  .grid-2 { grid-template-columns: 1fr; gap: 20px; }
  
  .contact-grid-wrapper { grid-template-columns: 1fr; gap: 20px; }
  .modern-form-row { grid-template-columns: 1fr; }
  .modern-contact-form-card, .pharmacy-info-card { padding: 24px; }

  /* Admin responsive layout */
  .admin-shell { flex-direction: column; }
  .admin-sidebar { 
    width: 100%; 
    padding: 16px 20px; 
    border-right: none; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
  }
  .admin-sidebar .brand { margin-bottom: 16px; }
  .admin-nav { flex-direction: row; overflow-x: auto; white-space: nowrap; gap: 8px; padding-bottom: 4px; }
  .admin-nav a { padding: 8px 12px; font-size: 13px; }
  .admin-main { padding: 24px 20px; }
}

/* Tier 3: Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 36px 0; }
  
  .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-trust { gap: 16px; justify-content: space-between; }
  .hero-actions .btn { width: 100%; }

  .grid-4, .grid-3, .grid-2, .product-grid, .blog-grid, .footer-grid, .form-grid, .stat-grid { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }
  
  .cart-drawer { width: 100vw; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
  
  .whatsapp-float { bottom: 16px; right: 16px; width: 46px; height: 46px; }
}