/* =============================================
   MULTI-BRAND PORTAL — Mobile-First Design System v2
   ============================================= */

/* === CSS VARIABLES === */
@import "ui/themes.css";

:root {
  --primary: #1B4963;
  --primary-dark: #0F2D3F;
  --primary-light: #2A6A8F;
  --secondary: #C0C0C0;
  --accent: #4DA3FF;
  --bg-hero: linear-gradient(135deg, #0F2D3F 0%, #1B4963 100%);
  --bg-body: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-dark: #0C0A09;
  --bg-section-alt: #F0F4F8;
  --gradient-text: linear-gradient(135deg, #D9D9D9, #fff, #BFBFBF);
  --text-primary: #1A1A1A;
  --text-secondary: #6B7280;
  --text-on-dark: #E2E8F0;
  --text-on-primary: #FFFFFF;
  --border-color: #E5E7EB;
  --border-light: rgba(255, 255, 255, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.3s var(--ease-out);
  --transition-fast: 0.2s ease;
  --transition-slow: 0.5s var(--ease-out);
  --header-height: 56px;
  --brand-bar-height: 48px;
  --bottom-nav-height: 56px;
  --top-offset: 104px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* === RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--top-offset);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 0;
  opacity: 0;
  animation: pageReveal 0.4s ease-out 0.05s forwards;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
  }
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

::selection {
  background: rgba(27, 73, 99, 0.15);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}



.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--primary);
  box-shadow: none;
  border-bottom: none;
  display: block;
  /* stack rows */
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#nav-content-wrap {
  height: var(--header-height);
  position: relative;
  display: flex;
  align-items: center;
}

/* Unified Brand Pills System (Global) */
.nav-brand-pills {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3px;
}

.brand-bar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.nav-brand-pill {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  padding: 6px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-brand-pill.active,
.nav-brand-pill:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.main-nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 1400px;
  padding: 0 24px;
  margin: 0 auto;
}


.menu-btn {
  position: absolute;
  left: 8px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  transform: translateY(-50%);
  -webkit-tap-highlight-color: transparent;
}

.nav-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
}

.nav-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-bar {
  height: var(--brand-bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.3s ease;
  border-top: none;
  border-bottom: none;
}

@media (min-width: 768px) {
  .brand-bar {
    display: none;
    /* Hide separate bar on desktop since pills are inline */
  }
}

.brand-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}


.brand-tab.active {
  color: #fff;
  box-shadow: none;
}

.brand-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: center;
}

.brand-tab.active::after {
  transform: scaleX(1);
}

/* =======================================
   BOTTOM NAVIGATION
   ======================================= */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #E5E7EB;
  display: flex;
  align-items: stretch;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: var(--bottom-nav-height);
  color: #6B7280;
  background: none;
  border: none;
  border-right: 1px solid #E5E7EB;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  gap: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  border-radius: 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.bottom-nav-item:last-child {
  border-right: none;
}

.bottom-nav-item.active {
  color: var(--primary);
  background: rgba(var(--accent-rgb, 27, 73, 99), 0.04);
}

.bottom-nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav-item:active svg {
  transform: scale(0.9);
}

.cart-badge-bottom {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  height: 16px;
  min-width: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  padding-top: 1px;
  border: 2px solid #fff;
}

.cart-badge-bottom.hidden {
  display: none;
}

@keyframes bounce-scale {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.cart-bounce .cart-badge-bottom {
  animation: bounce-scale 0.4s ease forwards;
}

/* =======================================
   SEARCH MODAL
   ======================================= */
.search-modal {
  position: fixed;
  top: 60px;
  /* matches --header-height for desktop nav */
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid #E5E7EB;
  max-height: 480px;
}

.search-modal.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #E5E7EB;
  padding-top: calc(16px + env(safe-area-inset-top));
}

.search-input {
  flex: 1;
  border: none;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
  appearance: none;
}

#closeSearchBtn {
  background: none;
  border: none;
  color: #374151;
  padding: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* =======================================
   MOBILE MENU (Slide Panel)
   ======================================= */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s 0.35s;
}

.mobile-overlay.open {
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.mobile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  transition: all 0.35s ease;
}

.mobile-overlay.open .mobile-backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.mobile-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 82%;
  max-width: 340px;
  background: #fff;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-overlay.open .mobile-panel {
  transform: translateX(0);
}

.mobile-panel-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary) !important;
  flex-shrink: 0;
}

.mobile-panel-header img {
  height: 28px;
}

.mobile-panel-header button {
  color: #fff;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-links {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  min-height: 48px;
}

.mobile-nav-link:active {
  background: var(--bg-section-alt);
}

.mobile-nav-link svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.mobile-brands {
  padding: 0 16px;
  margin-top: 8px;
}

.mobile-brands-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 12px;
  margin-bottom: 8px;
}

.mobile-brand-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 48px;
}

.mobile-brand-btn:active {
  background: var(--bg-section-alt);
}

.mobile-brand-btn.active {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
}

.mobile-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  flex-shrink: 0;
}

.mobile-brand-btn.active .mobile-brand-dot {
  background: #fff;
  border-color: #fff;
}

.mobile-wa-btn {
  margin: 24px 16px 16px;
  padding: 14px;
  background: #25D366;
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  transition: transform var(--transition-fast);
}

.mobile-wa-btn:active {
  transform: scale(0.97);
}

/* =======================================
   BUTTONS
   ======================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--secondary);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-accent {
  background: var(--primary);
  color: #fff;
}

.btn-accent:hover {
  background: var(--primary-light);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-radius: var(--radius-lg);
}

.btn-whatsapp:hover {
  background: #1ebe5d;
}

.btn-cart {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  font-weight: 800;
}

.btn-full {
  width: 100%;
}

/* =======================================
   SKELETON LOADING
   ======================================= */
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-md);
}

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 3/4;
}

.skeleton-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
}

.skeleton-line-short {
  width: 55%;
}

.skeleton-line-med {
  width: 75%;
}

.skeleton-line-price {
  width: 40%;
  height: 16px;
  margin-top: 4px;
}

/* =======================================
   PRODUCT MODAL — Bottom Sheet (Mobile)
   ======================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  transition: background 0.3s ease;
}

.modal-overlay.open {
  background: rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

/* Bottom sheet handle */
.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: 0 auto 12px;
  flex-shrink: 0;
}

.modal-content {
  width: 100%;
  max-width: 100%;
  max-height: 92vh;
  background: var(--bg-dark);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: none;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: 16px 16px calc(16px + var(--safe-bottom));
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  transition: all var(--transition-fast);
}

.modal-close:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.9);
}

/* Modal product image */
.modal-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  max-height: 280px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 70%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Modal info */
.modal-info {
  color: #fff;
  padding: 16px 0;
  flex: 1;
}

.modal-info h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.modal-info .modal-subtitle {
  font-size: 12px;
  opacity: 0.5;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-info .modal-price {
  font-size: 22px;
  font-weight: 700;
  margin-top: 12px;
  color: var(--accent);
}

.modal-info .modal-desc {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.7;
  margin-top: 12px;
}

/* Sticky CTA at bottom */
.modal-actions {
  padding: 16px 0 0;
  margin-top: auto;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-actions .btn {
  min-height: 52px;
  font-size: 14px;
  border-radius: var(--radius-lg);
}

/* =======================================
   AUTH MODAL — Full Screen (Mobile)
   ======================================= */
.auth-modal {
  background: #fff !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
  padding: 32px 20px calc(32px + var(--safe-bottom)) !important;
  max-height: 95vh !important;
}

.auth-modal h3 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.auth-modal p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: #F9FAFB;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 15px;
  min-height: 50px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 73, 99, 0.1);
}

.auth-submit {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 52px;
  transition: all var(--transition-fast);
  margin-top: 4px;
}

.auth-submit:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-switch button {
  color: var(--primary);
  font-weight: 700;
  min-height: 44px;
  padding: 8px;
}

/* =======================================
   CART DRAWER — Bottom Sheet (Mobile)
   ======================================= */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000 !important;
  /* Force to top of all elements */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.cart-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  height: auto;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
}

.cart-overlay.open .cart-panel {
  transform: translateY(0);
}

.cart-handle {
  width: 36px;
  height: 4px;
  background: #D1D5DB;
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.cart-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-header h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
}

.cart-header button {
  padding: 8px;
  color: var(--text-secondary);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 80px;
  max-height: 45vh;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-section-alt);
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.cart-item-brand {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.cart-item-price {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
}

.cart-item-remove {
  color: #EF4444;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px;
  min-height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.cart-item-remove:active {
  background: rgba(239, 68, 68, 0.08);
}

.cart-footer {
  padding: 16px 20px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border-color);
  background: #F9FAFB;
  flex-shrink: 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.cart-total-value {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.cart-checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  min-height: 52px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.cart-checkout-btn:hover {
  filter: brightness(1.05);
}

.cart-checkout-btn:active {
  transform: scale(0.98);
  filter: brightness(0.9);
}

.cart-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cart-empty svg {
  opacity: 0.15;
}

.cart-empty-text {
  font-size: 14px;
}

.cart-empty-sub {
  font-size: 12px;
  opacity: 0.6;
}

/* =======================================
   TOAST
   ======================================= */
.toast-container {
  position: fixed;
  top: calc(var(--top-offset) + 8px);
  left: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.35s var(--ease-out);
  pointer-events: auto;
  max-width: 100%;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  background: #059669;
}

.toast-error {
  background: #DC2626;
}

.toast-info {
  background: var(--primary);
}

/* =======================================
   ANIMATIONS
   ======================================= */
@keyframes pageReveal {
  to {
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes scrollCarousel {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - 8px));
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes waPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* =======================================
   RESPONSIVE — TABLET (768px+)
   ======================================= */
@media (min-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding: 0 24px;
  }

  body {
    padding-bottom: 0;
  }

  /* Hide bottom nav on tablet+ */
  #bottom-nav {
    display: none !important;
  }

  /* Nav: transparent, overlaid on hero */
  .main-nav {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
  }

  /* Brand bar: also transparent, seamlessly part of hero */
  .brand-bar {
    background: transparent !important;
    border-bottom: none !important;
  }

  /* Logo larger and left-aligned */
  .nav-logo {
    position: static;
    transform: none;
    margin-right: auto;
  }

  .nav-logo img {
    height: 40px;
  }

  .main-nav-inner {
    max-width: 1400px;
    width: 100%;
    padding: 0 24px;
    justify-content: flex-start;
    gap: 40px;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--header-height) + var(--brand-bar-height) + 48px);
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
  }

  .hero-grid {
    flex-direction: row;
    align-items: center;
    gap: 40px;
    width: 100%;
  }

  .hero-content {
    flex: 1;
  }

  .hero-img-wrap {
    height: auto;
    flex: 0 0 40%;
    max-width: 420px;
    aspect-ratio: 3/4;
    margin-top: 0;
    position: relative;
  }

  .hero-desc {
    font-size: 15px;
  }

  /* Products */
  .products-section {
    padding: 64px 0;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .product-card-name {
    font-size: 17px;
  }

  .product-card-desc {
    display: block;
  }

  .product-card-body {
    padding: 14px 16px 18px;
  }

  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
  }

  .product-card:hover .product-card-img img {
    transform: scale(1.04);
  }

  .product-card-overlay {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
    transition: opacity 0.4s ease;
  }

  .product-card:hover .product-card-overlay {
    opacity: 1;
  }

  .product-card-img {
    height: 260px;
  }
  /* Cart panel - right drawer on tablet+ */
  .cart-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    left: auto;
    width: 420px;
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
  }

  .cart-overlay.open .cart-panel {
    transform: translateX(0);
  }

  .cart-handle {
    display: none;
  }

  .cart-items {
    max-height: none;
  }

  /* Modal - centered on tablet */
  .modal-overlay {
    align-items: center;
  }

  .modal-content {
    max-width: 440px;
    border-radius: var(--radius-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 85vh;
  }

  /* Auth modal */
  .auth-modal {
    border-radius: var(--radius-xl) !important;
    padding: 40px !important;
  }

  .modal-content {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .modal-overlay.open .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .modal-overlay:not(.open) {
    visibility: hidden;
    transition: background 0.3s ease, visibility 0s linear 0.3s;
  }

  .modal-overlay.open {
    visibility: visible;
    transition: background 0.3s ease;
  }

  /* Story: Full viewport split */
  .story-section {
    padding: 0;
    overflow: hidden;
  }

  .story-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    gap: 0;
    padding: 0;
  }

  .story-grid.story-grid--reverse {
    flex-direction: row-reverse;
  }

  .story-img {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    aspect-ratio: unset;
  }

  .story-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .story-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 64px;
    background: var(--bg-dark);
    align-self: stretch;
  }

  .story-section {
    background: transparent !important;
  }

  /* Features */
  .features-section {
    padding: 48px 0;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-item {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  /* Testimonials: compact scrolling strip */
  .testimonials-section {
    padding: 56px 0;
  }

  .testimonials-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .testimonials-track::-webkit-scrollbar {
    display: none;
  }

  .testimonial-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
  }

  /* Testimonials Staggered Grid (Desktop Only Fix) */
  .testimonials-section {
    overflow: visible;
  }

  .testimonial-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    animation: none;
    padding: 0;
  }

  /* Only show first 3 cards on desktop */
  .testimonial-card:nth-child(n+4) {
    display: none;
  }

  .testimonial-card {
    width: 100%;
    flex-shrink: unset;
  }

  /* Only show first 3 cards on desktop */
  .testimonial-card:nth-child(n+4) {
    display: none;
  }

  .testimonial-card:nth-child(2) {
    box-shadow: var(--shadow-lg);
  }

  /* Nav scrolled state — solid background restored after hero */
  .main-nav.nav-scrolled {
    background: var(--primary) !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.15) !important;
  }

  .brand-bar.nav-scrolled {
    background: var(--primary) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }







  /* Footer */
  .site-footer {
    padding: 48px 0 56px;
  }

  .footer-grid {
    flex-direction: row;
    gap: 48px;
  }

  .footer-grid>div:first-child {
    flex: 2;
  }

  .footer-grid>div:not(:first-child) {
    flex: 1;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  /* WAB fab */
  .wa-fab {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }

  .wa-fab svg {
    width: 28px;
    height: 28px;
  }

  /* Toast */
  .toast-container {
    left: auto;
    right: 24px;
    max-width: 380px;
  }
}

@media (min-width: 1024px) {
  .hero .container {
    max-width: 1400px;
    padding-left: 24px;
    padding-right: 24px;
    margin: 0 auto;
  }

  .hero-content {
    padding-left: 0;
    max-width: 580px;
  }
}

