/* PharmaCare Cambodia - Medical Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Kantumruy+Pro:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #38bdf8;
  
  --rx-red: #ef4444;
  --rx-red-light: #fee2e2;
  --otc-green: #10b981;
  --otc-green-light: #d1fae5;
  --warn-orange: #f59e0b;
  --warn-orange-light: #fef3c7;
  --info-purple: #6366f1;
  --info-purple-light: #e0e7ff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  transition: all 0.2s ease;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Trust Header Bar */
.top-bar {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #1e293b;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #38bdf8;
  font-weight: 500;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar-right select, .top-bar-right button {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

/* Main Navigation */
.navbar {
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.4rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.brand-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Search Bar */
.nav-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  font-size: 0.9rem;
  background: #f1f5f9;
  transition: all 0.2s ease;
}

.nav-search input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.nav-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-icon-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.btn-icon-label:hover {
  background: #e2e8f0;
}

.btn-admin-portal {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #38bdf8;
  border: 1px solid #334155;
  box-shadow: var(--shadow-sm);
}

.btn-admin-portal:hover {
  background: #0f172a;
  color: #7dd3fc;
}

.cart-btn {
  position: relative;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.cart-btn:hover {
  background: var(--primary-hover);
}

.cart-badge {
  background: #f43f5e;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 9999px;
  padding: 0.15rem 0.45rem;
  line-height: 1;
}

/* Secondary Navigation */
.sub-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
}

.sub-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.sub-nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
}

.sub-nav-link.active, .sub-nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0369a1 0%, #0d9488 100%);
  color: white;
  padding: 3rem 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 2.5rem;
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.05rem;
  color: #e0f2fe;
  margin-bottom: 1.75rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: #ffffff;
  color: #0369a1;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-hero-primary:hover {
  background: #f0fdf4;
  transform: translateY(-2px);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.hero-badge-item:last-child {
  margin-bottom: 0;
}

.hero-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* Category Browser */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.section-title h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-title p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.category-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.category-card:hover, .category-card.active {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: #f0f9ff;
}

.category-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: all 0.2s ease;
}

.category-card:hover .category-icon {
  background: var(--primary);
  color: white;
}

.category-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.category-card small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Prescription Alert Banner */
.rx-alert-banner {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.rx-alert-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.rx-alert-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.rx-alert-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0369a1;
}

.rx-alert-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-upload-rx {
  background: var(--primary);
  color: white;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-upload-rx:hover {
  background: var(--primary-hover);
}

/* Main Storefront Layout */
.storefront-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Filters Sidebar */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.filter-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.filter-pill-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.filter-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.filter-pill:hover, .filter-pill.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.checkbox-custom {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Products Grid */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.products-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.products-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.products-sort select {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.85rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.product-badge-wrap {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.badge-rx {
  background: var(--rx-red);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
}

.badge-otc {
  background: var(--otc-green);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.badge-near-expiry {
  background: var(--warn-orange);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.product-image-container {
  height: 190px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image-container img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-manufacturer {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.product-generic {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-specs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #475569;
  background: #f1f5f9;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

.product-price-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.product-price-box {
  display: flex;
  flex-direction: column;
}

.price-usd {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0369a1;
  line-height: 1;
}

.price-khr {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-add-cart {
  background: var(--primary);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.25);
}

.btn-add-cart:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* Slide-out Cart Drawer */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -460px;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: white;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  right: 0;
}

.cart-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.cart-close-btn {
  font-size: 1.35rem;
  color: var(--text-muted);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #f1f5f9;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cart-item-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.45rem;
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-qty:hover {
  background: #e2e8f0;
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.cart-coupon-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cart-coupon-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.cart-total-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
  margin-top: 0.6rem;
  margin-bottom: 1.2rem;
}

.btn-checkout {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
}

.btn-checkout:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  border-radius: var(--radius-xl);
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* KHQR Code Mock Box */
.khqr-box {
  background: #f8fafc;
  border: 2px dashed #38bdf8;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 1.25rem 0;
}

.khqr-tag {
  display: inline-block;
  background: #dc2626;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.khqr-image {
  width: 180px;
  height: 180px;
  margin: 0 auto 0.75rem;
  background: white;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.khqr-image svg {
  width: 100%;
  height: 100%;
}

/* Admin Dashboard Portal */
.admin-view-container {
  display: none;
  background: #f8fafc;
  min-height: 85vh;
  padding: 2rem 0;
}

.admin-view-container.active {
  display: block;
}

.store-view-container.hidden {
  display: none;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.kpi-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.admin-tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-table-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

th {
  background: #f1f5f9;
  padding: 0.85rem 1.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:hover td {
  background: #f8fafc;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-approved { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-processing { background: #e0f2fe; color: #075985; }
.status-shipped { background: #e0e7ff; color: #3730a3; }
.status-delivered { background: #dcfce7; color: #166534; }

/* Responsive Adjustments */
@media (max-width: 992px) {
  .storefront-layout {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    display: none;
  }
}

@media (max-width: 640px) {
  .navbar-inner {
    flex-wrap: wrap;
  }
  .nav-search {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
