/* ============================================================
   Zytheralabs — Rebuilt Global Stylesheet
   Cleaned + organized rewrite for current custom storefront
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --surface: #111827;
  --surface-2: #172033;
  --surface-3: #1c2740;
  --border: #1e293b;
  --border-soft: rgba(148, 163, 184, 0.12);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #06b6d4;
  --primary-2: #22d3ee;
  --primary-soft: rgba(6, 182, 212, 0.10);
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.32);
  --radius-sm: 0.625rem;
  --radius-md: 0.875rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --container: 1280px;
  --nav-height: 92px;
  --logo-height: 64px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --surface-3: #e7edf4;
  --border: #d9e1ea;
  --border-soft: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-sm: 0 10px 22px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: var(--nav-height);
}

main {
  min-height: calc(100vh - var(--nav-height));
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; background: none; cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.15;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(6, 182, 212, 0.25); }

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.section-py { padding: 5rem 0; }

.page-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 75%, var(--bg)));
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0;
}

.relative { position: relative; }
.z-10 { position: relative; z-index: 10; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.pt-4 { padding-top: 1rem; }

.two-col-layout,
.two-col-layout-checkout,
.profile-grid,
.product-detail-grid,
.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-cyan { box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.12), 0 12px 40px rgba(6, 182, 212, 0.12); }
.glow-cyan-sm { box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.12), 0 8px 20px rgba(6, 182, 212, 0.10); }
.glow-green { box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12), 0 12px 40px rgba(16, 185, 129, 0.12); }
.text-glow-cyan { text-shadow: 0 0 24px rgba(6, 182, 212, 0.3); }

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

.noise-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.animated-gradient {
  background: linear-gradient(135deg, #0a0e1a 0%, #0f172a 35%, #0c4a6e 70%, #064e3b 100%);
}

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.86);
}

.navbar.scrolled { box-shadow: var(--shadow-sm); }

.navbar-inner,
.navbar > .container,
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-img {
  height: var(--logo-height);
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline: auto;
}

.nav-link,
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-links a:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 0.875rem;
  color: var(--text-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--primary);
}

.icon-btn svg { width: 20px; height: 20px; }

.cart-badge,
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-muted);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.mobile-menu.open { display: flex; }

.mobile-menu a,
.mobile-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.mobile-menu a:hover,
.mobile-link.active {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

#research-banner {
  position: relative;
  z-index: 20;
}

.hero-logo-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.hero-logo-img {
  width: 220px;
  height: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.8rem 1.35rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #06131b;
  box-shadow: 0 14px 28px rgba(6, 182, 212, 0.18);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 38px; padding: 0.65rem 1rem; font-size: 0.85rem; }
.btn-lg { min-height: 52px; padding: 1rem 1.7rem; font-size: 1rem; }
.btn-full { width: 100%; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-label,
.form-group label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-control,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--surface) 40%, var(--bg));
  color: var(--text);
  outline: none;
}

textarea,
.form-group textarea,
.review-form .form-control {
  min-height: 120px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-control:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.search-wrapper { position: relative; }
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}
.search-wrapper .form-input { padding-left: 2.75rem; }

.hero-section {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-static-image,
.hero-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 2rem;
  overflow: hidden;
  background: #fff;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}

.hero-static-image { display: none; }
.hero-static-image img,
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-slide.active { opacity: 1; z-index: 1; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

.trust-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.trust-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.trust-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: var(--primary-soft);
  color: var(--primary);
}

.trust-title { font-weight: 600; margin-bottom: 0.2rem; }
.trust-desc { color: var(--text-dim); font-size: 0.88rem; line-height: 1.5; }

.cat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 150px;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  background: var(--primary-soft);
  color: var(--primary);
}

.cat-label,
.cat-card h3 { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-chip {
  min-height: 40px;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #081018;
}

.products-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.product-card {
  display: block;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.product-card-img {
  position: relative;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--surface) 20%, #fff);
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}

.product-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 26, 0.28), transparent 50%);
  pointer-events: none;
}

.product-category-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  max-width: calc(100% - 1.6rem);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.22);
}

.quick-add-btn {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  width: 42px;
  height: 42px;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

.out-of-stock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.64);
}

.out-of-stock-label {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.24);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem;
}

.product-card-name {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
  min-height: 2.3em;
  line-height: 1.2;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.product-stars,
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.product-stars .star-icon,
.star-rating .star-icon,
.star-icon {
  width: 15px;
  height: 15px;
}

.star-filled .star-icon,
.star-rating .star.star-filled .star-icon,
.star-rating-readonly .star.star-filled .star-icon {
  fill: var(--warning);
  stroke: var(--warning);
  color: var(--warning);
}

.star-empty .star-icon,
.star-rating .star.star-empty .star-icon,
.star-rating-readonly .star.star-empty .star-icon {
  fill: transparent;
  stroke: var(--text-dim);
  color: var(--text-dim);
}

.rating-text { font-size: 0.76rem; color: var(--text-muted); }

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.stock-badge.in-stock { background: var(--accent-soft); color: var(--accent); }
.stock-badge.out-of { background: var(--danger-soft); color: var(--danger); }

.product-img-carousel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.product-img-main,
.product-detail-img {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 20%, #fff);
}

.product-img-main img,
.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.product-img-thumbnails {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.product-img-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 2px solid var(--border);
  background: color-mix(in srgb, var(--surface) 20%, #fff);
}

.product-img-thumb.active { border-color: var(--primary); }
.product-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 420px);
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  z-index: 150;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open { transform: translateX(0); }
.cart-header { padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.cart-items { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-empty,
.empty-state,
.no-results { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; }
.cart-empty,
.empty-state { min-height: 50vh; }
.empty-icon,
.success-icon { width: 76px; height: 76px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.empty-icon { background: var(--surface); border: 1px solid var(--border); }
.success-icon { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.25); }

.cart-item,
.cart-table-item,
.order-item,
.checkout-mini-item { display: flex; gap: 1rem; }
.cart-item { position: relative; }

.cart-item-img,
.cart-table-img,
.checkout-mini-img,
.order-item-image {
  flex-shrink: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 25%, #fff);
  border: 1px solid var(--border);
}

.cart-item-img { width: 84px; height: 84px; border-radius: 0.85rem; }
.cart-table-img { width: 96px; height: 96px; border-radius: 0.85rem; }
.checkout-mini-img { width: 48px; height: 48px; border-radius: 0.6rem; }
.order-item-image { width: 60px; height: 60px; border-radius: 0.7rem; object-fit: contain; padding: 0.35rem; }

.cart-item-img img,
.cart-table-img img,
.checkout-mini-img img { width: 100%; height: 100%; object-fit: contain; padding: 0.35rem; }

.cart-item-info,
.cart-table-info,
.order-item-details { flex: 1; min-width: 0; }

.cart-item-name,
.cart-table-name,
.checkout-mini-name,
.order-item-name { font-weight: 600; color: var(--text); }

.cart-item-cat,
.cart-table-cat,
.checkout-mini-unit,
.order-item-meta,
.order-date,
.display-count,
.free-ship-note,
.secure-badge,
.agree-text { color: var(--text-muted); font-size: 0.82rem; }

.qty-controls,
.qty-control-group {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(148, 163, 184, 0.05);
  overflow: hidden;
}

.qty-controls { padding: 0.25rem 0.45rem; }
.qty-control-btn,
.qty-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--text-muted); }
.qty-display,
.qty-num { min-width: 1.75rem; text-align: center; font-size: 0.88rem; font-weight: 600; }
.remove-btn,
.delete-btn,
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 0.7rem; color: var(--text-dim); }
.cart-footer,
.order-footer { padding: 1.25rem; border-top: 1px solid var(--border); background: rgba(148, 163, 184, 0.04); }
.cart-subtotals,
.summary-rows { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.25rem; }
.cart-row,
.summary-row,
.summary-total,
.cart-total-row,
.order-total { display: flex; justify-content: space-between; gap: 1rem; }
.cart-total-row,
.summary-total { padding-top: 0.85rem; border-top: 1px dashed var(--border); font-size: 1.15rem; font-weight: 700; }
.total-price,
.total-amt,
.order-total-amount,
.cart-line-total,
.cart-item-price,
.checkout-mini-price,
.order-item-total { font-weight: 700; color: var(--primary); }

.order-summary,
.checkout-section,
.profile-section,
.welcome-banner,
.stat-card,
.orders-table-wrap,
.auth-card,
.article-card,
.review-item,
.confirm-dialog-content,
.review-modal-content,
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.order-summary { padding: 1.5rem; position: sticky; top: calc(var(--nav-height) + 1.25rem); }
.checkout-section { padding: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.col-span-2 { grid-column: span 2; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; color: var(--text-muted); font-size: 0.88rem; }
.checkout-items-list { display: flex; flex-direction: column; gap: 0.85rem; max-height: 16rem; overflow-y: auto; margin-bottom: 1rem; }
.checkout-mini-qty { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 0.35rem; border-radius: 999px; background: var(--primary); color: #04131a; font-size: 0.64rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.profile-nav-btn,
.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-nav-btn.active,
.profile-tab.active { background: var(--primary-soft); color: var(--primary); }
.profile-nav-btn.danger { color: var(--danger); }

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #03141a;
  flex-shrink: 0;
}

.profile-name { font-size: 1.7rem; font-weight: 700; }
.profile-email { color: var(--text-muted); margin-bottom: 0.6rem; }
.profile-role-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.profile-role-badge.admin { background: var(--danger-soft); color: var(--danger); }
.profile-role-badge.customer { background: var(--primary-soft); color: var(--primary); }
.profile-tabs { display: flex; gap: 0.5rem; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.profile-content { min-height: 360px; }
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }
.stats-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }

.review-modal,
.confirm-dialog { position: fixed; inset: 0; z-index: 200; display: none; }
.review-modal.active,
.confirm-dialog.active { display: block; }
.review-modal-overlay,
.confirm-dialog-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
.review-modal-content,
.confirm-dialog-content { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 520px); max-height: 90vh; overflow-y: auto; }
.review-modal-header,
.review-modal-body,
.confirm-dialog-header,
.confirm-dialog-body,
.confirm-dialog-actions { padding-inline: 1.5rem; }
.review-modal-header,
.confirm-dialog-header { padding-top: 1.3rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.review-modal-body,
.confirm-dialog-body { padding-top: 1.2rem; padding-bottom: 1.2rem; }
.confirm-dialog-actions,
.review-form-actions { display: flex; justify-content: flex-end; gap: 0.75rem; padding-bottom: 1.3rem; }
.review-modal-close { width: 36px; height: 36px; border-radius: 999px; background: rgba(148, 163, 184, 0.08); color: var(--text-muted); }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }
.review-item { padding: 1.25rem; }
.review-header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.review-text { color: var(--text-muted); line-height: 1.7; }
.order-review-btn { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem; min-height: 32px; padding: 0.35rem 0.8rem; border-radius: 0.65rem; background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(6, 182, 212, 0.24); font-size: 0.76rem; font-weight: 700; }
.order-review-btn.reviewed { background: var(--accent-soft); color: var(--accent); border-color: rgba(16, 185, 129, 0.24); }

.toaster {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  min-width: min(360px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  background: rgba(17, 24, 39, 0.96);
  color: var(--text);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
}

.footer,
footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 3.5rem 0; }
.footer-logo-img { height: 92px; width: auto; object-fit: contain; }
.footer-brand-desc,
.footer-desc { max-width: 30rem; color: var(--text-muted); line-height: 1.7; font-size: 0.9rem; }
.footer-contact,
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-contact-row,
.footer-contact .text-sm { display: flex; align-items: center; gap: 0.6rem; color: var(--text-dim); font-size: 0.86rem; }
.footer-col-title,
.footer-title,
.footer-col h4 { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.6rem 0 2rem; color: var(--text-dim); font-size: 0.82rem; }
.footer-legal { display: flex; gap: 1rem; flex-wrap: wrap; }

.skeleton {
  border-radius: 0.6rem;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.35s linear infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo { width: 180px; height: auto; }
.loader-spinner { display: none !important; }

@media (min-width: 640px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: row; }
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .profile-grid { grid-template-columns: 260px 1fr; }
}

@media (min-width: 1024px) {
  .hero-grid,
  .product-detail-grid { grid-template-columns: 1fr 1fr; }
  .two-col-layout { grid-template-columns: 2fr 1fr; }
  .two-col-layout-checkout { grid-template-columns: 3fr 2fr; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid.four-col { grid-template-columns: repeat(4, 1fr); }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 1023px) {
  .hero-carousel-wrapper { display: none; }
  .hero-static-image { display: block; }
}

@media (max-width: 767px) {
  :root {
    --nav-height: 78px;
    --logo-height: 50px;
  }

  .nav-links,
  .hidden-mobile,
  .nav-radio-inputs { display: none !important; }

  .hamburger { display: inline-flex; }

  .hero-grid > div:first-child {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-logo-wrap { justify-content: center; }
  .hero-logo-img { width: min(220px, 62vw); }
  .grid-2,
  .form-row,
  .stats-grid { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
  .order-summary { position: static; }
  .profile-header { flex-direction: column; text-align: center; }
}

@media (max-width: 540px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .cart-table-item,
  .cart-item,
  .order-item { flex-direction: column; }
  .review-form-actions,
  .confirm-dialog-actions,
  .form-footer,
  .auth-footer-links { flex-direction: column; align-items: stretch; }
}

@media (max-width: 359px) {
  .products-grid { grid-template-columns: 1fr; }
}

@media (hover: none) and (pointer: coarse) {
  html { scroll-behavior: auto; }
  .navbar,
  .cart-overlay,
  .review-modal-overlay,
  .confirm-dialog-overlay,
  .auth-card,
  .carousel-btn {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .animated-gradient,
  .noise-overlay::before,
  .grid-pattern,
  .skeleton { animation: none !important; }
  .product-card:hover,
  .btn:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .navbar,
  .mobile-menu,
  .cart-sidebar,
  .cart-overlay,
  .toaster,
  .btn,
  .icon-btn,
  #page-loader,
  #research-banner { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding-top: 0; }
}


/* ============================================================
   NAVBAR & LOGO — Consolidated sizing (no !important chains)
   ============================================================ */

:root {
  --nav-height: 92px;
  --logo-height: 60px;
}

.navbar {
  height: var(--nav-height);
  min-height: var(--nav-height);
}

.navbar .container,
.navbar-inner {
  min-height: var(--nav-height);
}

main {
  padding-top: 0;
  min-height: calc(100vh - var(--nav-height));
}

#research-banner {
  margin-top: var(--nav-height);
}

.logo-img {
  height: var(--logo-height);
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.logo,
.logo-img,
.navbar .logo img {
  outline: none;
}

/* Hero section top padding for navbar offset */
.hero-section {
  min-height: calc(100vh - var(--nav-height));
  padding-top: 2rem;
  padding-bottom: 3rem;
}



/* (duplicate overrides removed — see consolidated block above) */


/* ============================================================
   LIGHT MODE — Hero overrides
   ============================================================ */

[data-theme="light"] .hero-section h1,
[data-theme="light"] .hero-section p,
[data-theme="light"] .hero-section .text-glow-cyan {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #0891b2, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== LIGHT MODE HERO FIX ===== */

[data-theme="light"] .hero-section,
[data-theme="light"] .animated-gradient {
  background: linear-gradient(135deg, #f8fbff 0%, #eaf6ff 35%, #d8f2ff 70%, #dcfce7 100%) !important;
}

[data-theme="light"] .hero-section h1,
[data-theme="light"] .hero-section h2,
[data-theme="light"] .hero-section h3 {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .hero-section p {
  color: #334155 !important;
}

[data-theme="light"] .hero-section .text-muted,
[data-theme="light"] .hero-section .text-dim {
  color: #475569 !important;
}

[data-theme="light"] .hero-section .gradient-text {
  background: linear-gradient(135deg, #0891b2, #059669) !important;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}


[data-theme="light"] .hero-section .text-glow-cyan {
  text-shadow: none !important;
}

[data-theme="light"] .hero-section .grid-pattern {
  opacity: 0.35;
}

[data-theme="light"] .hero-logo-img {
  filter: none !important;
}



[data-theme="light"] .hero-grid > div:first-child h1 {
  color: #0f172a !important;
}

[data-theme="light"] .hero-grid > div:first-child p {
  color: #334155 !important;
}





















[data-theme="light"] #research-banner {
  background: #fff1f2 !important;
  border-bottom: 1px solid rgba(239, 68, 68, 0.18) !important;
  color: #9f1239 !important;
}

[data-theme="light"] #research-banner a {
  color: #b45309 !important;
}




.logo,
.logo-img,
.navbar .logo img {
  outline: none !important;
}



.fda-disclaimer {
    background: #0b1a2b;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 3rem 0;
}

.fda-disclaimer h3 {
    color: #9ecbff;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.fda-disclaimer p {
    color: #8aa0b8;
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    max-width: 900px;
}

.fda-disclaimer .strong {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #6f8aa6;
}


footer {
  margin-bottom: 0;
}

.fda-disclaimer {
  margin-top: 2rem;
}

.fda-disclaimer .container {
  max-width: 900px;
}


.fda-disclaimer h3 {
  font-weight: 700;
  letter-spacing: 1.2px;
}

.fda-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.1);
}


.nav-highlight {
  font-weight: 600;
  color: var(--primary);
}

/* AUTH PAGE — simple fallback styles (research-access uses its own inline CSS) */
.auth-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.auth-left {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 60px);
  flex: 1;
}

.auth-logo { width: 140px; margin-bottom: 30px; }
.auth-features div { margin: 10px 0; opacity: 0.9; }

.auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 60px);
  background: #fff;
}

.auth-btn {
  background: var(--primary);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
}

.auth-switch { margin-top: 15px; font-size: 14px; }
.auth-switch span { color: var(--primary); cursor: pointer; }

@media (min-width: 768px) {
  .auth-container { flex-direction: row; height: 100vh; }
}


/* ============================================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   Mobile-first additions — does NOT break desktop
   ============================================================ */

/* ------------------------------------------------
   SECTION PADDING — scale down on small screens
   ------------------------------------------------ */
@media (max-width: 767px) {
  .section-py { padding: 3rem 0; }
  .page-header { padding: 2rem 0; }
}

/* ------------------------------------------------
   NAVBAR — mobile sizes
   ------------------------------------------------ */
@media (max-width: 767px) {
  :root {
    --nav-height: 70px;
    --logo-height: 46px;
  }

  .navbar {
    height: var(--nav-height);
    min-height: var(--nav-height);
  }

  .navbar .container,
  .navbar-inner {
    min-height: var(--nav-height);
    gap: 0.5rem;
  }
}

/* ------------------------------------------------
   MOBILE MENU — full-screen panel
   ------------------------------------------------ */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1001;
  display: none;
  flex-direction: column;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  gap: 0.35rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ------------------------------------------------
   HERO SECTION — mobile layout
   ------------------------------------------------ */
@media (max-width: 767px) {
  .hero-section {
    min-height: auto;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  /* Center text on mobile */
  .hero-grid > div:first-child {
    text-align: center;
    align-items: center;
  }

  .hero-grid > div:first-child > .animate-float,
  .hero-grid > div:first-child > img {
    margin-left: auto;
    margin-right: auto;
  }

  /* Button row stacks on very small screens */
  .hero-grid > div:first-child > div[style*="flex"] {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-grid > div:first-child > div[style*="flex"] {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-grid > div:first-child > div[style*="flex"] .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ------------------------------------------------
   PRODUCTS GRID — consistent across sizes
   ------------------------------------------------ */
@media (min-width: 541px) and (max-width: 767px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------
   PRODUCTS FILTER BAR — stack on mobile
   ------------------------------------------------ */
.products-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.products-filter-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .products-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .products-filter-controls {
    flex-direction: column;
  }

  .products-filter-controls #searchInput,
  .products-filter-controls #sortSelect,
  #searchInput,
  #sortSelect {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 100% !important;
  }
}

/* ------------------------------------------------
   CATEGORY GRID — text truncation fix
   ------------------------------------------------ */
.cat-label,
.cat-card h3 {
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-align: center;
}

@media (max-width: 767px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-card { min-height: 120px; padding: 1rem; gap: 0.5rem; }
  .cat-icon { width: 42px; height: 42px; }
}

@media (max-width: 400px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------
   TRUST GRID — 2-up on mobile, 4-up on desktop (already set)
   ------------------------------------------------ */
@media (max-width: 479px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------
   PRODUCT DETAIL PAGE
   ------------------------------------------------ */
.hero-product-title {
  font-size: clamp(1.5rem, 7vw, 3.5rem) !important;
  line-height: 1.1;
}

.hero-product-price {
  font-size: clamp(1.25rem, 4vw, 2rem) !important;
}

@media (max-width: 600px) {
  .hero-container {
    padding: 1.5rem 1rem !important;
    gap: 1.5rem !important;
  }

  .hero-cart-row {
    flex-direction: column;
  }

  .hero-add-btn,
  .hero-outline-btn {
    flex: none;
    width: 100%;
  }

  .hero-thumbnails-wrap {
    gap: 0.5rem;
  }

  .hero-thumb {
    width: 60px;
    height: 60px;
  }
}

/* ------------------------------------------------
   PROFILE PAGE
   ------------------------------------------------ */
@media (max-width: 767px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .profile-header .btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .profile-tabs {
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .profile-tab {
    flex-shrink: 0;
    font-size: 0.82rem;
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
  }

  .profile-tab svg {
    width: 16px;
    height: 16px;
  }
}

/* ------------------------------------------------
   CHECKOUT — mobile single column
   ------------------------------------------------ */
@media (max-width: 767px) {
  .two-col-layout-checkout,
  .two-col-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .col-span-2 {
    grid-column: span 1;
  }
}

/* ------------------------------------------------
   CART PAGE — responsive item layout
   ------------------------------------------------ */
@media (max-width: 640px) {
  .cart-table-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cart-table-img {
    width: 80px;
    height: 80px;
  }
}

/* ------------------------------------------------
   FOOTER — responsive
   ------------------------------------------------ */
@media (max-width: 479px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    gap: 0.5rem;
  }
}

/* ------------------------------------------------
   MODAL / DIALOG — mobile
   ------------------------------------------------ */
@media (max-width: 540px) {
  .review-modal-content,
  .confirm-dialog-content {
    width: calc(100vw - 1.5rem);
    max-height: 85vh;
    border-radius: 1.25rem;
  }
}

/* ------------------------------------------------
   TOUCH INTERACTION
   ------------------------------------------------ */
button, a, .btn, .icon-btn, .cat-chip, .product-card {
  touch-action: manipulation;
}

/* Minimum tap target size (accessibility / mobile UX) */
.icon-btn {
  min-width: 44px;
  min-height: 44px;
}

.cat-chip {
  min-height: 44px;
}

/* ------------------------------------------------
   SAFE AREA / NOTCH SUPPORT
   ------------------------------------------------ */
.navbar {
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.cart-sidebar {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ------------------------------------------------
   TABLET (768px – 1023px) extras
   ------------------------------------------------ */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-carousel-wrapper {
    max-width: 360px;
    margin-inline: auto;
  }

  .hero-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------
   WIDE SCREENS (1440px+)
   ------------------------------------------------ */
@media (min-width: 1440px) {
  :root {
    --container: 1400px;
  }
}

/* ------------------------------------------------
   GLOBAL OVERFLOW GUARD
   Targeted — does NOT break SVG icon sizes
   ------------------------------------------------ */

/* Only prevent overflow on media / large block elements */
img,
video,
canvas,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/* Tables can scroll horizontally on mobile */
table {
  max-width: 100%;
}

/* Sections and containers must not overflow */
.container,
.hero-section,
.page-header,
section,
footer,
main {
  max-width: 100%;
  overflow-x: hidden;
}

/* Prevent long words from causing overflow */
.product-card-name,
.cart-item-name,
.cart-table-name,
.order-item-name,
.checkout-mini-name,
.hero-product-title {
  overflow-wrap: break-word;
  word-break: break-word;
}