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

/* ===== CSS VARIABLES ===== */
:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: #ccfbf1;
  --teal-pale: #f0fdfa;
  --aqua: #2dd4bf;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --dark: #0f2027;
  --slate: #334155;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --border: #e2e8f0;
  --bg: #f8fafb;
  --white: #ffffff;
  --success: #059669;
  --success-pale: #ecfdf5;
  --warning: #d97706;
  --warning-pale: #fffbeb;
  --error: #dc2626;
  --error-pale: #fef2f2;
  --grad-main: linear-gradient(90deg, #0d9488, #1d4ed8);
  --grad-dark: linear-gradient(135deg, #0f2027, #1e3a8a);
  --grad-accent: linear-gradient(90deg, #0d9488, #2dd4bf);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-modal: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-drop: 0 8px 32px rgba(0,0,0,0.12);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--dark); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
input, select, textarea, button { font-family: 'DM Sans', sans-serif; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, .brand { font-family: 'Syne', sans-serif; }
h1 { font-size: 32px; font-weight: 800; line-height: 1.2; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 700; }
p { color: var(--slate); line-height: 1.7; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--grad-main);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow-drop); }
.nav-brand { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.nav-brand span { color: var(--aqua); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn-nav-login { color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; padding: 7px 16px; border: 1.5px solid rgba(255,255,255,0.4); border-radius: 9999px; transition: all 0.2s; }
.btn-nav-login:hover { border-color: #fff; color: #fff; }
.btn-nav-signup { background: #fff; color: var(--teal); font-size: 13px; font-weight: 600; padding: 7px 18px; border-radius: 9999px; border: none; cursor: pointer; transition: all 0.2s; }
.btn-nav-signup:hover { background: var(--teal-pale); }
.nav-user { display: flex; align-items: center; gap: 10px; position: relative; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--aqua); color: var(--blue-dark); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-family: 'Syne', sans-serif; }
.nav-user-name { color: #fff; font-size: 13px; font-weight: 500; }
.nav-dropdown { position: absolute; top: 44px; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-modal); min-width: 160px; overflow: hidden; display: none; }
.nav-dropdown.open { display: block; }
.nav-dropdown a { display: block; padding: 10px 16px; font-size: 13px; color: var(--dark); transition: background 0.2s; }
.nav-dropdown a:hover { background: var(--bg); }
.nav-dropdown .logout { color: var(--error); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }

/* ===== MOBILE NAV DRAWER ===== */
.nav-drawer { position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; background: var(--grad-dark); z-index: 2000; transition: left 0.3s; padding: 24px; }
.nav-drawer.open { left: 0; }
.nav-drawer-brand { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 32px; }
.nav-drawer-brand span { color: var(--aqua); }
.nav-drawer a { display: block; color: rgba(255,255,255,0.85); font-size: 15px; font-weight: 500; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1999; display: none; }
.nav-overlay.open { display: block; }
.drawer-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* ===== FOOTER ===== */
footer { background: var(--grad-dark); padding: 48px 24px 24px; color: rgba(255,255,255,0.7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand-col .brand { font-size: 20px; color: #fff; margin-bottom: 8px; }
.footer-brand-col .brand span { color: var(--aqua); }
.footer-brand-col p { font-size: 13px; margin-bottom: 16px; }
.footer-payments { display: flex; gap: 8px; flex-wrap: wrap; }
.payment-badge { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 600; color: #fff; }
.footer-col h5 { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 16px; letter-spacing: 0.5px; text-transform: uppercase; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--aqua); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 12px; }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-bottom-links a:hover { color: var(--aqua); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-secondary:hover { background: #eff6ff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-outline:hover { background: var(--teal-pale); }
.btn-white { background: #fff; color: var(--teal); }
.btn-white:hover { background: var(--teal-pale); }
.btn-grad { background: var(--grad-main); color: #fff; }
.btn-grad:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #20b858; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 9999px; font-size: 11px; font-weight: 600; }
.badge-success { background: var(--success-pale); color: var(--success); }
.badge-warning { background: var(--warning-pale); color: var(--warning); }
.badge-error { background: var(--error-pale); color: var(--error); }
.badge-teal { background: var(--teal-soft); color: var(--teal-dark); }
.badge-blue { background: #eff6ff; color: var(--blue); }
.badge-gray { background: var(--bg); color: var(--gray); border: 1px solid var(--border); }
.badge-dot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ===== CARDS ===== */
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-card); }
.card-hover { transition: all 0.2s; cursor: pointer; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-modal); border-color: var(--teal); }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-label .required { color: var(--error); margin-left: 2px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--dark); background: #fff; transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
.form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }
.form-control.error { border-color: var(--error); }
.form-control::placeholder { color: var(--gray-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-hint { font-size: 12px; color: var(--gray); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.file-input-wrapper { position: relative; }
.file-input-wrapper input[type="file"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-input-display { border: 2px dashed var(--border); border-radius: 8px; padding: 20px; text-align: center; color: var(--gray); font-size: 13px; transition: border-color 0.2s; }
.file-input-display:hover { border-color: var(--teal); }
.file-input-display .icon { font-size: 24px; margin-bottom: 6px; }

/* ===== INPUT SEARCH ===== */
.search-bar { background: #fff; border: 1.5px solid var(--border); border-radius: 12px; display: flex; align-items: center; padding: 10px 16px; gap: 10px; box-shadow: var(--shadow-card); }
.search-bar input { flex: 1; border: none; outline: none; font-size: 14px; color: var(--dark); background: transparent; }
.search-bar input::placeholder { color: var(--gray-light); }
.search-bar .search-btn { background: var(--teal); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.search-bar .search-btn:hover { background: var(--teal-dark); }

/* ===== SECTION ===== */
.section { padding: 48px 24px; }
.section-sm { padding: 32px 24px; }
.section-title { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.section-sub { font-size: 14px; color: var(--gray); margin-bottom: 24px; }
.container { max-width: 1200px; margin: 0 auto; }

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ===== PHARMACY CARD ===== */
.pharmacy-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; }
.pharmacy-card:hover { border-color: var(--teal); box-shadow: var(--shadow-modal); transform: translateY(-2px); }
.pharmacy-avatar { width: 48px; height: 48px; border-radius: 10px; background: var(--teal-soft); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: var(--teal-dark); font-family: 'Syne', sans-serif; flex-shrink: 0; }
.pharmacy-info { flex: 1; min-width: 0; }
.pharmacy-name { font-size: 14px; font-weight: 600; color: var(--dark); }
.pharmacy-loc { font-size: 12px; color: var(--gray); margin-top: 2px; }
.pharmacy-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.pharmacy-rating { font-size: 12px; font-weight: 600; color: var(--warning); }

/* ===== PRODUCT CARD ===== */
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all 0.2s; }
.product-card:hover { border-color: var(--teal); box-shadow: var(--shadow-modal); transform: translateY(-2px); }
.product-img { background: var(--teal-pale); height: 120px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.product-body { padding: 12px; }
.product-name { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.product-pharmacy { font-size: 11px; color: var(--gray); margin-bottom: 8px; }
.product-price { font-size: 16px; font-weight: 700; color: var(--teal); font-family: 'Syne', sans-serif; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.qty-selector { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 26px; height: 26px; border-radius: 6px; border: 1.5px solid var(--border); background: #fff; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; color: var(--teal); font-weight: 600; transition: all 0.2s; }
.qty-btn:hover { border-color: var(--teal); background: var(--teal-pale); }
.qty-val { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }

/* ===== STATS BAR ===== */
.stats-bar { background: #fff; padding: 24px; display: grid; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-item { text-align: center; }
.stat-num { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; color: var(--teal); }
.stat-label { font-size: 12px; color: var(--gray); margin-top: 2px; }

/* ===== ORDER STATUS ===== */
.status-pending { background: var(--warning-pale); color: var(--warning); }
.status-confirmed { background: var(--teal-soft); color: var(--teal-dark); }
.status-in_transit { background: #eff6ff; color: var(--blue); }
.status-delivered { background: var(--success-pale); color: var(--success); }
.status-cancelled { background: var(--error-pale); color: var(--error); }

/* ===== PROGRESS TRACKER ===== */
.progress-track { display: flex; align-items: center; margin: 32px 0; }
.track-step { flex: 1; text-align: center; position: relative; }
.track-step::before { content: ''; position: absolute; top: 20px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.track-step:first-child::before { display: none; }
.track-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 16px; position: relative; z-index: 1; transition: all 0.3s; }
.track-step.done .track-circle { background: var(--success); }
.track-step.active .track-circle { background: var(--teal); animation: pulse-teal 1.5s infinite; }
.track-step.done::before, .track-step.active::before { background: var(--teal); }
.track-label { font-size: 11px; font-weight: 600; color: var(--gray); }
.track-step.done .track-label, .track-step.active .track-label { color: var(--dark); }
@keyframes pulse-teal { 0%,100%{box-shadow:0 0 0 0 rgba(13,148,136,0.4)} 50%{box-shadow:0 0 0 8px rgba(13,148,136,0)} }

/* ===== DASHBOARD LAYOUT ===== */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar { width: 240px; background: var(--grad-dark); flex-shrink: 0; display: flex; flex-direction: column; }
.dash-sidebar-brand { padding: 20px 20px 16px; font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dash-sidebar-brand span { color: var(--aqua); }
.dash-nav { padding: 16px 0; flex: 1; }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: rgba(255,255,255,0.65); font-size: 13px; font-weight: 500; transition: all 0.2s; }
.dash-nav a:hover, .dash-nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
.dash-nav a .icon { font-size: 16px; }
.dash-nav .logout-link { color: rgba(220,38,38,0.8); margin-top: auto; }
.dash-nav .logout-link:hover { background: rgba(220,38,38,0.1); color: var(--error); }
.dash-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.dash-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.dash-topbar h2 { font-size: 16px; font-weight: 700; color: var(--dark); }
.dash-content { padding: 24px; flex: 1; overflow-y: auto; }

/* ===== STAT CARDS (DASHBOARD) ===== */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.dash-stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.dash-stat-num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--teal); }
.dash-stat-label { font-size: 12px; color: var(--gray); margin-top: 2px; }
.dash-stat-icon { font-size: 28px; margin-bottom: 8px; }

/* ===== TABLE ===== */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--bg); padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 16px; font-size: 13px; color: var(--dark); border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray); padding: 4px; }
.modal-body { padding: 20px 24px 24px; }

/* ===== ALERT/TOAST ===== */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.alert-success { background: var(--success-pale); color: var(--success); border: 1px solid #a7f3d0; }
.alert-error { background: var(--error-pale); color: var(--error); border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-pale); color: var(--warning); border: 1px solid #fcd34d; }
.alert-info { background: var(--teal-pale); color: var(--teal-dark); border: 1px solid var(--teal-soft); }

/* ===== CATEGORY TABS ===== */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { padding: 7px 16px; border-radius: 9999px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 500; color: var(--gray); cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.cat-tab:hover, .cat-tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ===== HERO SECTION ===== */
.hero { background: var(--grad-main); padding: 64px 24px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.hero h1 { color: #fff; margin-bottom: 16px; }
.hero p { color: rgba(255,255,255,0.85); font-size: 16px; margin-bottom: 32px; }
.hero-trust { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.trust-pill { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); border-radius: 9999px; padding: 5px 14px; font-size: 12px; font-weight: 500; color: #fff; }

/* ===== PAGE LOADER ===== */
#page-loader { position: fixed; inset: 0; background: #fff; z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.4s; }
#page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-brand { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--teal); }
.loader-brand span { color: var(--aqua); }
.loader-spinner { width: 32px; height: 32px; border: 3px solid var(--teal-soft); border-top-color: var(--teal); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 12px auto 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ANNOUNCEMENT BANNER ===== */
.announcement { background: var(--teal); color: #fff; text-align: center; padding: 8px 16px; font-size: 13px; font-weight: 500; }

/* ===== NEW ORDER ALERT (RIDER) ===== */
.new-order-alert { background: var(--success-pale); border: 2px solid var(--success); border-radius: 12px; padding: 16px; animation: flash 1s ease-in-out 3; }
@keyframes flash { 0%,100%{opacity:1} 50%{opacity:0.6} }

/* ===== CART BADGE ===== */
.cart-icon { position: relative; }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--error); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--gray); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { color: var(--dark); margin-bottom: 8px; }

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--gray); margin-bottom: 20px; }
.breadcrumb a { color: var(--teal); }
.breadcrumb span { color: var(--gray-light); }

/* ===== FAQ ACCORDION ===== */
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.faq-question { padding: 14px 16px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.faq-question:hover { background: var(--bg); }
.faq-arrow { transition: transform 0.3s; color: var(--teal); }
.faq-answer { padding: 0 16px; max-height: 0; overflow: hidden; transition: all 0.3s; font-size: 13px; color: var(--slate); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-item.open .faq-answer { max-height: 200px; padding: 12px 16px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-sidebar { display: none; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .section { padding: 32px 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 16px; }
}

/* ===== MOBILE RESPONSIVE FIXES ===== */

/* FIX 1: Prevent horizontal scroll on all pages */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}
* { max-width: 100%; }
img { max-width: 100%; height: auto; }

/* FIX 2: Trust pills — 2 per row on mobile */
@media (max-width: 600px) {
  .hero-trust {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .trust-pill {
    text-align: center;
    font-size: 11px !important;
  }
}

/* FIX 3: Stats bar — 2 per row on mobile */
@media (max-width: 600px) {
  .stats-bar {
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }
  .stat-item {
    padding: 16px 8px;
    border-bottom: 1px solid var(--border);
  }
}

/* FIX 4: Pharmacy cards — centered single column on mobile */
@media (max-width: 768px) {
  .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }
  .grid-2 {
    grid-template-columns: 1fr !important;
  }
  .pharmacy-card {
    max-width: 100% !important;
  }
}

/* FIX 5: Dashboard sidebar — mobile bottom nav */
@media (max-width: 768px) {
  .dash-layout {
    flex-direction: column !important;
  }
  .dash-sidebar {
    display: none !important;
  }
  .dash-main {
    width: 100% !important;
  }
  .dash-mobile-nav {
    display: flex !important;
  }
  .dash-topbar {
    padding: 0 12px !important;
    height: auto !important;
    min-height: 56px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .dash-content {
    padding: 16px 12px !important;
    padding-bottom: 80px !important;
  }
  .dash-stats {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* FIX 6: Mobile bottom navigation for dashboards */
.dash-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--grad-dark);
  z-index: 500;
  padding: 8px 0 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  justify-content: space-around;
  align-items: center;
}
.dash-mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
  min-width: 50px;
  text-align: center;
}
.dash-mobile-nav a.active,
.dash-mobile-nav a:hover {
  color: var(--aqua);
  background: rgba(255,255,255,0.08);
}
.dash-mobile-nav a .nav-icon {
  font-size: 18px;
  line-height: 1;
}

/* FIX 7: Table horizontal scroll */
.table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}
table {
  min-width: 600px;
}

/* FIX 8: Admin table show 4 rows */
.admin-recent-orders tbody tr:nth-child(n+5) {
  display: none;
}

/* FIX 9: Cat tabs scrollable */
.cat-tabs {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

/* FIX 10: Benefit cards equal height */
.benefit-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* FIX 11: Pharmacy detail page - fix image on mobile */
@media (max-width: 768px) {
  .product-img {
    height: 80px !important;
  }
  .product-card {
    font-size: 12px !important;
  }
  /* pharmacy detail 2 column grid on mobile */
  #products-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
}

/* FIX 12: Checkout page - single column on mobile */
@media (max-width: 768px) {
  #cart-content {
    grid-template-columns: 1fr !important;
  }
  .sticky-cart {
    position: static !important;
  }
}

/* FIX 13: Rider benefit cards equal height */
@media (max-width: 600px) {
  .rider-benefits {
    grid-template-columns: 1fr 1fr !important;
  }
  .rider-benefit-card {
    min-height: 100px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
}

/* FIX 14: Footer date fix (visual) */
.footer-year::after { content: '2026'; }

/* FIX 15: General mobile padding */
@media (max-width: 480px) {
  .section { padding: 24px 14px !important; }
  .card { padding: 14px !important; }
  h1 { font-size: 22px !important; }
  h2 { font-size: 18px !important; }
  .btn-lg { padding: 11px 18px !important; font-size: 14px !important; }
  .navbar { padding: 0 14px !important; }
  .hero { padding: 36px 14px !important; }
}

/* FIX 16: Pharmacy single page card redesign */
.pharmacy-header-card {
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  margin-bottom: 20px;
}
.pharmacy-header-card h1 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.pharmacy-header-card p { color: rgba(255,255,255,0.85); font-size: 13px; }

/* FIX 17: Scrollable admin quick nav on mobile */
@media (max-width: 768px) {
  .admin-quick-nav {
    display: flex !important;
    overflow-x: auto !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
    margin-bottom: 16px !important;
  }
  .admin-quick-nav a {
    white-space: nowrap;
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    flex-shrink: 0;
  }
  .admin-quick-nav a.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
  }
}

/* ===== PRESCRIPTION SECTION ===== */
.prescription-section { padding:70px 0; background:#f9fafb; border-top:1px solid var(--border); }
.rx-container { display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:start; }
@media(max-width:900px) { .rx-container { grid-template-columns:1fr; gap:32px; } }
.rx-eyebrow { display:inline-block; font-size:11px; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--teal); background:var(--teal-pale); padding:4px 10px; border-radius:4px; margin-bottom:14px; }
.rx-copy h2 { font-size:24px; font-weight:700; color:var(--dark); line-height:1.35; margin-bottom:14px; }
.rx-lead { font-size:15px; color:var(--dark); line-height:1.75; margin-bottom:12px; font-weight:500; }
.rx-body { font-size:13px; color:var(--slate); line-height:1.85; margin-bottom:22px; }
.rx-trust-list { list-style:none; padding:0; margin:0 0 24px; display:flex; flex-direction:column; gap:10px; }
.rx-trust-list li { display:flex; align-items:flex-start; gap:10px; font-size:13px; color:var(--dark); line-height:1.5; }
.rx-check { display:inline-block; width:18px; height:18px; min-width:18px; border-radius:50%; background:var(--teal-pale); position:relative; margin-top:1px; flex-shrink:0; }
.rx-check::after { content:''; position:absolute; left:5px; top:3px; width:5px; height:8px; border:2px solid var(--teal); border-top:none; border-left:none; transform:rotate(45deg); }
.rx-faq { border-top:1px solid var(--border); padding-top:18px; }
.rx-faq-item { border-bottom:1px solid var(--border); padding:12px 0; }
.rx-faq-item:last-child { border-bottom:none; }
.rx-faq-q { font-size:13px; font-weight:600; color:var(--dark); cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.rx-faq-q::-webkit-details-marker { display:none; }
.rx-faq-q::after { content:'+'; font-size:18px; color:var(--teal); flex-shrink:0; }
details[open] .rx-faq-q::after { content:'-'; }
.rx-faq-a { font-size:13px; color:var(--slate); line-height:1.7; padding-top:8px; margin:0; }
.rx-card { background:#fff; border:1.5px solid var(--border); border-radius:14px; padding:24px; box-shadow:0 2px 8px rgba(0,0,0,0.05); }
.rx-card-header { display:flex; align-items:center; gap:10px; font-size:15px; font-weight:700; color:var(--dark); margin-bottom:20px; padding-bottom:14px; border-bottom:1px solid var(--border); }
.rx-card-header svg { color:var(--teal); }
.rx-dropzone { border:2px dashed var(--teal-soft,#99d6cc); border-radius:10px; padding:24px 16px; text-align:center; background:var(--teal-pale); cursor:pointer; position:relative; margin-bottom:4px; transition:all 0.2s; }
.rx-dropzone:hover { border-color:var(--teal); }
.rx-file-input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.rx-drop-text { font-size:13px; color:var(--dark); line-height:1.6; margin:8px 0 4px; }
.rx-drop-sub { font-size:11px; color:var(--gray); margin:0; }
.rx-field { margin-bottom:14px; }
.rx-label { display:block; font-size:13px; font-weight:600; color:var(--dark); margin-bottom:5px; }
.rx-input, .rx-textarea, .rx-select { width:100%; border:1.5px solid var(--border); border-radius:8px; padding:10px 12px; font-size:13px; color:var(--dark); font-family:inherit; background:#fff; box-sizing:border-box; transition:border-color 0.2s; }
.rx-input:focus, .rx-textarea:focus, .rx-select:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(13,148,136,0.1); }
.rx-textarea { resize:vertical; line-height:1.6; }
.rx-submit { width:100%; background:var(--grad-main); color:#fff; border:none; border-radius:10px; padding:14px; font-size:15px; font-weight:700; cursor:pointer; transition:opacity 0.2s; font-family:inherit; margin-top:4px; }
.rx-submit:hover { opacity:0.9; }
.rx-submit:disabled { opacity:0.5; cursor:not-allowed; }
.rx-disclaimer { font-size:11px; color:var(--gray); text-align:center; margin-top:10px; line-height:1.6; }
.rx-error { background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; border-radius:8px; padding:10px 14px; font-size:13px; margin-bottom:14px; }
.rx-success { background:var(--teal-pale); border:1.5px solid var(--teal); border-radius:10px; padding:20px; text-align:center; margin-bottom:14px; }

/* ===== PRESCRIPTION NAV LINK ===== */
.nav-link-rx {
  background: #E1F5EE;
  color: #0F6E56 !important;
  border-radius: 6px;
  padding: 6px 14px !important;
  font-weight: 500;
  border: 1px solid #b0d9c8;
  transition: background 0.2s, border-color 0.2s;
}
.nav-link-rx:hover {
  background: #d0f0e4;
  border-color: #0F6E56;
}
@media (max-width: 768px) {
  .nav-link-rx {
    display: inline-block;
    margin-top: 4px;
  }
}

/* ===== PHARMACY EMPTY STATE (onboarding / no results) ===== */
.empty-state-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.empty-icon { width: 80px; height: 80px; background: #E1F5EE; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.empty-h2 { font-size: 24px; font-weight: 600; color: #1a1a1a; line-height: 1.4; margin-bottom: 16px; }
.empty-lead { font-size: 16px; color: #333; line-height: 1.7; margin-bottom: 12px; font-weight: 500; }
.empty-body { font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 32px; }
.empty-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 40px; }
.empty-btn-primary { display: inline-block; background: #0F6E56; color: #ffffff; padding: 14px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.empty-btn-primary:hover { background: #085041; }
.empty-btn-secondary { display: inline-block; color: #0F6E56; font-size: 14px; text-decoration: underline; font-weight: 500; }
.empty-seo-text { border-top: 0.5px solid #e0e0e0; padding-top: 24px; font-size: 13px; color: #777; line-height: 1.8; text-align: left; }

.no-results { padding: 40px 20px; text-align: center; }
.no-results-title { font-size: 16px; font-weight: 500; color: #1a1a1a; margin-bottom: 10px; }
.no-results-body { font-size: 14px; color: #555; line-height: 1.7; }
.no-results-body a { color: #0F6E56; text-decoration: underline; }

@media (max-width: 600px) {
  .empty-h2 { font-size: 20px; }
  .empty-btn-primary { width: 100%; text-align: center; }
}

/* ===== PHARMACIES HERO (gradient banner) ===== */
.pharmacies-hero {
  background: var(--grad-main);
  padding: 40px 24px 32px;
}
.page-subtitle { font-size: 15px; color: rgba(255,255,255,0.85); margin-top: 6px; line-height: 1.6; }

.pharmacies-intro-text {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  margin-top: 18px;
  max-width: 760px;
}

.results-count {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 14px;
}

/* ===== RX BANNER (sits on the gradient hero) ===== */
.rx-banner {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  padding: 12px 18px;
  margin: 18px 0 0;
  max-width: 900px;
  backdrop-filter: blur(2px);
}
.rx-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}
.rx-banner-text {
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}
.rx-banner-text strong { color: #fff; }
.rx-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--teal-dark);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}
.rx-banner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  background: var(--teal-pale);
}
@media (max-width: 600px) {
  .rx-banner-inner { flex-wrap: wrap; }
  .rx-banner-btn { width: 100%; justify-content: center; }
}