/* ============================================================
   LIBRE TECH - E-commerce Stylesheet
   Diseño moderno, minimalista, responsive 2026
   ============================================================ */

/* --- CSS Custom Properties (Tema) --- */
:root {
  /* Colores principales (inspirados en el logo) */
  --primary-blue: #1a4b8c;
  --primary-blue-light: #2563b8;
  --primary-blue-dark: #0f3060;
  --primary-orange: #e87722;
  --primary-orange-light: #f59042;
  --primary-orange-dark: #c9601a;
  --gradient-brand: linear-gradient(135deg, #1a4b8c 0%, #e87722 100%);
  --gradient-brand-soft: linear-gradient(135deg, #1a4b8c22 0%, #e8772222 100%);
  --header-inner-bg: #e87722;

  /* Neutros */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #e8e8ed;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border-color: #d2d2d7;
  --border-light: #e8e8ed;

  /* Estado */
  --success: #34c759;
  --warning: #ff9500;
  --danger: #ff3b30;
  --info: #007aff;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.1);

  /* Tipografía */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Bordes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-height: 64px;
  --max-width: 1280px;
  --cart-width: 420px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--bg-secondary);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(26, 75, 140, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(232, 119, 34, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: inherit;
}

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

/* --- Utilidades --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--primary-orange);
}

/* --- HEADER / NAV --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-inner-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  height: var(--header-height);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 var(--spacing-lg);
  background: var(--header-inner-bg);
  border-radius: 0;
  box-shadow: none;
}

.header-inner .logo-text {
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
}

.header-inner .header-btn,
.header-inner .theme-toggle,
.header-inner .btn-mobile-search {
  color: #fff;
}

.header-inner .search-wrapper .search-input {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.header-inner .search-wrapper .search-icon {
  color: rgba(0, 0, 0, 0.4);
}

.header-inner .search-wrapper .search-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 var(--spacing-md) 0 42px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-blue);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.12);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.search-dropdown.active {
  display: block;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-dropdown-item:hover {
  background: var(--bg-secondary);
}

.search-dropdown-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-dropdown-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.search-dropdown-thumb svg {
  width: 20px;
  height: 20px;
  opacity: 0.3;
}

.search-dropdown-info {
  flex: 1;
  min-width: 0;
}

.search-dropdown-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.search-dropdown-price {
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-primary);
}

.search-dropdown-empty {
  padding: var(--spacing-lg);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  flex-shrink: 0;
  margin-left: auto;
}

.header-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: var(--bg-tertiary);
}

.header-btn svg {
  width: 22px;
  height: 22px;
}

.header-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  pointer-events: none;
}

.btn-google-login {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  height: 38px;
  padding: 0 var(--spacing-md);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-google-login:hover {
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

.btn-google-login img {
  width: 18px;
  height: 18px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid var(--border-light);
  transition: border-color var(--transition-fast);
}

.user-avatar:hover {
  border-color: var(--primary-blue);
}

/* User Menu Dropdown */
.user-menu-wrapper {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 300px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 100;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Login Panel */
.login-panel {
  padding: var(--spacing-lg);
}

.login-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.login-panel-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.login-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.login-close:hover {
  background: var(--bg-tertiary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.login-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.login-field .required {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* Password visibility toggle */
.password-wrapper {
  position: relative;
  display: block;
  width: 100%;
}
.password-wrapper .form-input {
  padding-right: 44px;
  width: 100%;
  box-sizing: border-box;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  width: 32px;
  height: 32px;
  max-width: 32px;
  min-width: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  left: auto;
  opacity: 0.7;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}
.password-toggle:hover {
  opacity: 1;
  color: var(--text-primary);
  background: rgba(0,0,0,0.06);
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
  display: block;
}
[data-theme="dark"] .password-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.login-panel .btn-google-login {
  width: 100%;
  justify-content: center;
}

.login-register {
  text-align: center;
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.login-register p {
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-align: center;
  width: 100%;
}

.create-account-link {
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  display: block;
  width: 100%;
}

.create-account-link:hover {
  text-decoration: underline;
}

.forgot-password-link {
  text-align: right;
  margin-top: -4px;
}
.forgot-password-link a {
  font-size: 0.78rem;
  color: var(--primary-blue);
  text-decoration: none;
}
.forgot-password-link a:hover {
  text-decoration: underline;
}

/* Logged Panel */
.logged-panel .user-dropdown-header {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--spacing-xs);
}

.user-dropdown-header p {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-dropdown-header small {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: none;
  text-align: left;
  transition: background var(--transition-fast);
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--bg-secondary);
}

.user-dropdown svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
}

/* --- HERO BANNER --- */
.hero {
  display: flex;
  position: relative;
  min-height: 280px;
  padding: var(--spacing-lg) 0;
  background: linear-gradient(135deg, #1a4b8c 0%, #0c4a6e 50%, #1a4b8c 100%);
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

/* Static ambient glow — no animation, no flicker */
.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 20% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 30%, rgba(26, 75, 140, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 90%, rgba(232, 119, 34, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

/* Floating electronics icons — individual elements with unique drift */
.hero-float-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-fi {
  position: absolute;
  color: rgba(255,255,255,0.07);
}

/* heroDrift removed — icons are static */

/* Remove old ::before icon background */
.hero::before {
  display: none;
}

/* Orbs, particles, grid lines — hidden */
.hero-orb,
.hero-particles,
.hero-particle,
.hero-grid-lines {
  display: none;
}

/* Straight clean bottom edge */
.hero::after {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.hero-text {
  max-width: 640px;
  text-align: center;
}

/* Eyebrow label */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.95);
  margin-bottom: var(--spacing-lg);
  animation: fadeInUp 0.6s ease-out;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.hero-eyebrow svg {
  color: var(--primary-orange);
}

.hero-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-sm);
  max-width: 90vw;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: var(--spacing-sm);
    max-width: 85vw;
  }
}

.hero-title-line {
  display: block;
  animation: fadeInUp 0.6s ease-out backwards;
}

.hero-title-line:nth-child(1) {
  color: #fff;
  animation-delay: 0.1s;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 40%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto var(--spacing-xl);
  line-height: 1.6;
  font-weight: 400;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: linear-gradient(135deg, var(--primary-orange), #f59e0b);
  border: none;
  border-radius: var(--radius-full);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  box-shadow: 0 4px 24px rgba(232, 119, 34, 0.4);
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.hero-cta:hover::before {
  transform: translateX(100%);
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(232, 119, 34, 0.5);
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
}

/* ============================================================
   SHOWCASE SECTION (Separated carousel)
   ============================================================ */
.showcase-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: linear-gradient(135deg, rgba(26, 75, 140, 0.06) 0%, rgba(99, 102, 241, 0.04) 50%, rgba(232, 119, 34, 0.05) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(26, 75, 140, 0.08);
  flex: 0 0 200px;
  position: sticky;
  top: calc(var(--header-height) + var(--spacing-lg));
}

.products-section .showcase-section {
  margin: 0;
}

@media (max-width: 768px) {
  .showcase-section {
    display: none;
  }
}

.showcase-section .hero-carousel {
  max-height: 300px;
}

.showcase-section .hero-slide {
  height: 120px;
}

.category-bubbles-section {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-md);
  border-radius: var(--radius-xl);
  border: none;
  background: transparent;
}

.category-bubbles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.category-bubbles-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.category-bubbles-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-bubbles-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(26, 75, 140, 0.3);
  transition: all var(--transition-fast);
}

.category-bubbles-dot.active {
  width: 24px;
  border-radius: 20px;
  background: var(--primary-orange);
}

.category-bubbles-viewport {
  overflow: hidden;
}
.category-bubbles-section {
  overflow: visible !important;
  position: relative;
  z-index: 50;
}
.category-bubbles-track,
.category-bubbles-page {
  overflow: visible;
}

.category-bubbles-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-bubbles-page {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--spacing-md);
}

.category-bubble-item {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.category-bubble-item:hover {
  transform: scale(1.05);
}

.category-bubble-item.active .category-bubble-avatar {
  box-shadow: 0 0 0 2px var(--primary-orange);
}

.category-bubble-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(26, 75, 140, 0.8);
  background: linear-gradient(135deg, rgba(26, 75, 140, 0.3), rgba(232, 119, 34, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 75, 140, 0.2);
  transition: all var(--transition-fast);
}

.category-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-bubble-fallback {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-blue-dark);
}

.category-bubble-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* ---- Category sub-dropdown ---- */
.category-bubble-item {
  position: relative; /* anchor for dropdown */
}

.category-sub-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, 0) scale(0.92);
  transform-origin: top center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px rgba(0,0,0,0.24), 0 4px 12px rgba(0,0,0,0.12);
  min-width: 190px;
  width: min(240px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(60vh, 320px);
  overflow-y: auto;
  z-index: 100000;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.category-sub-dropdown.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.category-sub-dropdown.is-mobile {
  transform: translate(-50%, -50%) scale(0.92);
  transform-origin: center;
}

.category-sub-dropdown.is-mobile.visible {
  transform: translate(-50%, -50%) scale(1);
}

.category-sub-dropdown-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  padding: 3px 8px 6px;
}

.category-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.category-sub-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.category-sub-item.active {
  background: rgba(26,75,140,0.08);
  color: var(--primary-blue);
  font-weight: 700;
}

.category-sub-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
}

.category-sub-item.active .category-sub-item-dot {
  background: var(--primary-orange);
}

@media (max-width: 600px) {
  .category-sub-dropdown {
    min-width: 130px;
    font-size: 0.78rem;
  }
}

[data-theme="dark"] .category-sub-dropdown {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] .category-sub-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

[data-theme="dark"] .category-sub-item.active {
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
}

[data-theme="dark"] .showcase-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(26, 75, 140, 0.06) 50%, rgba(232, 119, 34, 0.06) 100%);
  border-color: rgba(99, 102, 241, 0.12);
}

.showcase-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.showcase-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .showcase-title {
    font-size: 0.7rem;
    gap: var(--spacing-xs);
  }
}

.showcase-title svg {
  color: var(--primary-orange);
  filter: drop-shadow(0 0 4px rgba(232, 119, 34, 0.3));
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .showcase-title svg {
    width: 14px;
    height: 14px;
  }
}

.showcase-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  width: 100%;
}

/* --- CATEGORÍAS / FILTROS --- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--spacing-md) 0;
  margin-bottom: var(--spacing-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filters-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.filter-chip:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background: rgba(26, 75, 140, 0.04);
  box-shadow: 0 2px 8px rgba(26, 75, 140, 0.1);
}

.filter-chip.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #fff;
  box-shadow: 0 3px 12px rgba(26, 75, 140, 0.3);
}

.filter-chip svg {
  width: 16px;
  height: 16px;
}

.products-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}

/* Brand Sub-Filters */
.brand-sub-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--spacing-sm) 0 var(--spacing-md);
  overflow-x: auto;
  scrollbar-width: none;
  animation: filterSlideIn 0.3s ease-out;
}

.brand-sub-filters::-webkit-scrollbar { display: none; }

@keyframes filterSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bannerAutoScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.brand-chip:hover {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
  background: rgba(232, 119, 34, 0.04);
}

.brand-chip.active {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
  border-color: var(--primary-orange);
  color: #fff;
  box-shadow: 0 2px 10px rgba(232, 119, 34, 0.25);
}

/* --- GRID DE PRODUCTOS --- */
.products-section {
  padding-bottom: var(--spacing-2xl);
}

.section-heading {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-lg);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  border-radius: 2px;
  margin-top: var(--spacing-xs);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--spacing-lg);
  width: 100%;
  max-width: 100%;
}

/* --- TARJETA DE PRODUCTO --- */
.product-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border-light);
}

.product-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  transform: translateY(-6px);
  border-color: transparent;
}

.product-card-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 ratio */
  background: var(--bg-secondary);
  overflow: hidden;
}

.product-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--spacing-md);
  transition: transform var(--transition-slow);
}

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

.product-card-image .product-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.product-badge.new {
  background: var(--primary-blue);
  color: #fff;
}

.product-badge.sale {
  background: var(--danger);
  color: #fff;
}

.product-card-body {
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-xs);
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.product-price .currency {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 75, 140, 0.3);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-add-cart:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(26, 75, 140, 0.4);
}

.btn-add-cart:active {
  transform: scale(0.95);
}

.btn-add-cart svg {
  width: 20px;
  height: 20px;
}

/* Animación de producto agregado */
.btn-add-cart.added {
  background: var(--success);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* Botón deshabilitado (agotado) */
.btn-add-cart.disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.btn-add-cart.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Badge agotado */
.product-badge.out-of-stock {
  background: #ff3b30;
  color: #fff;
  font-size: 0.75rem;
  z-index: 2;
}

/* Overlay oscuro para producto agotado */
.product-sold-out-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  pointer-events: none;
}

/* Product no image placeholder */
.product-no-image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.product-no-image svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

/* --- CARRITO SIDEBAR --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(var(--cart-width), 90vw);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-primary);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: none;
}

.cart-sidebar.active {
  transform: translateX(0);
  box-shadow: var(--shadow-xl);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.cart-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.cart-header .items-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.cart-close:hover {
  background: var(--bg-tertiary);
}

.cart-close svg {
  width: 20px;
  height: 20px;
}

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-tertiary);
  padding: var(--spacing-xl);
}

.cart-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--spacing-md);
  opacity: 0.3;
}

.cart-empty p {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
}

.cart-empty small {
  font-size: 0.8rem;
}

/* Cart Item Card */
.cart-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  margin-bottom: var(--spacing-sm);
  animation: slideIn var(--transition-base) ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cart-item-image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.qty-value {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-tertiary);
  margin-left: var(--spacing-sm);
  transition: all var(--transition-fast);
}

.cart-item-remove:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger);
}

.cart-item-remove svg {
  width: 16px;
  height: 16px;
}

/* Cart Footer */
.cart-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-lg);
  flex-shrink: 0;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.cart-subtotal-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.cart-subtotal-value {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  background: #25d366;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

.btn-whatsapp svg {
  width: 22px;
  height: 22px;
}

.btn-whatsapp:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Botón pagar en línea */
.btn-pay-online {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  margin-bottom: var(--spacing-sm);
  border: none;
  cursor: pointer;
}

.btn-pay-online:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-pay-online:active {
  transform: translateY(0);
}

.btn-pay-online svg {
  width: 22px;
  height: 22px;
}

/* Product detail disabled button */
.btn-disabled {
  background: var(--text-tertiary) !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.btn-disabled:hover {
  transform: none !important;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 5000;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--spacing-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn var(--transition-base) ease-out;
  max-width: 360px;
}

.toast.toast-out {
  animation: toastOut var(--transition-fast) ease-in forwards;
}

.toast svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* --- FOOTER --- */
.site-footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--spacing-2xl) 0;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.footer-brand .logo-img {
  width: 32px;
  height: 32px;
}

.footer-brand span {
  font-weight: 700;
  color: #fff;
}

.footer-links {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  width: 100%;
  text-align: center;
  padding-top: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}

/* --- MODAL DE HISTORIAL DE PEDIDOS --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: var(--spacing-lg);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-tertiary);
}

.modal-body {
  padding: var(--spacing-lg);
}

/* Order card */
.order-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  font-size: 0.85rem;
}

.order-date {
  color: var(--text-secondary);
}

.order-total {
  font-weight: 700;
}

.order-items-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.order-items-list li {
  padding: 2px 0;
}

/* --- LOADING SKELETON --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */

.admin-layout {
  min-height: 100vh;
  background: var(--bg-secondary);
}

.admin-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-sm) var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.85);
}

[data-theme="dark"] .admin-header {
  background: rgba(15,15,26,0.9);
}

[data-theme="dark"] .pv-header {
  background: linear-gradient(90deg, #0f3060, #1a4b8c);
}
[data-theme="dark"] .pv-main-area {
  background: var(--bg-primary);
  border-color: var(--border-color);
}
[data-theme="dark"] .pv-trust,
[data-theme="dark"] .pv-footer {
  background: rgba(255,255,255,0.03);
  border-color: var(--border-color);
}
[data-theme="dark"] .pv-hero {
  background: rgba(26,75,140,0.15);
  border-color: rgba(96,165,250,0.35);
}
[data-theme="dark"] .pv-sidebar-banner {
  background: rgba(232,119,34,0.1);
  border-color: rgba(232,119,34,0.35);
}
[data-theme="dark"] .pv-full-banner {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.35);
}
[data-theme="dark"] .pv-slot-status {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}
[data-theme="dark"] .pv-slot-info .pv-slot-label,
[data-theme="dark"] .pv-sidebar-banner .pv-slot-label {
  color: var(--text-primary);
}
[data-theme="dark"] .pv-legend-hero { background: rgba(96,165,250,0.1); color: #93c5fd; }
[data-theme="dark"] .pv-legend-side { background: rgba(232,119,34,0.1); color: #fdba74; }
[data-theme="dark"] .pv-legend-full { background: rgba(16,185,129,0.1); color: #6ee7b7; }
[data-theme="dark"] .pv-legend-content { background: var(--bg-tertiary); color: var(--text-secondary); }

.admin-header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.admin-logo-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.admin-logo-link:hover {
  opacity: 0.8;
}

.admin-header .header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.admin-header .header-actions .btn {
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: var(--radius-md);
}

.admin-header .logo-img {
  width: 36px;
  height: 36px;
}

.admin-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
}

/* Admin Login */
.admin-login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
}

.admin-login-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-2xl);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.admin-login-card .logo-img {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-lg);
}

.admin-login-card h2 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-xs);
}

.admin-login-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-xl);
}

/* Admin Stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-light);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon svg {
  width: 24px;
  height: 24px;
}

.stat-card--blue .stat-card-icon {
  background: rgba(26, 75, 140, 0.1);
  color: var(--primary-blue);
}

.stat-card--orange .stat-card-icon {
  background: rgba(232, 119, 34, 0.1);
  color: var(--primary-orange);
}

.stat-card--green .stat-card-icon {
  background: rgba(52, 199, 89, 0.1);
  color: var(--success);
}

.stat-card--purple .stat-card-icon {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.stat-card-info {
  flex: 1;
  min-width: 0;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 6px;
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.2s;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.admin-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.admin-tab:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.admin-tab:hover svg {
  opacity: 1;
}

.admin-tab.active {
  background: var(--primary-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 75, 140, 0.25);
}

.admin-tab.active svg {
  opacity: 1;
}

/* Admin Panel */
.admin-panel {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  width: 100%;
}

.admin-tab-content {
  width: 100%;
}

.admin-tab-content .admin-stats {
  width: 100%;
}

.social-links-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  max-width: 100%;
}

.social-links-form .btn {
  grid-column: 1 / -1;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

/* ============================================================
   VISUALIZACIÓN TAB — Page Preview Minimap
   ============================================================ */
/* Legend */
.pv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--spacing-md);
}
.pv-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.pv-legend-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pv-legend-hero { background: rgba(26,75,140,0.1); color: var(--primary-blue-dark); }
.pv-legend-hero::before { background: var(--primary-blue); }
.pv-legend-side { background: rgba(232,119,34,0.1); color: var(--primary-orange-dark); }
.pv-legend-side::before { background: var(--primary-orange); }
.pv-legend-full { background: rgba(16,185,129,0.1); color: #065f46; }
.pv-legend-full::before { background: var(--success); }
.pv-legend-content { background: var(--bg-tertiary); color: var(--text-secondary); }
.pv-legend-content::before { background: var(--border-color); }

.page-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  border: 1px solid var(--border-light);
}

.pv-section {
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.pv-header {
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-light));
  border: none;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  min-height: 32px;
}

.pv-header svg { color: rgba(255,255,255,0.7); }

.pv-hero {
  background: linear-gradient(135deg, rgba(26,75,140,0.12), rgba(37,99,176,0.1));
  border: 2px dashed rgba(26,75,140,0.4);
  min-height: 72px;
  justify-content: space-between;
}

.pv-cats {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  justify-content: center;
  font-size: 0.76rem;
  color: var(--text-tertiary);
  min-height: 34px;
}

.pv-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 5px;
}

.pv-row-reverse {
  grid-template-columns: 1fr 140px;
}

.pv-sidebar-banner {
  background: linear-gradient(135deg, rgba(232,119,34,0.09), rgba(243,156,18,0.07));
  border: 2px dashed rgba(232,119,34,0.5);
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 90px;
  justify-content: center;
  gap: 5px;
}

.pv-main-area {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  justify-content: center;
  color: var(--text-tertiary);
  font-weight: 500;
}

.pv-full-banner {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(5,158,104,0.06));
  border: 2px dashed rgba(16,185,129,0.45);
  min-height: 52px;
  justify-content: space-between;
}

.pv-trust {
  background: linear-gradient(90deg, rgba(26,75,140,0.07), rgba(232,119,34,0.05));
  border: 1px solid var(--border-light);
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.pv-footer {
  background: rgba(15,15,30,0.07);
  border: 1px solid var(--border-light);
  justify-content: center;
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 0.75rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.pv-banner-slot {
  cursor: pointer;
  transition: box-shadow 0.18s, border-color 0.18s;
  position: relative;
}

.pv-banner-slot:hover {
  box-shadow: 0 2px 14px rgba(0,0,0,0.1);
}

.pv-hero.pv-banner-slot:hover { border-color: var(--primary-blue); }
.pv-sidebar-banner.pv-banner-slot:hover { border-color: var(--primary-orange); }
.pv-full-banner.pv-banner-slot:hover { border-color: var(--success); }

.pv-banner-slot.pv-has-image {
  background-size: cover;
  background-position: center;
  border-style: solid;
}

.pv-banner-slot.pv-has-image .pv-slot-label,
.pv-banner-slot.pv-has-image .pv-slot-status {
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
}

/* Slot inner layout */
.pv-slot-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.pv-slot-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pv-slot-info { min-width: 0; }
.pv-slot-info .pv-slot-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv-slot-info .pv-slot-desc {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* Sidebar slot label (vertical layout) */
.pv-sidebar-banner .pv-slot-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Standalone slot label (hero/full without .pv-slot-inner) */
.pv-slot-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-slot-status {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
}

/* Icon circles */
.pv-slot-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pv-icon-hero { background: rgba(26,75,140,0.12); color: var(--primary-blue); }
.pv-icon-side { background: rgba(232,119,34,0.12); color: var(--primary-orange); }
.pv-icon-full { background: rgba(16,185,129,0.12); color: var(--success); }

.pv-edit-btn {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}

.pv-banner-slot:hover .pv-edit-btn {
  opacity: 1;
}

.pv-edit-btn:hover {
  background: var(--primary-blue-light);
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.admin-panel-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-panel-body {
  padding: var(--spacing-lg);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-blue-light);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-blue);
  background: var(--bg-primary);
}

.btn-danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #2db350;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Product Table */
.products-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table th,
.products-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.products-table th {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.products-table tr:last-child td {
  border-bottom: none;
}

.products-table tr:hover td {
  background: var(--bg-secondary);
}

.table-product-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.table-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  overflow: hidden;
  flex-shrink: 0;
}

.table-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.table-actions {
  display: flex;
  gap: 4px;
}

.table-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.table-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.table-btn.delete:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger);
}

.table-btn svg {
  width: 16px;
  height: 16px;
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.table-status.active {
  background: rgba(52, 199, 89, 0.1);
  color: var(--success);
}

.table-status.inactive {
  background: rgba(142, 142, 147, 0.1);
  color: var(--text-tertiary);
}

.table-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==================== ADMIN TABLE (Users, Reviews) ==================== */
.admin-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.admin-table th {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
}

.admin-table tbody tr {
  transition: background 0.15s;
}

.admin-table tbody tr:hover {
  background: var(--bg-secondary);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table td:last-child {
  text-align: center;
}

/* CSV Upload */
.csv-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-2xl);
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  margin-bottom: var(--spacing-lg);
}

.csv-upload-zone:hover,
.csv-upload-zone.dragover {
  border-color: var(--primary-blue);
  background: rgba(26, 75, 140, 0.03);
}

.csv-upload-zone svg {
  width: 40px;
  height: 40px;
  color: var(--text-tertiary);
  margin-bottom: var(--spacing-md);
}

.csv-upload-zone p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.csv-upload-zone small {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.csv-upload-zone .browse-link {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: underline;
}

/* Image Upload in Product Form */
.image-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.image-upload-area:hover {
  border-color: var(--primary-blue);
}

.image-upload-area.has-image {
  padding: 0;
  border-style: solid;
}

.image-upload-area img {
  max-height: 200px;
  object-fit: contain;
  margin: 0 auto;
}

.image-upload-area .upload-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.image-upload-area .upload-text svg {
  display: block;
  margin: 0 auto var(--spacing-sm);
  width: 32px;
  height: 32px;
  color: var(--text-tertiary);
}

/* Multi-image previews grid */
.image-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.img-preview-item {
  position: relative;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-light);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-secondary);
}

.img-preview-item.primary {
  border-color: var(--primary-blue);
}

.img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.img-preview-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  background: rgba(0,0,0,0.6);
}

.img-prev-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  color: #fff;
  transition: background 0.2s;
}

.img-prev-btn:hover {
  background: rgba(255,255,255,0.4);
}

.img-prev-btn.delete:hover {
  background: var(--error);
}

.img-primary-badge {
  font-size: 10px;
  color: var(--primary-blue);
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
}

/* Product Form Modal */
.product-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: var(--spacing-lg);
}

.product-form-overlay.active {
  opacity: 1;
  visibility: visible;
}

.product-form-modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.product-form-overlay.active .product-form-modal {
  transform: scale(1);
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding-top: calc(var(--header-height) + var(--spacing-lg));
  padding-bottom: var(--spacing-md);
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.breadcrumb a {
  color: var(--primary-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb svg {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

/* Layout */
.product-detail {
  padding-bottom: var(--spacing-3xl);
}

.pd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: start;
}

/* Gallery */
.pd-gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--spacing-lg));
}

.pd-main-image {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--spacing-lg);
}

.pd-main-image .product-no-image {
  position: static;
  width: 80px;
  height: 80px;
}

/* Thumbnails strip */
.pd-thumbnails {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  overflow-x: auto;
  padding-bottom: var(--spacing-xs);
}

.pd-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-light);
  background: var(--bg-secondary);
  overflow: hidden;
  cursor: pointer;
  padding: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pd-thumb:hover {
  border-color: var(--primary-blue);
}

.pd-thumb.active {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Info */
.pd-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.pd-brand {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pd-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0;
}

.pd-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-orange);
}

/* Stock */
.pd-stock {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.9rem;
  font-weight: 500;
}

.pd-stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pd-stock.in-stock .pd-stock-dot { background: #34c759; }
.pd-stock.in-stock { color: #34c759; }

.pd-stock.low-stock .pd-stock-dot { background: #ff9500; }
.pd-stock.low-stock { color: #ff9500; }

.pd-stock.out-of-stock .pd-stock-dot { background: #ff3b30; }
.pd-stock.out-of-stock { color: #ff3b30; }

/* Color selector */
.pd-option-group {
  margin-top: var(--spacing-sm);
}

.pd-option-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pd-colors {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.pd-color-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 6px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pd-color-btn:hover {
  border-color: var(--primary-blue);
}

.pd-color-btn.active {
  border-color: var(--primary-blue);
  background: rgba(26, 75, 140, 0.05);
  color: var(--primary-blue);
  font-weight: 600;
}

.pd-color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* Specifications */
.pd-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md);
}

.pd-specs {
  margin-top: var(--spacing-sm);
}

.pd-specs-table {
  width: 100%;
  border-collapse: collapse;
}

.pd-specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.pd-specs-table tr:last-child {
  border-bottom: none;
}

.pd-specs-table td {
  padding: 10px 0;
  font-size: 0.9rem;
}

.pd-spec-key {
  color: var(--text-tertiary);
  font-weight: 500;
  width: 40%;
}

.pd-spec-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Description */
.pd-description {
  margin-top: var(--spacing-sm);
}

.pd-description p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Actions */
 .pd-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 !important;
    padding: 10px 12px !important;
    background: var(--bg-primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
    z-index: 20;
    gap: 8px !important;
    display: flex !important;
    align-items: center;
    box-sizing: border-box;
  }

  [data-theme="dark"] .pd-actions {
    background: rgba(20, 20, 25, 0.92);
    border-top-color: rgba(255,255,255,0.08);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.5);
  }

  /* Dar espacio extra abajo para que el contenido no quede tapado por la barra fija */
  body.has-pd-actions,
  .product-detail {
    padding-bottom: 90px !important;
  }

.pd-qty {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

.qty-btn:hover {
  background: var(--bg-secondary);
}

.qty-value {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.btn-add-cart-lg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  height: 48px;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-add-cart-lg:hover {
  background: #15407a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 75, 140, 0.3);
}

.btn-add-cart-lg svg {
  width: 20px;
  height: 20px;
}

/* Recommended section */
.recommended-section {
  padding: var(--spacing-3xl) 0;
  border-top: 1px solid var(--border-color);
  margin-top: var(--spacing-xl);
}

.recommended-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-xl);
}

.recommended-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Product card link (wrapping cards) */
.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card-link:hover .product-name {
  color: var(--primary-blue);
}

/* Product card with floating add-to-cart */
.product-card {
  position: relative;
}

.product-card > .btn-add-cart {
  position: absolute;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 2;
}

/* ============================================================
   ADMIN FORM - Colors & Specs
   ============================================================ */

/* Color tags */
.colors-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  align-items: center;
  min-height: 44px;
}

.colors-input-wrapper .form-input {
  border: none;
  padding: 4px 8px;
  flex: 1;
  min-width: 120px;
  background: transparent;
}

.colors-input-wrapper .form-input:focus {
  outline: none;
  box-shadow: none;
}

.colors-tags {
  display: contents;
}

.color-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--primary-blue);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.color-tag-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}

.color-tag-remove:hover {
  color: #fff;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Spec rows */
.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  align-items: center;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  border-color: #ff3b30;
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.05);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .header-inner {
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-md);
  }

  .logo-text {
    display: none;
  }

  .search-wrapper {
    max-width: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .user-dropdown {
    min-width: 280px;
    right: -40px;
  }

  .hero {
    padding: var(--spacing-md) 0;
    min-height: 160px;
  }

  .hero-title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: var(--spacing-sm);
  }

  .hero-stats {
    gap: var(--spacing-sm);
    flex-wrap: wrap;
  }

  .hero-stat-number {
    font-size: 1rem;
  }

  .category-bubble-avatar {
    width: 64px;
    height: 64px;
  }

  .category-bubble-label {
    font-size: 0.75rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .product-card-body {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
  }

  .product-price {
    font-size: 1.1rem;
  }

  .product-description {
    display: none;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .toast-container {
    left: var(--spacing-md);
    right: var(--spacing-md);
    bottom: var(--spacing-md);
  }

  .toast {
    max-width: 100%;
  }

  /* Product detail responsive */
  .pd-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .pd-gallery {
    position: static;
  }

  .pd-thumbnails {
    justify-content: center;
  }

  .pd-thumb {
    width: 52px;
    height: 52px;
  }

  .pd-name {
    font-size: 1.5rem;
  }

  .pd-price {
    font-size: 1.4rem;
  }

  .recommended-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .breadcrumb {
    padding-top: calc(var(--header-height) + var(--spacing-md));
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  .product-card-image {
    padding-top: 90%;
  }

  .product-name {
    font-size: 0.85rem;
  }

  .product-price {
    font-size: 0.95rem;
  }

  .btn-add-cart {
    width: 36px;
    height: 36px;
  }

  .btn-add-cart svg {
    width: 16px;
    height: 16px;
  }

  .cart-item-image {
    width: 56px;
    height: 56px;
  }

  .hero {
    padding: var(--spacing-sm) 0;
    min-height: 140px;
  }

  .hero-title {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-bottom: var(--spacing-xs);
  }

  .hero-cta {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.85rem;
  }

  .hero-stats {
    gap: var(--spacing-xs);
  }

  .category-bubble-avatar {
    width: 56px;
    height: 56px;
  }

  .category-bubble-label {
    font-size: 0.7rem;
  }
}

/* --- Print Styles --- */
@media print {
  .site-header,
  .cart-sidebar,
  .cart-overlay,
  .toast-container {
    display: none !important;
  }
}

/* --- Reducción de movimiento --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   HERO CAROUSEL (now inside .showcase-section)
   ============================================================ */
.hero-carousel {
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
  transition: box-shadow 0.3s;
}

.hero-carousel:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
}

.hero-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  text-decoration: none;
  color: inherit;
  padding: var(--spacing-2xl) var(--spacing-xl);
  position: relative;
}

/* Gradient overlay so text is readable over any background image */
.hero-carousel[style*="background-image"] .hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-carousel[style*="background-image"] .hero-slide > * {
  position: relative;
  z-index: 1;
}

/* Keep discount badge absolutely positioned even over a background image */
.hero-carousel[style*="background-image"] .hero-slide > .hero-slide-discount-badge {
  position: absolute;
}

.hero-slide-image {
  background: transparent;
  border-radius: var(--radius-lg);
  width: 300px;
  height: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide:hover .hero-slide-image {
  transform: scale(1.03);
}

.hero-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--spacing-md);
}

.hero-slide-placeholder {
  width: 60px;
  height: 60px;
  opacity: 0.3;
}

.hero-slide-placeholder svg {
  width: 100%;
  height: 100%;
  stroke: var(--text-tertiary);
}

.hero-slide-info {
  flex: 1;
  min-width: 0;
}

.hero-slide-cat {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-blue);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(26, 75, 140, 0.12), rgba(99, 102, 241, 0.10));
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: var(--spacing-xs);
}

.hero-slide-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff !important;
  margin: var(--spacing-sm) 0;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25), 0 1px 3px rgba(0,0,0,0.3);
  letter-spacing: -0.02em;
}

.hero-slide-price {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary-orange);
  text-shadow: 0 1px 8px rgba(232, 119, 34, 0.25);
}

/* Carousel discount badge — BIG & attention-grabbing */
.hero-slide--offer {
  position: relative;
}

.hero-slide-discount-badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: linear-gradient(135deg, #ff1744 0%, #d50000 100%);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  padding: 12px 20px;
  border-radius: 16px;
  z-index: 2;
  box-shadow: 0 6px 24px rgba(213, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.3);
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-slide-prices {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.hero-slide-price--offer {
  font-family: 'Poppins', sans-serif;
  color: #ff1744;
  font-size: 1.8rem;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(255, 23, 68, 0.25);
}

.hero-slide-price--original {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  text-decoration: line-through;
  font-weight: 500;
}

.hero-carousel-dots {
  display: flex;
  gap: var(--spacing-xs);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.carousel-dot.active {
  background: var(--primary-blue);
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .category-bubbles-viewport {
    overflow: hidden !important;
    width: 100%;
  }
  .category-bubbles-section { overflow: visible !important; }
  .category-bubbles-track {
    display: flex;
    width: 100%;
  }
  .category-bubbles-page {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 0 0 100%;
    min-width: 100%;
    gap: var(--spacing-sm);
    justify-items: center;
    padding: 0 var(--spacing-xs);
  }
  .category-bubbles-page > .category-bubble-item {
    width: 100%;
    min-width: 0;
  }
  .category-sub-dropdown {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.92);
    width: min(88vw, 320px);
    max-width: 88vw;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 100000 !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.06);
  }
  .category-sub-dropdown.visible {
    transform: translate(-50%, -50%) scale(1);
  }

  .category-bubble-avatar {
    width: 64px;
    height: 64px;
  }

  .hero-content {
    text-align: center;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-slide {
    flex-direction: column;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    gap: var(--spacing-md);
  }
  .hero-slide-image {
    width: 100%;
    height: 200px;
  }
  .hero-slide-name {
    font-size: 1.2rem;
  }
  .hero-slide-price {
    font-size: 1.3rem;
  }
  .hero-slide-price--offer {
    font-size: 1.4rem;
  }
  .hero-slide-discount-badge {
    font-size: 1.1rem;
    padding: 8px 14px;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    border-radius: 12px;
  }
  .hero-slide-cat {
    font-size: 0.72rem;
    padding: 3px 10px;
  }
  .showcase-header {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  /* Gradient overlay on mobile: from bottom for stacked layout */
  .hero-carousel[style*="background-image"] .hero-slide::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.65) 100%);
  }
}

@media (max-width: 480px) {
  .category-bubbles-section {
    padding: var(--spacing-md);
    margin: var(--spacing-lg) var(--spacing-sm);
  }

  .category-bubbles-page {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: var(--spacing-xs);
  }

  .category-bubble-avatar {
    width: 52px;
    height: 52px;
    border-width: 2px;
  }

  .category-bubble-label {
    font-size: 0.7rem;
  }

  .hero-slide {
    padding: var(--spacing-md) var(--spacing-sm);
  }
  .hero-slide-image {
    height: 160px;
  }
  .hero-slide-name {
    font-size: 1.05rem;
  }
  .hero-slide-price {
    font-size: 1.15rem;
  }
  .hero-slide-price--offer {
    font-size: 1.2rem;
  }
  .hero-slide-discount-badge {
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 10px;
  }
}

/* ============================================================
   BRAND DROPDOWN (replaces fixed sub-bar)
   ============================================================ */
.brand-dropdown {
  position: relative;
  z-index: 50;
}

.brand-dropdown-content {
  position: absolute;
  top: 6px;
  left: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.04);
  padding: var(--spacing-sm) var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  max-height: 360px;
  overflow-y: auto;
  animation: dropdownFadeIn 0.2s ease-out;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.brand-dropdown-content::-webkit-scrollbar {
  width: 4px;
}

.brand-dropdown-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.brand-dd-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-weight: 500;
}

.brand-dd-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.brand-dd-item.active {
  background: linear-gradient(135deg, rgba(26, 75, 140, 0.08), rgba(99, 102, 241, 0.06));
  color: var(--primary-blue);
  font-weight: 700;
  position: relative;
}

.brand-dd-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--primary-blue);
  border-radius: 3px;
}

/* ============================================================
   STAR RATINGS
   ============================================================ */
.star-rating {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 0.85rem;
}

.star {
  color: #ccc;
  font-size: 0.9rem;
}

.star.filled,
.star.half {
  color: #f5a623;
}

.rating-count {
  margin-left: 4px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Rating on product detail page */
.pd-rating-interactive {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.pd-rate-stars {
  display: flex;
  gap: 2px;
}

.pd-rate-star {
  font-size: 1.5rem;
  color: #ccc;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px;
  transition: color var(--transition-fast);
}

.pd-rate-star:hover,
.pd-rate-star.active {
  color: #f5a623;
}

.pd-rate-text {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* ============================================================
   PRODUCT BADGE - Featured
   ============================================================ */
.product-badge.featured {
  background: linear-gradient(135deg, #f5a623, #e87722);
  right: auto;
  left: var(--spacing-sm);
  top: 42px;
}

.product-badge.sale {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  left: auto;
  right: var(--spacing-sm);
  top: var(--spacing-sm);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xl);
  padding-top: var(--spacing-xl);
}

/* ============================================================
   TOP CATEGORIES SECTION
   ============================================================ */
.top-categories-section {
  padding-bottom: var(--spacing-3xl);
}

.top-categories-section .section-with-banner {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--spacing-xl);
  align-items: start;
}

@media (max-width: 768px) {
  .top-categories-section .section-with-banner {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

.top-categories-section .promo-banner--right {
  position: static;
  width: 200px;
  margin-right: -50px;
  padding-right: 50px;
}

@media (max-width: 768px) {
  .top-categories-section .promo-banner--right {
    position: static;
    width: 100%;
    margin-right: 0;
    padding-right: 0;
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--spacing-xs);
  }
  .top-categories-section .promo-banner--right #promoBannerRightAdminStack {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    width: 100%;
  }
  .top-categories-section .promo-banner--right .promo-banner-link {
    flex: 0 0 auto;
    width: 140px;
  }
}

@media (max-width: 480px) {
  .top-categories-section .promo-banner--right {
    position: static;
    width: 100%;
    margin-right: 0;
    padding-right: 0;
    display: flex;
    flex-direction: row;
    gap: var(--spacing-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
}


.top-category-block {
  margin-top: var(--spacing-3xl);
  padding-top: var(--spacing-xl);
  border-top: 1px dashed var(--border-light);
}

.top-category-block:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.top-category-block .section-heading {
  border-bottom: 2px solid var(--primary-blue);
  display: inline-block;
  margin-bottom: var(--spacing-lg);
  font-size: 1.25rem;
  font-weight: 800;
  padding-bottom: 4px;
}

.top-category-block .products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: var(--spacing-2xl);
  column-gap: var(--spacing-xl);
}

@media (max-width: 768px) {
  .top-category-block {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-lg);
  }
  .top-category-block .section-heading {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
  }
  .top-category-block .products-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--spacing-md);
    row-gap: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .top-category-block {
    margin-top: var(--spacing-xl);
  }
  .top-category-block .products-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--spacing-sm);
    row-gap: var(--spacing-md);
  }
}

.section-main-content {
  min-width: 0;
}

/* ============================================================
   SECTION WITH PROMO BANNER LAYOUT
   ============================================================ */
.section-with-banner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--spacing-xl);
  align-items: start;
  margin-top: 0;
}

.section-with-banner--right {
  grid-template-columns: 1fr 200px;
}

@media (max-width: 768px) {
  .section-with-banner {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 0;
    padding-top: 0;
  }
}

.section-main-content {
  min-width: 0;
}

@media (max-width: 768px) {
  .section-main-content {
    min-width: 0;
    /* Evitar solapamiento con el banner fijo de "Lo Más Vendido" */
  }
}

/* Ensure left showcase and right promo columns keep fixed width and don't overlap content */
.showcase-section {
  width: 200px;
  flex: 0 0 auto;
}

.showcase-section--compact {
  border-radius: var(--radius-lg);
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: auto;
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: local;
  margin-top: 0;
  align-self: flex-start;
  margin-bottom: 0;                /* antes var(--spacing-lg) — quita el hueco */
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

@media (max-width: 768px) {
  .showcase-section--compact {
    height: auto;
    min-height: auto;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-bottom: var(--spacing-md);
    padding: 0;
  }
}

.showcase-section--compact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 1;
}

.showcase-section--compact > * {
  position: relative;
  z-index: 2;
}

.showcase-section--compact .showcase-header {
  padding: var(--spacing-xs) var(--spacing-md) var(--spacing-sm);
  padding-top: 0;
  margin-top: -8px;
  flex-shrink: 0;
  order: 1;
  background: transparent;
  position: relative;
  z-index: 3;
}

@media (max-width: 768px) {
  .showcase-section--compact .showcase-header {
    padding: var(--spacing-xs) 0;
    background: transparent;
    margin-bottom: 0;
  }
}

.showcase-section--compact .showcase-nav {
  padding: var(--spacing-sm) var(--spacing-sm);
  flex-shrink: 0;
  order: 3;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-top: none;
}

@media (max-width: 768px) {
  .showcase-section--compact .showcase-nav {
    background: transparent;
    border-top: none;
    padding: 0;
    display: none;
  }
}

.showcase-section--compact .hero-carousel {
  flex: 1;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  order: 2;
  background: transparent;
  display: none;
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-carousel {
    overflow-x: auto;
    overflow-y: visible;
    margin: 0;
    border-radius: 0;
    background: transparent !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .showcase-section--compact .hero-carousel::-webkit-scrollbar {
    display: none;
  }
}   
   

.showcase-section--compact .hero-carousel-track {
  flex-direction: row;
  padding: 0;
  height: 0;
  overflow: hidden;
  display: none;
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-carousel-track {
    height: auto;
    overflow: visible;
    scroll-behavior: smooth;
    gap: var(--spacing-sm);
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
  }
  .showcase-section--compact .hero-carousel-track::-webkit-scrollbar {
    display: none;
  }

}

.showcase-section--compact .hero-slide {
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  position: relative;
  justify-content: center;
  backdrop-filter: blur(2px);
  min-width: 100%;
  width: 100%;
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide {
    min-width: 150px;
    width: 150px;
    padding: var(--spacing-sm);
    flex-direction: column;
    gap: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    justify-content: flex-start;
    align-items: center;
    backdrop-filter: none;
    min-height: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  .showcase-section--compact .hero-slide-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
}

#mostSoldMobileSlot .showcase-section--compact .hero-slide-info {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    flex: 1 1 auto !important;
    min-height: 110px !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0 4px;
    overflow: visible !important;
  }

.showcase-section--compact .hero-slide::before {
  display: none;
}

.showcase-section--compact .hero-slide-image {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-xs);
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide-image {
    width: 110px;
    height: 110px;
    background: var(--bg-secondary);
    margin: 0 auto 6px;
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .showcase-section--compact .hero-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
  }
}

.showcase-section--compact .hero-slide-name {
  font-size: 0.8rem;
  margin: var(--spacing-xs) 0;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  font-weight: 600;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide-name {
    font-size: 0.78rem;
    color: var(--text-primary);
    text-shadow: none;
    margin: 4px 0 2px;
    line-height: 1.2;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
  }
  .showcase-section--compact .hero-slide-price,
  .showcase-section--compact .hero-slide-price--offer {
    font-size: 0.9rem !important;
    font-weight: 800;
  }
}

.showcase-section--compact .hero-slide-price {
  font-size: 1rem;
  color: var(--primary-orange);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  font-weight: 700;
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide-price {
    font-size: 0.75rem;
    color: var(--primary-orange);
    text-shadow: none;
    font-weight: 700;
  }
}

.showcase-section--compact .hero-slide-price--offer {
  font-size: 1.1rem;
  color: #ffeb3b;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  font-weight: 800;
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide-price--offer {
    font-size: 0.8rem;
    color: var(--primary-orange);
    text-shadow: none;
    font-weight: 700;
  }
}

.showcase-section--compact .hero-slide-price--original {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-decoration: line-through;
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide-price--original {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    text-decoration: line-through;
  }
}

.showcase-section--compact .hero-slide-discount-badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
  z-index: 10;
  background: linear-gradient(135deg, #ff1744 0%, #d50000 100%) !important;
  box-shadow: 0 4px 12px rgba(213, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide-discount-badge {
    font-size: 0.65rem;
    padding: 3px 6px;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    border-radius: 6px;
  }
}

.showcase-section--compact .hero-slide-cat {
  font-size: 0.65rem;
  padding: 2px 8px;
  margin-bottom: 0;
  background: rgba(26, 75, 140, 0.7);
  color: #fff;
  display: inline-block;
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .showcase-section--compact .hero-slide-cat {
    font-size: 0.55rem;
    padding: 2px 6px;
    background: var(--primary-blue);
    color: #fff;
  }
}

.promo-banner--left {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: stretch;
  position: static;
  align-self: flex-start;
  z-index: 50;
  margin-top: 0;
}

@media (max-width: 768px) {
  .promo-banner--left {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    z-index: 50;
    gap: var(--spacing-md);
    margin-top: 0;
    flex-direction: column;
  }
  .promo-banner--left #promoBannerLeftAdminStack {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--spacing-xs);
  }
  .promo-banner--left #promoBannerLeftAdminStack .promo-banner-link {
    flex: 0 0 auto;
    width: 140px;
  }
}

.promo-banner--right {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  align-items: stretch;
  position: static;
  align-self: flex-start;
}

.promo-banner--right .promo-hero-placeholder,
.promo-banner--right .promo-side-placeholder,
.promo-banner--left .promo-hero-placeholder,
.promo-banner--left .promo-side-placeholder {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.promo-banner--left .promo-side-placeholder {
  margin-top: var(--spacing-sm);   /* pequeña separación del showcase */
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

/* Promo banner vertical */
.promo-banner {
  position: sticky;
  top: calc(var(--header-height) + var(--spacing-lg));
}

.promo-banner-link {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, box-shadow 0.3s;
}

.promo-banner-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Offer style (left) */
.promo-banner--offer-style {
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  color: #fff;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.promo-banner-badge {
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.promo-banner-tag {
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-orange), #f59e0b);
  color: #fff;
}

.promo-banner-img {
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm);
  background: rgba(255,255,255,0.05);
}

.promo-banner-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.promo-banner-body {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.promo-banner-discount {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-weight: 800;
  font-size: 1.3rem;
  padding: 2px 8px;
  border-radius: var(--radius-md);
  text-align: center;
}

.promo-banner-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.promo-banner--offer-style .promo-banner-title,
.promo-banner--highlight-style .promo-banner-title {
  color: #fff;
}

.promo-banner-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-banner-new-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f59e0b;
}

.promo-banner-old-price {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-decoration: line-through;
}

/* Hero Banner as small promo (200x350) */
.promo-banner--hero {
  height: 350px;
  display: flex;
  flex-direction: column;
}

.promo-banner--hero .promo-banner-link {
  height: 100%;
  flex-direction: column;
}

.promo-banner--hero .promo-banner-img {
  flex: 1;
  aspect-ratio: auto;
}

.promo-banner--hero .promo-banner-body {
  padding: var(--spacing-sm);
  flex-shrink: 0;
}

.promo-banner--hero .promo-banner-title {
  font-size: 0.75rem;
}

.promo-banner-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-orange);
}

.promo-banner-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0.7;
  margin: 0;
}

.promo-banner-cta {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-orange);
  margin-top: var(--spacing-xs);
}

/* Category style */
.promo-banner--category-style {
  background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--border-color);
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
}

.promo-banner-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--spacing-md);
  color: var(--primary-blue);
}

.promo-banner-icon svg {
  width: 100%;
  height: 100%;
}

.promo-banner--category-style .promo-banner-title {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.promo-banner--category-style .promo-banner-desc {
  color: var(--text-secondary);
}

/* Highlight style (right) */
.promo-banner--highlight-style {
  background: linear-gradient(160deg, #0c4a6e 0%, #075985 50%, #0369a1 100%);
  color: #fff;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.promo-banner--highlight-style .promo-banner-desc {
  color: rgba(255,255,255,0.6);
}

/* Custom admin banner style */
.promo-banner--custom-style {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  text-align: center;
  padding: 0;
  overflow: hidden;
}
.promo-banner--custom-style .promo-banner-img {
  width: 100%;
  max-height: 180px;
  overflow: hidden;
}
.promo-banner--custom-style .promo-banner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.promo-banner--custom-style .promo-banner-body {
  padding: var(--spacing-md);
}
.promo-banner--custom-style .promo-banner-title {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.promo-banner--custom-style .promo-banner-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Image-only banner style (side + full-width from admin) */
.promo-banner--image-only {
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}
.promo-banner--image-only:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.promo-banner--image-only img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Stack multiple banners in side columns */
.promo-banner--left,
.promo-banner--right {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Responsive: keep banners visible on smaller screens */
@media (max-width: 1024px) {
  .section-with-banner {
    grid-template-columns: 120px 1fr;
    gap: var(--spacing-md);
  }
  
  .showcase-section {
    width: 120px;
  }
  
  .promo-banner--left,
  .promo-banner--right {
    width: 120px;
  }
  .promo-banner {
    position: static;
  }
  .promo-banner--left,
  .promo-banner--right {
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: x mandatory;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
  }
  .promo-banner--left > *,
  .promo-banner--right > * {
    flex: 0 0 clamp(160px, 45vw, 220px);
    scroll-snap-align: start;
  }
  .promo-banner--image-only {
    max-width: none;
  }
  
  .top-category-block .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet: keep similar layout to desktop */
@media (max-width: 768px) {
  .section-with-banner {
    grid-template-columns: 130px 1fr;
    gap: var(--spacing-lg);
  }
  
  .showcase-section,
  .promo-banner--left,
  .promo-banner--right {
    width: 130px;
    position: sticky;
    top: calc(var(--header-height) + 0.5rem);
  }
  
  .promo-banner--left {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    align-items: stretch;
  }
  
  .promo-banner--right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: stretch;
  }
  
  .showcase-section--compact {
    height: 300px;
    min-height: 300px;
  }
  
  .top-category-block .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: mantener columnas como desktop */
@media (max-width: 480px) {
  .section-with-banner {
    grid-template-columns: 70px 1fr; /* 🔥 antes 100px */
    gap: var(--spacing-sm);
  }
  
  .showcase-section,
  .promo-banner--left,
  .promo-banner--right {
    width: 70px; /* 🔥 antes 100px */
    position: sticky;
    top: calc(var(--header-height) + 0.5rem);
  }
  
  .promo-banner--left {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    align-items: stretch;
  }
  
  .promo-banner--right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: stretch;
  }
  
  .showcase-section--compact {
  height: 200px;   /* 🔥 antes 280px */
  min-height: 200px;
  }
  
  .top-category-block .products-grid {
      grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
}

@media (max-width: 640px) {
  .promo-banner--left,
  .promo-banner--right {
    gap: var(--spacing-xs);
  }
  .promo-banner--left > *,
  .promo-banner--right > * {
    flex: 0 0 clamp(140px, 50vw, 200px);
  }
  .promo-photo-banner img {
    max-height: 180px;
  }
}

/* ============================================================
   FOOTER GRID
   ============================================================ */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--spacing-2xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--spacing-lg);
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-links-list a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-links-list a:hover {
  color: #fff;
}

.footer-tagline {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: var(--spacing-sm);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CMS PAGE
   ============================================================ */
.cms-page {
  padding-top: calc(var(--header-height) + var(--spacing-md));
  padding-bottom: var(--spacing-3xl);
  min-height: 70vh;
}

.cms-content {
  max-width: 800px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.cms-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--border-color);
}

.cms-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
}

.cms-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
}

.cms-content p {
  margin-bottom: var(--spacing-md);
}

.cms-content ul, .cms-content ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-xl);
}

.cms-content li {
  margin-bottom: var(--spacing-xs);
}

.cms-content a {
  color: var(--primary-blue);
  text-decoration: underline;
}

.cms-content strong {
  color: var(--text-primary);
}

.cms-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-lg) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.cms-content th,
.cms-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.cms-content th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.cms-content .info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.cms-content .info-card h4 {
  margin: 0 0 var(--spacing-sm);
  color: var(--text-primary);
  font-size: 1rem;
}

.cms-content .faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-md) 0;
}

.cms-content .faq-item:last-child {
  border-bottom: none;
}

.cms-content .faq-question {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
}

.cms-content .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.cms-content .contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
}

.cms-content .contact-card svg {
  width: 32px;
  height: 32px;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-sm);
}

@media (max-width: 768px) {
  .cms-page {
    padding-top: calc(var(--header-height) + var(--spacing-sm));
  }
  .cms-content h1 {
    font-size: 1.5rem;
  }
  .cms-content h2 {
    font-size: 1.2rem;
  }
  .cms-content h3 {
    font-size: 1.05rem;
  }
  .cms-content .contact-grid {
    grid-template-columns: 1fr;
  }
  .cms-content table {
    display: block;
    overflow-x: auto;
  }
  .cms-content iframe {
    height: 250px !important;
  }
}

.cms-loading {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  padding: var(--spacing-2xl) 0;
}

/* ============================================================
   ADMIN FORM - Textarea
   ============================================================ */
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 100px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

.form-select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ============================================================
   REGISTER PANEL
   ============================================================ */
.register-panel {
  padding: var(--spacing-lg);
}

/* ============================================================
   OFFER PRICE STYLES
   ============================================================ */
.product-price-original {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-decoration: line-through;
  font-weight: 500;
  margin-left: var(--spacing-sm);
}

.offer-price {
  color: var(--danger) !important;
}

/* ============================================================
   WHATSAPP FLOATING BUBBLE
   ============================================================ */
.whatsapp-bubble {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 1500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
}

.whatsapp-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-bubble svg {
  width: 32px;
  height: 32px;
}

/* ============================================================
   DARK MODE TOGGLE
   ============================================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
}

/* ============================================================
   DARK MODE THEME
   ============================================================ */
[data-theme="dark"] {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16162a;
  --bg-tertiary: #2a2a4a;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --border-color: #3f3f5a;
  --border-light: #2a2a4a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .site-header {
  background: rgba(26, 26, 46, 0.9);
  border-bottom-color: var(--border-light);
}

[data-theme="dark"] .site-footer {
  background: #0f0f1a;
}

[data-theme="dark"] .hero {
  background: linear-gradient(160deg, #050410 0%, #0e0c28 35%, #110a2a 65%, #080618 100%);
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(232, 119, 34, 0.03) 0%, transparent 50%);
}

[data-theme="dark"] .search-input {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .filter-chip {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

[data-theme="dark"] .filter-chip:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

[data-theme="dark"] .filter-chip.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

[data-theme="dark"] .brand-chip {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

[data-theme="dark"] .brand-chip:hover {
  background: rgba(232, 119, 34, 0.08);
}

[data-theme="dark"] .brand-dropdown-content {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

[data-theme="dark"] .brand-dd-item:hover {
  background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .brand-dd-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

[data-theme="dark"] .brand-dd-item.active::before {
  background: #a5b4fc;
}

[data-theme="dark"] .hero-carousel {
  background: var(--bg-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .hero-slide-cat {
  background: rgba(99, 102, 241, 0.15);
}



[data-theme="dark"] .product-card {
  border-color: var(--border-color);
}

[data-theme="dark"] .product-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

[data-theme="dark"] .btn-secondary {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .whatsapp-bubble {
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

/* ==================== MOBILE TOP SLOTS (above categories) ==================== */

/* Hidden on desktop — JS moves content here on mobile */
.mobile-top-slot {
  display: none;
}

@media (max-width: 768px) {
  .mobile-top-slot {
    display: block;
    margin-bottom: var(--spacing-xs);
  }

  /* --- Lo Más Vendido slot --- */
  #mostSoldMobileSlot .showcase-section,
  #mostSoldMobileSlot .showcase-section--compact {
    width: 100% !important;
    flex: none;
    margin-bottom: 0;
  }

    #mostSoldMobileSlot {
    margin-top: calc(-1 * var(--spacing-2xl, 48px));
    margin-bottom: calc(var(--spacing-2xl, 48px) + var(--spacing-lg, 24px)) !important;
    position: relative;
    z-index: 5;
  }

   #mostSoldMobileSlot .showcase-section--compact {
    position: relative;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    background:
      radial-gradient(120% 80% at 0% 0%, rgba(232,119,34,0.18) 0%, transparent 55%),
      radial-gradient(120% 80% at 100% 100%, rgba(26,75,140,0.22) 0%, transparent 55%),
      linear-gradient(160deg, rgba(26,75,140,0.10), rgba(232,119,34,0.08));
    border: 1px solid rgba(232,119,34,0.25);
    border-radius: 22px;
    box-shadow:
      0 10px 30px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.25);
    padding: var(--spacing-md) 0 var(--spacing-xs);
    margin-bottom: 0;
    overflow: visible;
  }

  /* Brillo decorativo arriba a la derecha */
  #mostSoldMobileSlot .showcase-section--compact::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle at top right, rgba(232,119,34,0.35) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(8px);
    z-index: 0;
  }

  [data-theme="dark"] #mostSoldMobileSlot .showcase-section--compact {
    background:
      radial-gradient(120% 80% at 0% 0%, rgba(232,119,34,0.22) 0%, transparent 55%),
      radial-gradient(120% 80% at 100% 100%, rgba(26,75,140,0.35) 0%, transparent 55%),
      linear-gradient(160deg, rgba(26,75,140,0.25), rgba(0,0,0,0.4));
    border: 1px solid rgba(232,119,34,0.35);
    box-shadow:
      0 10px 30px rgba(0,0,0,0.5),
      inset 0 1px 0 rgba(255,255,255,0.08);
  }

  #mostSoldMobileSlot .showcase-section--compact .showcase-header {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
    position: relative;
    z-index: 2;
  }
  #mostSoldMobileSlot .showcase-section--compact .showcase-title {
    font-size: 1rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--primary-orange), #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    gap: 8px !important;
  }
  #mostSoldMobileSlot .showcase-section--compact .showcase-title svg {
    width: 20px !important;
    height: 20px !important;
    color: var(--primary-orange);
    filter: drop-shadow(0 0 6px rgba(232,119,34,0.5));
    animation: pulseStar 1.8s ease-in-out infinite;
  }
  @keyframes pulseStar {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
  }

  #mostSoldMobileSlot .showcase-section--compact .hero-carousel {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--spacing-sm);
    contain: none;
  }
  #mostSoldMobileSlot .showcase-section--compact .hero-carousel::-webkit-scrollbar {
    display: none;
  }
  

   #mostSoldMobileSlot .showcase-section--compact .hero-carousel-track {
    display: flex !important;
    flex-direction: row !important;
    height: auto !important;
    align-items: stretch;
    gap: 4px;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    overflow: visible;
    width: max-content;
    animation: bannerAutoScroll 60s linear infinite;
    animation-play-state: running;
  }

  #mostSoldMobileSlot .showcase-section--compact .hero-carousel-track:hover,
  #mostSoldMobileSlot .showcase-section--compact .hero-carousel-track:active {
    animation-play-state: paused;
  }

    #mostSoldMobileSlot .showcase-section--compact .hero-slide {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    min-height: 320px;
    height: auto !important;
    max-height: none !important;
    padding: var(--spacing-sm) 10px var(--spacing-md);
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow: visible !important;
    contain: none !important;
    isolation: auto;
  }

  #mostSoldMobileSlot .showcase-section--compact .hero-slide > * {
    flex-shrink: 0;
  }

  #mostSoldMobileSlot .showcase-section--compact .hero-slide-image {
    width: 150px !important;
    height: 150px !important;
    background: rgba(255,255,255,0.85) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 8px !important;
    flex-shrink: 0;
  }
  
  [data-theme="dark"] #mostSoldMobileSlot .showcase-section--compact .hero-slide-image {
    background: rgba(255,255,255,0.06) !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  }
  #mostSoldMobileSlot .showcase-section--compact .hero-slide:hover .hero-slide-image {
    transform: translateY(-3px) scale(1.03);
  }
  #mostSoldMobileSlot .showcase-section--compact .hero-slide-name {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    margin: 4px 0 6px !important;
    min-height: 2.5em;
    color: var(--text-primary) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
    text-align: center;
    padding: 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  #mostSoldMobileSlot .showcase-section--compact .hero-slide-cat {
    font-size: 0.55rem !important;
    padding: 2px 8px !important;
    background: linear-gradient(135deg, var(--primary-blue), #2563eb) !important;
    color: #fff !important;
    border-radius: 999px !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
  }
  #mostSoldMobileSlot .showcase-section--compact .hero-slide-price,
  #mostSoldMobileSlot .showcase-section--compact .hero-slide-price--offer {
    font-size: 1rem !important;
    margin-top: 4px !important;
    line-height: 1.2;
    color: var(--primary-orange) !important;
    text-shadow: none !important;
    font-weight: 900 !important;
  }
  #mostSoldMobileSlot .showcase-section--compact .hero-slide-price--original {
    font-size: 0.7rem !important;
    color: var(--text-tertiary) !important;
    text-decoration: line-through;
    margin-top: 2px;
  }
  #mostSoldMobileSlot .showcase-section--compact .hero-slide-discount-badge {
    top: 6px !important;
    right: 6px !important;
    font-size: 0.62rem !important;
    padding: 3px 7px !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 10px rgba(213,0,0,0.5), 0 0 0 2px rgba(255,255,255,0.35) !important;
  }

  #mostSoldMobileSlot .showcase-nav {
    display: none !important;
  }

  /* --- Left admin banners slot — horizontal auto-scroll carousel --- */
  .mobile-top-slot--banners {
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 0;
    animation: bannerAutoScroll 22s linear infinite;
    animation-play-state: running;
  }

  .mobile-top-slot--banners:hover {
    animation-play-state: paused;
  }

  .mobile-top-slot--banners #promoBannerLeftAdminStack,
  .mobile-top-slot--banners #promoBannerLeftAdminStackClone {
    display: flex !important;
    flex-direction: row !important;
    gap: var(--spacing-sm);
    flex-shrink: 0;
    padding-right: var(--spacing-sm);
  }

  .mobile-top-slot--banners .promo-banner-link,
  .mobile-top-slot--banners .promo-side-placeholder > *,
  .mobile-top-slot--banners .promo-banner-link img {
    flex: 0 0 auto;
    width: 44vw;
    max-width: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: auto;
    aspect-ratio: 3/5;
    object-fit: cover;
  }

  /* Hide the left banner aside on mobile — content moved to slots above */
  #promoBannerLeft {
    display: none !important;
  }

 /* Productos a ancho completo en móvil */
  .section-with-banner {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  /* Products take full width on mobile */
  .section-with-banner {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  /* Hide banner slot if empty */
  .mobile-top-slot--banners:empty {
    display: none;
  }

  /* Also hide if only contains empty stack */
  #leftBannersMobileSlot #promoBannerLeftAdminStack:empty {
    display: none !important;
  }
}

/* ==================== TRUST BANNER ==================== */
.trust-banner {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  padding: 1rem 0;
  margin: var(--spacing-3xl) 0 0 0;
}

.trust-banner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.trust-banner-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  justify-content: center;
}

.trust-banner-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  opacity: 0.9;
}

.trust-banner-icon svg {
  width: 100%;
  height: 100%;
}

.trust-banner-text {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}

.trust-banner-text span {
  display: block;
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 400;
}

@media (max-width: 900px) {
  .trust-banner-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .trust-banner-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .trust-banner-item {
    gap: 0.5rem;
  }
  .trust-banner-icon {
    width: 28px;
    height: 28px;
  }
  .trust-banner-text {
    font-size: 0.75rem;
  }
  .trust-banner-text span {
    font-size: 0.65rem;
  }
}

/* ==================== WISHLIST SIDEBAR ==================== */
.wishlist-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(4px);
}

.wishlist-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wishlist-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-primary);
  box-shadow: none;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s;
}

.wishlist-sidebar.active {
  transform: translateX(0);
  box-shadow: var(--shadow-xl);
}

.wishlist-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

.wishlist-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  margin-bottom: var(--spacing-sm);
  transition: background 0.2s;
}

.wishlist-item:hover {
  background: var(--bg-tertiary);
}

.wishlist-item-link {
  display: flex;
  gap: var(--spacing-md);
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.wishlist-item-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.wishlist-item-info {
  flex: 1;
  min-width: 0;
}

.wishlist-item-info strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.wishlist-item-info .wishlist-item-price {
  font-size: 0.85rem;
  color: var(--primary-blue);
  font-weight: 600;
}

.wishlist-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.wishlist-item-cart,
.wishlist-item-remove {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.wishlist-item-cart {
  background: var(--primary-blue);
  color: #fff;
}

.wishlist-item-cart:hover {
  background: var(--primary-blue-dark);
}

.wishlist-item-remove {
  background: transparent;
  color: var(--text-tertiary);
}

.wishlist-item-remove:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger);
}

.wishlist-item-cart svg,
.wishlist-item-remove svg {
  width: 16px;
  height: 16px;
}

/* ==================== WISHLIST CARD BUTTON ==================== */
.btn-wishlist-card {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-wishlist-card svg {
  width: 18px;
  height: 18px;
  transition: fill 0.2s, stroke 0.2s;
}

.btn-wishlist-card:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-wishlist-card.active {
  color: #ff3b5c;
}

.btn-wishlist-card.active svg {
  fill: #ff3b5c;
  stroke: #ff3b5c;
}

/* ============================================================
   ADMIN RESPONSIVE
   ============================================================ */

/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .social-links-form {
    grid-template-columns: 1fr;
  }

  .pv-row,
  .pv-row-reverse {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mobile (≤768px) ---------- */
@media (max-width: 768px) {
  /* Header: stack vertically */
  .admin-header {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .admin-header .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .admin-header .header-actions .btn span,
  .admin-header .header-actions .btn:not(.theme-toggle):not(#btnAdminLogout) {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .admin-title {
    font-size: 0.95rem;
  }

  .admin-badge {
    font-size: 0.55rem;
    padding: 2px 7px;
  }

  /* Tabs: wrap on mobile, smaller */
  .admin-tabs {
    gap: 3px;
    padding: 4px;
    margin-bottom: var(--spacing-md);
  }

  .admin-tab {
    padding: 8px 10px;
    font-size: 0.72rem;
    gap: 4px;
  }

  .admin-tab span {
    display: none;
  }

  .admin-tab svg {
    width: 18px;
    height: 18px;
  }

  /* Main content area */
  .admin-main {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  /* Panels */
  .admin-panel-header {
    padding: var(--spacing-md);
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }

  .admin-panel-header h3 {
    font-size: 0.95rem;
  }

  .admin-panel-body {
    padding: var(--spacing-md);
  }

  /* Tables — hide less important columns */
  .products-table th:nth-child(3),
  .products-table td:nth-child(3),
  .products-table th:nth-child(4),
  .products-table td:nth-child(4) {
    display: none;
  }

  .products-table th,
  .products-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.78rem;
  }

  /* Admin table responsive */
  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .table-product-thumb {
    width: 36px;
    height: 36px;
  }

  /* Stat cards */
  .stat-card {
    padding: var(--spacing-md);
  }

  .stat-card-icon {
    width: 40px;
    height: 40px;
  }

  .stat-card-value {
    font-size: 1.35rem;
  }

  /* Login card */
  .admin-login-card {
    padding: var(--spacing-lg);
    margin: 0 var(--spacing-md);
  }

  /* Modals */
  .product-form-overlay {
    padding: var(--spacing-sm);
    align-items: flex-end;
  }

  .product-form-modal {
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
  }

  .product-form-modal form div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* CSV zone */
  .csv-upload-zone {
    padding: var(--spacing-lg);
  }

  /* Visual preview */
  .page-preview {
    font-size: 0.7rem;
  }

  .pv-section {
    font-size: 0.7rem;
    padding: 8px 10px;
    min-height: 32px;
  }

  .pv-hero {
    min-height: 52px;
  }

  .pv-sidebar-banner {
    min-height: 50px;
    flex-direction: row;
    justify-content: space-between;
  }

  .pv-slot-inner { gap: 6px; }
  .pv-slot-icon { width: 24px; height: 24px; }

  .pv-edit-btn {
    opacity: 1;
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .pv-legend { gap: 5px; }
  .pv-legend-item { font-size: 0.65rem; padding: 3px 8px; }

  /* Buttons */
  .btn {
    font-size: 0.8rem;
    padding: var(--spacing-xs) var(--spacing-md);
  }

  .btn svg {
    width: 15px;
    height: 15px;
  }
}

/* ---------- Small phones (≤480px) ---------- */
@media (max-width: 480px) {
  .admin-header-left {
    gap: var(--spacing-sm);
  }

  .admin-header .header-actions {
    gap: 4px;
  }

  .admin-header .header-actions .btn {
    font-size: 0;
    padding: 8px;
    gap: 0;
  }

  .admin-header .header-actions .btn svg {
    width: 18px;
    height: 18px;
  }

  .admin-header .header-actions .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
  }

  .stat-card {
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
  }

  .stat-card-icon {
    width: 32px;
    height: 32px;
  }

  .stat-card-icon svg {
    width: 18px;
    height: 18px;
  }

  .stat-card-value {
    font-size: 1.1rem;
  }

  .stat-card-label {
    font-size: 0.7rem;
  }

  /* Products table: only show name + actions */
  .products-table th:nth-child(2),
  .products-table td:nth-child(2),
  .products-table th:nth-child(5),
  .products-table td:nth-child(5) {
    display: none;
  }

  .table-product-info {
    max-width: 140px;
  }

  .table-product-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
  }

  /* Modal — full screen */
  .product-form-overlay {
    padding: 0;
  }

  .product-form-modal {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
  }

  .modal-header {
    padding: var(--spacing-md);
  }

  .modal-header h2 {
    font-size: 1rem;
  }

  .modal-body {
    padding: var(--spacing-md);
  }

  /* Admin tabs — icon-only */
  .admin-tab {
    padding: 8px;
  }

  .admin-tab svg {
    width: 20px;
    height: 20px;
  }
}

/* ==================== WISHLIST DETAIL BUTTON ==================== */
.btn-wishlist-detail {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.btn-wishlist-detail svg {
  width: 22px;
  height: 22px;
  transition: fill 0.2s, stroke 0.2s;
}

.btn-wishlist-detail:hover {
  border-color: #ff3b5c;
  color: #ff3b5c;
  background: rgba(255, 59, 92, 0.05);
}

.btn-wishlist-detail.active {
  background: rgba(255, 59, 92, 0.1);
  border-color: #ff3b5c;
  color: #ff3b5c;
}

.btn-wishlist-detail.active svg {
  fill: #ff3b5c;
  stroke: #ff3b5c;
}

/* ==================== WISHLIST BADGE ==================== */
.wishlist-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff3b5c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wishlist-badge:empty {
  display: none;
}

/* ==================== SOCIAL FOOTER ==================== */
.footer-social {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-social h4 {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

.footer-social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s;
  border: 1px solid rgba(255,255,255,0.15);
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer-social-link:hover {
  background: var(--primary-blue);
  color: #fff;
  border-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==================== PROMO PHOTO BANNERS ==================== */
.promo-photo-slot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.promo-photo-banner {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
}

.promo-photo-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.promo-photo-banner a {
  display: block;
  line-height: 0;
}

.promo-photo-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .promo-photo-banner img {
    max-height: 220px;
  }
}

/* ==================== DARK THEME OVERRIDES ==================== */
[data-theme="dark"] .trust-banner {
  background: linear-gradient(135deg, #0f2137 0%, #162d50 100%);
  border-top: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .trust-banner-item {
  color: #fff;
}

[data-theme="dark"] .btn-wishlist-card {
  background: rgba(30, 30, 30, 0.9);
  color: var(--text-secondary);
}

[data-theme="dark"] .btn-wishlist-card.active {
  color: #ff3b5c;
}

[data-theme="dark"] .wishlist-item {
  background: var(--bg-secondary);
}

[data-theme="dark"] .wishlist-item:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .footer-social-link {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
}

[data-theme="dark"] .footer-social-link:hover {
  background: var(--primary-blue);
  color: #fff;
  border-color: var(--primary-blue);
}

[data-theme="dark"] .promo-photo-banner {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ==================== IMAGE ZOOM OVERLAY ==================== */
.image-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.image-zoom-overlay.active { opacity: 1; }

.image-zoom-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10001;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.image-zoom-close:hover { background: rgba(255,255,255,0.3); }

.image-zoom-container {
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-zoom-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}

/* ==================== PQR FORM (PUBLIC) ==================== */
.pqr-section {
  max-width: 640px;
  margin: var(--spacing-xl) auto;
  padding: var(--spacing-lg);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.pqr-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}
.pqr-field { margin-bottom: var(--spacing-md); }
.pqr-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.pqr-field select,
.pqr-field input,
.pqr-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.pqr-field select:focus,
.pqr-field input:focus,
.pqr-field textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
}
.pqr-field textarea { min-height: 120px; resize: vertical; }

.pqr-history { margin-top: var(--spacing-xl); }
.pqr-history h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: var(--spacing-md); }
.pqr-card {
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  border-left: 3px solid var(--primary-blue);
}
.pqr-card.answered { border-left-color: var(--success); }
.pqr-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.pqr-card-header strong { font-size: 0.9rem; }
.pqr-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
}
.pqr-status-badge.open { background: var(--bg-secondary); color: var(--text-secondary); }
.pqr-status-badge.answered { background: rgba(52,199,89,0.15); color: var(--success); }
.pqr-reply-box {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(52,199,89,0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--success);
  font-size: 0.85rem;
}

/* ==================== ADMIN TABLE BUTTONS ==================== */
.table-btn.delete { color: var(--danger); }
.table-btn.delete:hover { background: rgba(255,59,48,0.1); }

/* ==================== IMPROVED MOBILE SEARCH ==================== */
@media (max-width: 768px) {
  .search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    padding: 8px 12px;
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
  }
  .search-wrapper.mobile-active {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }
  .search-wrapper.mobile-active .search-input {
    flex: 1;
    font-size: 16px;
    padding: 10px 12px 10px 36px;
    border-radius: var(--radius-md);
  }
  .header-actions .btn-mobile-search {
    display: flex;
  }
  .search-dropdown {
    top: 100%;
    left: 0;
    right: 0;
    max-height: 60vh;
  }
}

@media (min-width: 769px) {
  .btn-mobile-search { display: none !important; }
}

.btn-mobile-search {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
}

/* === Profile & Order Form Grid === */
.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
}

.profile-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.profile-form-grid label.full-width {
  grid-column: 1 / -1;
}

.profile-form-grid input,
.profile-form-grid select,
.profile-form-grid textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.profile-form-grid input:focus,
.profile-form-grid select:focus,
.profile-form-grid textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.profile-form-grid textarea {
  resize: vertical;
  min-height: 60px;
}

.profile-form-actions {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  display: flex;
  justify-content: flex-end;
}

.profile-form-actions .btn-save-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.profile-form-actions .btn-save-profile:hover {
  background: var(--primary-blue-dark);
}

/* --- Order Form Modal --- */
.order-form-auth-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) var(--spacing-lg) 0;
  text-align: center;
}

.order-form-auth-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.order-form-auth-banner .btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin: 0 4px;
}

.order-form-auth-banner .btn-sm.btn-primary-outline {
  background: transparent;
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
}

.order-form-auth-banner .btn-sm.btn-primary-outline:hover {
  background: var(--primary-blue);
  color: #fff;
}

.order-form-auth-banner .btn-sm.btn-primary-fill {
  background: var(--primary-blue);
  color: #fff;
}

.order-form-auth-banner .btn-sm.btn-primary-fill:hover {
  background: var(--primary-blue-dark);
}

.order-save-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--spacing-lg);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.order-save-label input[type="checkbox"] {
  accent-color: var(--primary-blue);
  width: 16px;
  height: 16px;
}

#orderSummary {
  margin: var(--spacing-md) var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.order-form-submit {
  margin: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
  display: flex;
  justify-content: center;
}

.order-form-submit .btn-whatsapp-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  width: 100%;
  justify-content: center;
}

.order-form-submit .btn-whatsapp-submit:hover {
  background: #1ebe5a;
}

.order-form-submit .btn-whatsapp-submit svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
}

/* === FIX: banners laterales anclados arriba en desktop === */
@media (min-width: 769px) {
  .promo-banner--left,
  .promo-banner--right {
    position: static !important;
    align-self: flex-start !important;
    margin-top: 0 !important;
    margin-bottom: auto !important;
    top: auto !important;
  }
  /* Forzar al contenedor padre a no estirarlos */
  .hero-section,
  .main-hero,
  .hero-with-banners,
  .home-hero-row,
  .hero-row {
    align-items: flex-start !important;
  }
}

/* === FIX: separar "Lo más vendido" del banner izquierdo === */
@media (min-width: 769px) {
  .most-sold-section,
  .most-sold,
  #mostSoldDesktopSlot,
  .showcase-section:not(.showcase-section--compact) {
    clear: both;
    margin-top: var(--spacing-2xl, 48px) !important;
    position: relative;
    z-index: 2;
  }
  .most-sold-section .section-title,
  .most-sold .section-title,
  #mostSoldDesktopSlot .showcase-header {
    padding-top: var(--spacing-md);
    padding-left: var(--spacing-lg);
    background: var(--bg-primary);
    position: relative;
    z-index: 3;
  }

  /* ====== Título "LO MAS VENDIDO" despegado del banner ====== */
  .promo-banner--left .showcase-section--compact {
    overflow: visible !important;
    margin-top: calc(-1 * var(--spacing-2xl, 48px));
    padding-top: 0 !important;
  }

  .promo-banner--left .showcase-section--compact .showcase-header {
    margin: 0 auto var(--spacing-md) !important;
    padding: 10px 16px !important;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    display: inline-flex !important;
    align-self: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
    position: relative;
    z-index: 10;
    transform: translateY(-45px);
  }

  [data-theme="dark"] .promo-banner--left .showcase-section--compact .showcase-header {
    background: var(--bg-secondary);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  }
}

/* ==================== PRODUCT DETAIL - MOBILE REDESIGN ==================== */
@media (max-width: 768px) {
  .product-detail {
    padding-bottom: var(--spacing-xl);
  }

  .pd-layout {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-lg) !important;
    padding: 0 var(--spacing-sm);
  }

  /* Galería full-width con borde sutil y esquinas suaves */
  .pd-gallery {
    position: static !important;
    margin: 0 !important;
  }

  .pd-main-image {
    border-radius: 0 !important;
    aspect-ratio: 4/3 !important;
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
    position: relative;
  }

  .pd-main-image img {
    padding: var(--spacing-md) !important;
  }

  /* Thumbnails centradas con scroll suave */
  .pd-thumbnails {
    justify-content: flex-start !important;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    gap: 8px !important;
    scrollbar-width: none;
  }
  .pd-thumbnails::-webkit-scrollbar { display: none; }

  .pd-thumb {
    width: 56px !important;
    height: 56px !important;
    border-radius: 10px !important;
    border-width: 2px !important;
  }

  /* Info: padding lateral cómodo */
  .pd-info {
    padding: 0 var(--spacing-sm);
    gap: 10px !important;
  }

  .product-category,
  .pd-brand {
    font-size: 0.7rem !important;
    letter-spacing: 0.08em;
  }

  .pd-name {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
    margin: 2px 0 !important;
  }

  /* Precio MÁS llamativo */
  .pd-price {
    font-size: 1.75rem !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, var(--primary-orange), #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 4px 0;
  }

  .pd-stock {
    font-size: 0.85rem !important;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 999px;
    align-self: flex-start;
  }

  /* Especificaciones y descripción con card style */
  .pd-specs,
  .pd-description {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) !important;
    margin-top: var(--spacing-sm);
  }

  .pd-section-title {
    font-size: 0.95rem !important;
    font-weight: 800;
    margin-bottom: 10px !important;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .pd-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--primary-orange), var(--primary-blue));
    border-radius: 2px;
  }

  .pd-specs-table td {
    padding: 8px 6px !important;
    font-size: 0.85rem;
  }

  .pd-description p {
    font-size: 0.9rem !important;
    line-height: 1.65 !important;
  }
  }

  html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 768px) {
  .product-detail,
  .pd-layout,
  .pd-info,
  .recommended-section,
  main,
  section {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

@media (max-width: 768px) {
  .cart-sidebar {
    width: 100vw !important;
    max-width: 100vw !important;
    right: 0 !important;
    box-sizing: border-box;
  }
  .cart-sidebar.active {
    transform: translateX(0) !important;
  }
}

/* ==================== CATEGORY BUBBLES — NAV ABAJO Y CENTRADA ==================== */
.category-bubbles-section {
  display: flex;
  flex-direction: column;
}

.category-bubbles-header {
  order: 2;              /* header (con dots/arrows) se mueve al final */
  justify-content: center !important;
  margin-top: var(--spacing-md);
  margin-bottom: 0 !important;
}

.category-bubbles-viewport {
  order: 1;              /* las burbujas van primero */
}

.category-bubbles-dots {
  justify-content: center !important;
  width: 100%;
}

/* Flechas (si las genera JS con clase .category-bubbles-arrow o .carousel-arrow) */
.category-bubbles-arrow,
.category-bubbles-prev,
.category-bubbles-next,
.category-bubbles-header .arrow,
.category-bubbles-header button {
  position: static !important;
  transform: none !important;
}

@media (max-width: 768px) {
  .category-bubbles-header {
    gap: 12px !important;
  }
}

@media (max-width: 768px) {
  .category-bubbles-section,
  #categoryBubblesSection {
    margin-top: var(--spacing-2xl, 48px) !important;
    padding-top: var(--spacing-md) !important;
    clear: both;
    position: relative;
  }
}