@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800&family=Rubik:wght@500;600;700;800&family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --nav-icon: rgba(6, 78, 59, 0.95);
  --nav-icon-muted: rgba(24, 24, 27, 0.55);
  --nav-pill-bg: rgba(255, 255, 255, 0.94);
  --nav-pill-border: rgba(5, 150, 105, 0.24);
  --nav-hover: rgba(5, 150, 105, 0.08);
  --nav-primary-active: rgba(5, 150, 105, 0.16);
  --primary: #059669;
  --primary-glow: rgba(5, 150, 105, 0.35);
  --cta: #f97316;
  --liquid-glass-bg: rgba(255, 255, 255, 0.03);
  --liquid-glass-border: rgba(255, 255, 255, 0.12);
  /* Light mode card text */
  --card-title: #18181b;
  --card-price: #27272a;
  --card-meta: #71717a;
  --chip-color: #52525b;
  --chip-border: rgba(0, 0, 0, 0.15);
  --chip-active-bg: rgba(0, 0, 0, 0.08);
  --chip-active-border: rgba(0, 0, 0, 0.25);
  --chip-active-color: #18181b;
  --card-bg: rgba(0, 0, 0, 0.02);
  --card-border: rgba(0, 0, 0, 0.1);
}

.dark {
  --nav-icon: rgba(245, 245, 245, 0.95);
  --nav-icon-muted: rgba(245, 245, 245, 0.5);
  --nav-pill-bg: rgba(10, 10, 12, 0.7);
  --nav-pill-border: rgba(255, 255, 255, 0.1);
  --nav-hover: rgba(255, 255, 255, 0.08);
  --nav-primary-active: rgba(255, 255, 255, 0.14);
  --card-title: #f4f4f5;
  --card-price: #d4d4d8;
  --card-meta: rgba(161, 161, 170, 0.95);
  --chip-color: #a1a1aa;
  --chip-border: rgba(255, 255, 255, 0.12);
  --chip-active-bg: rgba(255, 255, 255, 0.1);
  --chip-active-border: rgba(255, 255, 255, 0.22);
  --chip-active-color: #fafafa;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
}

/* Allow selection in form fields and editable regions */
input,
textarea,
select,
[contenteditable="true"],
.allow-select {
  -webkit-user-select: text;
  user-select: text;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Rubik', sans-serif;
}

@supports (backdrop-filter: blur(12px)) {
  .nav-pill {
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
  }
}

.nav-pill {
  width: fit-content;
  max-width: calc(100vw - 1rem);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--nav-pill-bg);
  border: 1px solid var(--nav-pill-border);
  box-shadow: 
    0 6px 30px -6px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-pill::-webkit-scrollbar {
  display: none;
}

.nav-pill:hover {
  border-color: rgba(5, 150, 105, 0.45);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 1000;
  border-radius: 0 0 1rem 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

.nav-btn {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  border-radius: 9999px;
  color: var(--nav-icon);
  cursor: pointer;
  pointer-events: auto;
  border: none;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-btn:hover::after {
  opacity: 1;
}

.nav-btn:hover {
  background: var(--nav-hover);
  color: var(--primary);
}

.nav-btn .lucide {
  stroke-width: 1.5;
  transition: filter 0.3s ease;
}

.nav-btn:hover .lucide {
  filter: drop-shadow(0 0 6px rgba(5, 150, 105, 0.35));
}

.nav-btn--active {
  background: var(--nav-primary-active);
  box-shadow: 0 0 16px rgba(5, 150, 105, 0.2);
}

.nav-btn--active .lucide {
  stroke: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.nav-btn:focus-visible,
.category-chip:focus-visible,
.search-panel__close:focus-visible,
.search-panel__input:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .nav-pill {
    max-width: calc(100vw - 0.5rem);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    gap: 0;
  }

  .nav-pill .lucide {
    width: 1.1rem;
    height: 1.1rem;
  }

  .nav-btn--primary .lucide {
    width: 1.2rem;
    height: 1.2rem;
  }

  .nav-btn {
    padding: 0.4rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Search overlay */
.search-panel[hidden] {
  display: none;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 2rem;
}

.search-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.search-panel__sheet {
  position: relative;
  width: min(100%, 26rem);
  border-radius: 1rem;
  border: 1px solid var(--nav-pill-border);
  background: rgba(14, 14, 16, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.search-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--nav-icon);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-panel__close:hover {
  background: var(--nav-hover);
}

.search-panel__close .lucide {
  stroke: var(--nav-icon);
  stroke-width: 1.35;
}

.search-panel__input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  color: #fafafa;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel__input::placeholder {
  color: rgba(161, 161, 170, 0.9);
}

.search-panel__input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

body.overlay-open {
  overflow: hidden;
}

/* Quick-view modal */
.quick-view[hidden] {
  display: none;
}

.quick-view {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .quick-view {
    align-items: center;
    padding: 2rem 1rem;
  }
}

.quick-view__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.quick-view__sheet {
  position: relative;
  width: 100%;
  max-height: min(92vh, 40rem);
  overflow-y: auto;
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
  border: 1px solid var(--nav-pill-border);
  border-bottom: none;
  background: rgba(12, 12, 14, 0.96);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.5);
}

@media (min-width: 640px) {
  .quick-view__sheet {
    width: min(100%, 36rem);
    max-height: min(90vh, 44rem);
    border-radius: 1.25rem;
    border-bottom: 1px solid var(--nav-pill-border);
  }
}

/* Product grid */
.product-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border-radius: 0.875rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.product-card:focus {
  outline: none;
}

.product-card:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
}

.product-card:hover {
  border-color: rgba(5, 150, 105, 0.4);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

/* Skeleton loader for async content */
.skeleton {
  border-radius: 0.5rem;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
.skeleton-dark {
  background: linear-gradient(90deg,
    rgba(0,0,0,0.06) 0%,
    rgba(0,0,0,0.12) 50%,
    rgba(0,0,0,0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton, .skeleton-dark { animation: none; }
}

.product-card__media {
  aspect-ratio: 16 / 9;
  background-color: #000000;
  position: relative;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  padding: 12px;
}

.product-card__stock-badge {
  display: none !important; /* Managed via inline styles in app.js to prevent cache issues */
}

.product-card__cat {
  margin-bottom: 0.25rem;
}

.product-card__body {
  padding: 1rem 1.1rem 1.15rem;
}

.product-card__title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--card-title);
  text-transform: capitalize;
}

.product-card__meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--card-meta);
}

.product-card__price {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--card-price);
}

.category-section--empty {
  display: none !important;
}

#catalog li.product-card--hidden {
  display: none;
}

/* Category filter chips */
.category-chip {
  border-radius: 9999px;
  border: 1px solid var(--chip-border);
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--chip-color);
  background: transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.category-chip:hover {
  border-color: var(--chip-active-border);
  color: var(--chip-active-color);
  background: rgba(5, 150, 105, 0.08);
}

.category-chip--active {
  background: var(--chip-active-bg);
  border-color: var(--chip-active-border);
  color: var(--chip-active-color);
}

/* Side panels (account, notifications, history) */
.side-panel[hidden] {
  display: none;
}

.side-panel {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 5rem 0.75rem 1rem;
}

@media (min-width: 640px) {
  .side-panel {
    padding: 5rem 1.25rem 2rem;
  }
}

.side-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.side-panel__sheet {
  position: relative;
  display: flex;
  max-height: min(88vh, 36rem);
  width: min(100%, 22rem);
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--nav-pill-border);
  background: rgba(12, 12, 14, 0.96);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

.side-panel__sheet--wide {
  width: min(100%, 26rem);
}

.side-panel__body {
  padding: 1.25rem 1.25rem 1.5rem;
}

.side-panel__body--scroll {
  overflow-y: auto;
  max-height: min(58vh, 26rem);
  flex: 1;
  min-height: 0;
}

.notification-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.notification-row:last-child {
  border-bottom: none;
}

.notification-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notification-row--unread {
  border-left: 2px solid rgba(250, 250, 250, 0.5);
  padding-left: 0.65rem;
  margin-left: -0.65rem;
}

.notification-row__title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #f4f4f5;
}

.notification-row__body {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #a1a1aa;
}

.notification-row__time {
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  color: #71717a;
}

.history-row {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.85rem 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: background-color 0.15s ease;
}

.history-row:last-child {
  border-bottom: none;
}

.history-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.history-row__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #f4f4f5;
}

.history-row__meta {
  font-size: 0.75rem;
  color: #71717a;
}

.panel-empty {
  padding: 1rem 0;
  font-size: 0.8125rem;
  color: #71717a;
}

.nav-btn[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  color: #18181b;
  background: #fafafa;
  border-radius: 9999px;
}

/* Toast */
.toast-nav {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 9999;
  max-width: min(90vw, 20rem);
  transform: translateX(-50%) translateY(120%);
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 20, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  color: #e4e4e7;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease;
}

.toast-nav.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.nav-btn[aria-pressed="true"] {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-btn[aria-pressed="true"]::before {
  background: var(--nav-primary-active);
}

.nav-btn[aria-pressed="true"] .lucide {
  stroke: rgba(255, 255, 255, 0.98);
}

@keyframes refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nav-btn--spinning .lucide {
  animation: refresh-spin 0.7s linear;
}

@media (prefers-reduced-motion: reduce) {
  .nav-btn--spinning .lucide { animation: none; }
  .nav-btn, .nav-btn::before, .nav-pill .lucide { transition-duration: 0.01ms; }
  .toast-nav { transition-duration: 0.01ms; }
}

/* --- LIQUID GLASS COMPONENTS --- */
.liquid-glass {
  background: var(--liquid-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--liquid-glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.liquid-glass:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

/* Premium Orders Table */
.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.premium-table tr {
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.premium-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.005);
}

.premium-table td, .premium-table th {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-table th {
  background: transparent;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #71717a;
  border: none;
}

.premium-table td:first-child { border-radius: 12px 0 0 12px; border-right: none; }
.premium-table td:last-child { border-radius: 0 12px 12px 0; border-left: none; }
.premium-table td:not(:first-child):not(:last-child) { border-left: none; border-right: none; }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-shipped { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.status-delivered { background: rgba(161, 161, 170, 0.1); color: #a1a1aa; border: 1px solid rgba(161, 161, 170, 0.2); }

/* Heroes & Animations */
.text-gradient-premium {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 40%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.bg-dot-grid {
  background-image: radial-gradient(circle, rgba(100, 100, 120, 0.35) 1px, transparent 1px);
  background-size: 28px 28px;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-card {
  animation: card-enter 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#scroll-top-btn {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  z-index: 48;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(18,18,20,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e4e4e7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS OVERRIDES
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Hero section */
  h1 { 
    font-size: 2.75rem !important; 
    line-height: 1.15 !important;
  }
  
  .text-5xl, .sm\:text-7xl, .md\:text-8xl {
    font-size: 2.75rem !important;
  }

  #hero {
    min-height: 60vh !important;
    padding-top: 4rem;
  }

  #hero p.text-lg {
    font-size: 0.95rem !important;
    line-height: 1.5;
  }

  /* Navigation Pill */
  header.fixed {
    top: 1rem !important;
  }

  .nav-pill {
    padding: 0.4rem 0.6rem !important;
    gap: 0.25rem !important;
  }

  .nav-btn {
    padding: 0.5rem !important;
  }
  
  .nav-btn i, .nav-btn .lucide {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }

  /* Layout & Spacing */
  main {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    padding-top: 6rem !important;
  }

  .mt-20 { margin-top: 3rem !important; }
  .mt-12 { margin-top: 2rem !important; }

  /* Product Cards */
  .product-card__body {
    padding: 0.875rem !important;
  }

  .product-card__title {
    font-size: 0.9rem !important;
  }

  /* Catalog */
  .category-chip {
    padding: 0.35rem 0.85rem !important;
    font-size: 0.75rem !important;
  }

  /* Footer */
  footer {
    padding-bottom: 6rem !important; /* Space for nav-pill if at bottom */
    text-align: center;
  }
  
  footer .flex-col {
    align-items: center;
  }

  /* Side Panels */
  .side-panel__sheet {
    width: 100% !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
    max-height: 80vh !important;
    position: fixed;
    bottom: 0;
    top: auto;
  }
  
  .side-panel {
    align-items: flex-end;
    padding: 0;
  }
}

/* Extra small devices */
@media (max-width: 380px) {
  h1 { font-size: 2.25rem !important; }
  .nav-pill { padding: 0.3rem 0.5rem !important; }
  .nav-btn { padding: 0.4rem !important; }
}

#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
  z-index: 9999;
  transition: width 0.25s ease, opacity 0.4s ease 0.2s;
  opacity: 1;
}

#page-progress.done {
  width: 100%;
  opacity: 0;
}

.notif-page-row {
  padding: 1rem 1.25rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(0,0,0,0.07);
  background: rgba(0,0,0,0.02);
  margin-bottom: 0.5rem;
  transition: background 0.15s ease;
  cursor: pointer;
}

.dark .notif-page-row {
  border-color: rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
}

.notif-page-row:hover { background: rgba(0,0,0,0.05); }
.dark .notif-page-row:hover { background: rgba(255,255,255,0.04); }

/* Hide specific nav buttons on mobile */
@media (max-width: 768px) {
  #nav-back, #nav-forward, #nav-refresh { display: none !important; }
}

/* ── STOREFRONT ADMIN BAR (sf-admin-bar) ── 
   Scoped to :not(.admin-page) to prevent interference with the main Admin Panel */
body:not(.admin-page) .sf-admin-bar {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  visibility: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body:not(.admin-page) .sf-admin-bar.is-active {
  visibility: visible;
  opacity: 1;
}

body:not(.admin-page) .sf-admin-bar__inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 12px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.dark body:not(.admin-page) .sf-admin-bar__inner {
  background: rgba(10, 10, 12, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

body:not(.admin-page) .sf-admin-bar .admin-nav-item {
  color: #71717a;
  transition: all 0.2s ease;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
}

.dark body:not(.admin-page) .sf-admin-bar .admin-nav-item {
  color: #a1a1aa;
}

body:not(.admin-page) .sf-admin-bar .admin-nav-item:hover, 
body:not(.admin-page) .sf-admin-bar .admin-nav-item.is-active {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

/* Mobile Bottom Bar for Storefront */
@media (max-width: 1024px) {
  body:not(.admin-page).admin-mode #main-content {
      padding-bottom: 70px !important;
  }
  
  body:not(.admin-page) .sf-admin-bar {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    background: #0a0a0c !important; 
    border-top: 1px solid rgba(255,255,255,0.15) !important;
    padding: 0 !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  body:not(.admin-page) .sf-admin-bar__inner {
    flex-direction: row !important;
    width: 100% !important;
    height: 100% !important;
    justify-content: center !important;
    padding: 0 10px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    gap: 0 !important;
    align-items: center !important;
  }

  body:not(.admin-page) .sf-admin-bar__inner nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    width: 100% !important;
    gap: 4px !important;
  }

  body:not(.admin-page) .sf-admin-bar .admin-nav-item {
    color: #ffffff !important; 
    width: auto !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
  }

  body:not(.admin-page) .sf-admin-bar .admin-nav-item i {
    width: 20px !important;
    height: 20px !important;
  }
  
  body:not(.admin-page) .admin-tooltip {
    display: none !important;
  }

  /* Compact close button for mobile */
  body:not(.admin-page) #admin-close-btn {
    margin-left: auto;
    padding-left: 10px !important;
    border-left: 1px solid rgba(255,255,255,0.1) !important;
  }
}

/* Extra small devices hero text fix */
@media (max-width: 480px) {
  h1 { font-size: 2.25rem !important; }
  .text-5xl, .sm\:text-7xl, .md\:text-8xl { font-size: 2.25rem !important; }
}

/* Global Theme Transitions */
:root { 
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease; 
}

/* Auth Buttons Styling */
#login-form button[type="submit"], 
#signup-form button[type="submit"] {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.4);
  border: none;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

#login-form button[type="submit"]:active,
#signup-form button[type="submit"]:active {
  transform: scale(0.98);
}

/* ── PREMIUM ADMIN SIDEBAR & PANEL ───────────────────────── */
.sf-admin-bar {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 68px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  padding: 16px 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 12px 60px -15px rgba(0, 0, 0, 0.15);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .sf-admin-bar {
  background: rgba(12, 12, 15, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.6);
}

.admin-nav-item {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  margin: 8px 0;
  color: #52525b;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  background: transparent;
}

.dark .admin-nav-item { color: #a1a1aa; }

.admin-nav-item:hover {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.admin-nav-item.is-active {
  background: #059669;
  color: #fff !important;
  box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.4);
}

.admin-tooltip {
  position: absolute;
  left: 72px;
  background: #18181b;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-15px);
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 10002;
}

.admin-nav-item:hover .admin-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.admin-panel-area {
  position: fixed;
  left: 112px;
  top: 24px;
  bottom: 24px;
  right: -100vw;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 40px;
  z-index: 9999;
  padding: 48px;
  overflow-y: auto;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  visibility: hidden;
}

.dark .admin-panel-area {
  background: rgba(9, 9, 11, 0.99);
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-panel-area.is-open { 
    right: 24px; 
    opacity: 1; 
    visibility: visible;
}

.admin-panel-close-trigger {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}
.dark .admin-panel-close-trigger { background: rgba(255,255,255,0.05); }
.admin-panel-close-trigger:hover { background: rgba(239, 68, 68, 0.1); }

.admin-portal-open main {
  filter: blur(12px) brightness(0.85);
  transform: scale(0.97);
  pointer-events: none;
}

.admin-portal-open { overflow: hidden; }

.admin-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 13px;
  color: inherit;
  transition: all 0.2s ease;
}

.dark .admin-input { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); color: #fff; }

@media (max-width: 768px) {
  .sf-admin-bar {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    width: auto;
    height: 68px;
    flex-direction: row;
    justify-content: space-around;
    transform: none;
    border-radius: 24px;
    padding: 0 12px;
    z-index: 10002;
  }
  .admin-nav-item { margin: 0; width: 44px; height: 44px; }
  .admin-tooltip { display: none; }
  
  .admin-panel-area { 
    left: 8px; 
    right: 8px; 
    top: auto;
    bottom: -110vh; /* Hide below */
    height: 80vh;
    border-radius: 28px 28px 0 0; 
    padding: 24px; 
    z-index: 10001;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .admin-panel-area.is-open { 
    bottom: 84px; /* Stop above sidebar */
    opacity: 1;
    visibility: visible;
  }
  
  .admin-panel-close-trigger {
      top: 16px;
      right: 16px;
      width: 34px;
      height: 34px;
  }
}

/* Quickview Description Formatting */
#qv-description { 
  min-height: 80px; 
  font-family: 'Inter', sans-serif; 
  letter-spacing: -0.011em; 
  color: #71717a;
}
.dark #qv-description { color: #a1a1aa; }

#qv-description b, #qv-description strong { 
  color: var(--card-title); 
  font-weight: 700;
}
.dark #qv-description b, .dark #qv-description strong { color: #fff; }
