:root {
  /* Paleta Base - Modo Claro */
  --color-primary-h: 220;
  --color-primary-s: 40%;
  --color-primary-l: 18%;
  --color-primary: hsl(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l));
  --color-primary-light: hsl(var(--color-primary-h), var(--color-primary-s), 45%);
  
  --color-accent-h: 160;
  --color-accent-s: 70%;
  --color-accent-l: 37%;
  --color-accent: hsl(var(--color-accent-h), var(--color-accent-s), var(--color-accent-l));
  --color-accent-glow: hsla(var(--color-accent-h), var(--color-accent-s), var(--color-accent-l), 0.2);

  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  
  --color-bg: #f8fafc;
  --color-surface-rgb: 255, 255, 255;
  --color-surface: #ffffff;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-border: rgba(15, 23, 42, 0.08);
  
  --radius-card: 20px;
  --radius-btn: 14px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-float: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
  
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] {
  /* Paleta Base - Modo Oscuro */
  --color-primary-h: 224;
  --color-primary-s: 64%;
  --color-primary-l: 58%;
  --color-primary: hsl(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l));
  --color-primary-light: hsl(var(--color-primary-h), var(--color-primary-s), 70%);
  
  --color-bg: #090d16;
  --color-surface-rgb: 15, 23, 42;
  --color-surface: #0f172a;
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-border: rgba(248, 250, 252, 0.08);
  --shadow-card: 0 15px 35px -10px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(255, 255, 255, 0.02);
  --shadow-float: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Reset y Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  color-scheme: light dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
  transition: background-color var(--transition-smooth);
}

/* Aplicar accent-color global para coherencia de marca nativa */
body, input, textarea, select {
  accent-color: var(--color-accent);
}

/* Esferas de Brillo de Fondo (Glow Spheres) */
.glow-sphere {
  position: fixed;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(100px);
  opacity: 0.15;
  mix-blend-mode: screen;
  transition: all var(--transition-smooth);
}

.sphere-1 {
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  animation: pulseSphere 12s infinite alternate;
}

.sphere-2 {
  bottom: -100px;
  left: -100px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  animation: pulseSphere 15s infinite alternate-reverse;
}

@keyframes pulseSphere {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.12;
  }
  100% {
    transform: scale(1.3) translate(30px, 20px);
    opacity: 0.22;
  }
}

/* Theme Toggle */
.theme-toggle-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: #fff;
  transition: all var(--transition-smooth);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.05);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Contenedor Principal (SPA) */
#app {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Vistas SPA - compatible con todos los navegadores */
.view {
  display: none;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.view.active {
  display: flex;
  flex-direction: column;
}

/* Banner de Noscript */
.noscript-banner {
  background: linear-gradient(135deg, var(--color-warning), #d97706);
  color: #fff;
  text-align: center;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Header Premium */
.app-header {
  background: linear-gradient(135deg, hsl(var(--color-primary-h), var(--color-primary-s), 14%) 0%, hsl(var(--color-primary-h), var(--color-primary-s), 8%) 100%);
  color: #fff;
  padding: 24px 16px 20px;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-header::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.header-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  position: relative;
  z-index: 10;
  width: 100%;
}

.store-badge-container {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-accent) 0%, hsl(var(--color-accent-h), var(--color-accent-s), 28%) 100%);
  color: #fff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px var(--color-accent-glow);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.orders-history-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.2s;
}

.orders-history-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.orders-btn-icon {
  font-size: 12px;
}

.app-header .theme-toggle-btn {
  position: static !important;
  width: 34px !important;
  height: 34px !important;
  font-size: 14px !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.store-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  word-break: break-word;
}

.store-desc {
  font-size: 12px;
  color: #cbd5e1;
  opacity: 0.9;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

.store-desc.phone {
  font-weight: 600;
  color: #93c5fd;
}

/* Buscador Flotante */
.search-bar-container {
  padding: 16px 20px;
  background-color: transparent;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  padding: 10px 16px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-accent-glow), var(--shadow-card);
  transform: translateY(-1px);
}

.search-icon {
  font-size: 16px;
  margin-right: 10px;
  opacity: 0.7;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--color-text-primary);
  background: transparent;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

.clear-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0 4px;
  display: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.clear-btn:hover {
  opacity: 1;
}

/* Pestañas de Categorías */
.categories-tabs-container {
  padding: 4px 20px 16px;
  overflow-x: auto;
  white-space: nowrap;
  /* Ocultar scrollbar de forma estandarizada */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.categories-tabs-container::-webkit-scrollbar {
  display: none;
}

.tabs-list {
  display: inline-flex;
  gap: 10px;
}

.tab-item {
  background-color: var(--color-surface);
  color: var(--color-text-secondary);
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--color-border);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.tab-item:hover {
  border-color: var(--color-primary-light);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.tab-item.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px -3px hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3);
}

/* Grid del Catálogo */
.catalog-main {
  flex: 1;
  padding: 0 14px 120px;
}

.catalog-grid,
.catalog-grid.grid-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 320px) {
  .catalog-grid,
  .catalog-grid.grid-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (min-width: 600px) and (max-width: 991px) {
  .catalog-grid,
  .catalog-grid.grid-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Tarjetas de Producto - Glassmorphic */
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all var(--transition-smooth);
  position: relative;
  min-width: 0;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 26px -10px rgba(0, 0, 0, 0.15), var(--shadow-card);
  border-color: rgba(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.15);
}

.card-img-wrapper {
  width: 100%;
  aspect-ratio: 1;
  max-height: 150px;
  background-color: rgba(0, 0, 0, 0.02);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

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

.card-placeholder-img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.badge-prescription {
  background: linear-gradient(135deg, var(--color-warning) 0%, #d97706 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}

.badge-low-stock {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
}

.card-info {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
  line-height: 1.38;
  text-wrap: pretty;
}

.product-desc-tag {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  position: relative;
  z-index: 2;
}

.product-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
}

/* Botón Agregar */
.add-btn {
  background: linear-gradient(135deg, var(--color-accent) 0%, hsl(var(--color-accent-h), var(--color-accent-s), 28%) 100%);
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 8px var(--color-accent-glow);
  transition: all var(--transition-smooth);
  position: relative;
  z-index: 3;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  min-height: 34px;
  min-width: 58px;
  justify-content: center;
  white-space: nowrap;
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px var(--color-accent-glow);
}

.add-btn:active {
  transform: scale(0.95) translateY(1px);
  box-shadow: 0 2px 6px var(--color-accent-glow);
}

.add-btn:disabled, .add-btn.out {
  background: var(--color-border);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-surface) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
}

.skeleton-card {
  height: 270px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
}

/* Botón Flotante del Carrito */
.floating-cart-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: linear-gradient(135deg, var(--color-accent) 0%, hsl(var(--color-accent-h), var(--color-accent-s), 28%) 100%);
  color: #fff;
  border: none;
  padding: 16px 24px;
  border-radius: 9999px;
  box-shadow: 0 10px 30px -5px hsla(var(--color-accent-h), var(--color-accent-s), var(--color-accent-l), 0.4);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  z-index: 200;
  transition: all var(--transition-bounce);
}

.floating-cart-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 15px 35px -5px hsla(var(--color-accent-h), var(--color-accent-s), var(--color-accent-l), 0.5);
}

.floating-cart-btn:active {
  transform: translateX(-50%) scale(0.96);
}

.floating-cart-btn.hidden {
  bottom: -100px;
  opacity: 0;
  pointer-events: none;
}

.cart-btn-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-badge {
  background-color: #fff;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  min-width: 24px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cart-label {
  flex: 1;
  text-align: left;
  margin-left: 12px;
}

.cart-total {
  font-size: 17px;
  font-weight: 800;
}

/* Bottom Sheet del Carrito - Con soporte de @starting-style de Modern Web Guidance */
.bottom-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.bottom-sheet-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 580px;
  background-color: var(--color-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: var(--shadow-float);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  z-index: 600;
  border-top: 1px solid var(--color-border);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet-overlay.open .bottom-sheet {
  transform: translateX(-50%) translateY(0);
}

.sheet-header {
  padding: 16px 24px 8px;
  border-bottom: 1px solid var(--color-border);
}

.drag-handle {
  width: 48px;
  height: 5px;
  background-color: var(--color-text-secondary);
  opacity: 0.25;
  border-radius: 9999px;
  margin: 0 auto 16px;
}

.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-title-row h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.close-sheet-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.close-sheet-btn:hover {
  opacity: 1;
}

.sheet-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cart-items-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Ítems del Carrito */
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-item-img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.02);
  object-fit: cover;
}

.cart-item-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

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

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary-light);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 4px 6px;
  background-color: rgba(0, 0, 0, 0.02);
}

.qty-btn {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary-light);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.qty-btn:hover {
  background-color: rgba(0,0,0,0.05);
}

.qty-text {
  font-size: 14px;
  font-weight: 700;
  width: 22px;
  text-align: center;
}

.qty-input {
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  width: 44px;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-primary);
  padding: 2px 2px;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: var(--color-border);
}

.qty-input:focus {
  outline: none;
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.2);
}

.delete-item-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--color-danger);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.2s;
}

.delete-item-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.sheet-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--color-border);
  background-color: rgba(0, 0, 0, 0.01);
}

.sheet-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.sheet-total-row .total-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-accent);
}

.sheet-checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px -3px hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3);
  transition: all var(--transition-smooth);
}

.sheet-checkout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -3px hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.4);
}

.sheet-checkout-btn:active {
  transform: translateY(1px);
}

/* View Checkout */
.checkout-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background-color: var(--color-surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.checkout-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.back-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: rgba(0,0,0,0.03);
}

.checkout-main {
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-summary-box {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.order-summary-box h3 {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.summary-item-row .qty-name {
  color: var(--color-text-primary);
  font-weight: 500;
}

.summary-item-row .price {
  font-weight: 700;
}

.summary-divider {
  height: 1px;
  background-color: var(--color-border);
  margin: 14px 0;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.summary-total-row span:first-child {
  font-size: 15px;
}

.summary-total-row .total-price {
  font-size: 20px;
  color: var(--color-accent);
}

/* Formulario */
.checkout-form {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.form-group input, .form-group textarea {
  background-color: rgba(0, 0, 0, 0.02);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: all var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--color-primary);
  background-color: var(--color-surface);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

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

.error-msg {
  font-size: 12px;
  color: var(--color-danger);
  font-weight: 500;
  margin-top: 2px;
}

/* Botones de Selección de Método de Pago */
.radio-group {
  display: flex;
  gap: 12px;
}

.radio-label {
  flex: 1;
  cursor: pointer;
}

.radio-label input {
  display: none;
}

.radio-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-align: center;
  gap: 8px;
  background-color: rgba(0, 0, 0, 0.01);
  transition: all var(--transition-smooth);
}

.radio-tile:hover {
  border-color: var(--color-primary-light);
  background-color: rgba(0, 0, 0, 0.02);
}

.radio-tile .radio-icon {
  font-size: 24px;
}

.radio-tile .radio-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.radio-label input:checked + .radio-tile {
  border-color: var(--color-accent);
  background-color: var(--color-accent-glow);
  box-shadow: 0 4px 12px rgba(var(--color-accent-h), var(--color-accent-s), var(--color-accent-l), 0.1);
}

.radio-label input:checked + .radio-tile .radio-text {
  color: var(--color-text-primary);
}

.pharmacy-alert-note {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--color-warning);
  color: #d97706;
  padding: 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.error-banner {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  padding: 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 600;
}

/* Botón Enviar Pedido */
.submit-order-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-accent) 0%, hsl(var(--color-accent-h), var(--color-accent-s), 28%) 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px var(--color-accent-glow);
  transition: all var(--transition-smooth);
}

.submit-order-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px var(--color-accent-glow);
}

.submit-order-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* View Success */
#view-success {
  background-color: var(--color-bg);
}

.success-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  height: 100vh;
}

.success-icon-container {
  margin-bottom: 30px;
}

/* Checkmark animado */
.checkmark {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--color-accent);
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px var(--color-accent);
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--color-accent);
  fill: none;
  animation: stroke .6s cubic-bezier(0.650, 0.000, 0.450, 1.000) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke .3s cubic-bezier(0.650, 0.000, 0.450, 1.000) .8s forwards;
}

@keyframes scale {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.1, 1.1, 1); }
}

#success-order-id {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.success-sub {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  max-width: 300px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 320px;
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128c7e 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25);
  transition: all var(--transition-smooth);
}

.whatsapp-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

.reset-btn {
  background-color: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  padding: 14px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn:hover {
  border-color: var(--color-primary-light);
  color: var(--color-text-primary);
  background-color: rgba(0, 0, 0, 0.02);
}

/* Animaciones y utilidades globales */
.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .view, .bottom-sheet, .bottom-sheet-overlay, .theme-toggle-btn, .product-card, .add-btn, .floating-cart-btn, .submit-order-btn, .whatsapp-btn {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   DISEÑO ADICIONAL — REDISEÑO SÓLIDO PREMIUM
   ═══════════════════════════════════════════════════════ */

/* Vista de Lista Compacta */
.catalog-grid.list-layout {
  grid-template-columns: 1fr;
  gap: 12px;
}

.catalog-grid.list-layout .product-card {
  flex-direction: row;
  align-items: center;
  padding: 12px;
  height: auto;
}

.catalog-grid.list-layout .product-card .card-img-wrapper {
  width: 90px;
  height: 90px;
  aspect-ratio: 1;
  border-radius: 14px;
  flex-shrink: 0;
}

.catalog-grid.list-layout .product-card .card-info {
  padding: 0 14px;
  justify-content: center;
  flex: 1;
}

.catalog-grid.list-layout .product-card .product-name {
  height: auto;
  margin-bottom: 4px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-height: 1.3;
}

.catalog-grid.list-layout .product-card .product-desc-tag {
  margin-bottom: 6px;
}

.catalog-grid.list-layout .product-card .card-footer {
  margin-top: 0;
  width: 100%;
}

.catalog-grid.list-layout .product-card::before {
  display: none; /* Quita degradados internos en lista */
}

/* Barra de Búsqueda con Acciones Flotantes */
.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.search-tools-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.filter-toggle-btn, .view-layout-btn {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  height: 42px;
  padding: 0 12px;
  white-space: nowrap;
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.filter-toggle-btn:hover, .view-layout-btn:hover {
  border-color: var(--color-primary-light);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.filter-toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 480px) {
  .search-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .search-box {
    width: 100%;
    flex: 100%;
  }
  .search-tools-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .filter-toggle-btn, .view-layout-btn {
    width: 100%;
    justify-content: center;
    height: 38px;
    font-size: 12px;
  }
}

/* Panel de Filtros Rápidos (Tallas y Precios) */
.filter-panel {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-top: 10px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
}

.filter-panel.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  opacity: 0;
  border-color: transparent;
  pointer-events: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.size-filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-btn {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover {
  border-color: var(--color-primary-light);
  color: var(--color-text-primary);
}

.size-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
}

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-range-inputs input {
  width: 90px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border 0.2s;
}

.price-range-inputs input:focus {
  border-color: var(--color-primary);
}

.range-divider {
  color: var(--color-text-secondary);
}

.clear-filters-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* Modales Base (Overlay y Contenido) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(9, 13, 22, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: var(--shadow-float);
  width: 100%;
  max-width: 480px;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  position: relative;
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.close-modal-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  background-color: var(--color-border);
  transform: scale(1.05);
}

/* Modal Detalle de Producto */
.product-modal .modal-body {
  display: flex;
  flex-direction: column;
}

.modal-img-container {
  width: 100%;
  aspect-ratio: 1.3;
  background-color: var(--color-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #fff;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.product-modal .modal-info {
  padding: 24px;
}

.modal-header-info {
  margin-bottom: 12px;
}

.detail-badge {
  display: inline-block;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.detail-subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
  display: block;
}

.detail-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  max-height: 120px;
  overflow-y: auto;
}

.detail-stock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

.stock-label {
  color: var(--color-text-secondary);
}

.stock-status {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.stock-status.in-stock {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stock-status.low-stock {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.stock-status.out-of-stock {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.detail-divider {
  height: 1px;
  background-color: var(--color-border);
  margin-bottom: 16px;
}

.detail-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.price-container {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 11px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

.detail-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
}

.quantity-selector {
  display: flex;
  align-items: center;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  height: 40px;
}

.quantity-selector .qty-btn {
  background: none;
  border: none;
  width: 36px;
  height: 100%;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  transition: background-color 0.2s;
}

.quantity-selector .qty-btn:hover {
  background-color: var(--color-border);
}

.quantity-selector .qty-text {
  padding: 0 12px;
  font-weight: 700;
  font-size: 15px;
  min-width: 30px;
  text-align: center;
  color: var(--color-text-primary);
}

.add-to-cart-large-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-accent) 0%, hsl(var(--color-accent-h), var(--color-accent-s), 28%) 100%);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--color-accent-glow);
  transition: all var(--transition-smooth);
}

.add-to-cart-large-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--color-accent-glow);
}

.add-to-cart-large-btn:disabled {
  background: var(--color-border);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Modal Historial de Pedidos */
.orders-modal {
  max-width: 500px;
}

.orders-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.orders-modal .modal-body {
  padding: 20px 24px 28px;
  max-height: 70vh;
  overflow-y: auto;
}

.history-intro {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.orders-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.no-orders-msg {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 30px;
  font-size: 14px;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
}

.order-history-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
}

.order-history-card:hover {
  border-color: var(--color-primary-light);
}

.order-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.order-history-id {
  font-weight: 700;
  color: var(--color-text-primary);
  font-size: 13px;
}

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

.order-history-details {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.order-history-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
  margin-top: 10px;
}

.order-history-total {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 14px;
}

.order-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-status-badge.pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.order-status-badge.confirmed {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.order-status-badge.delivered {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.order-status-badge.cancelled {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ═══════════════════════════════════════════════════════
   DISEÑO CHECKOUT WIZARD
   ═══════════════════════════════════════════════════════ */
.wizard-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  padding: 0 10px;
}

.wizard-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  position: relative;
}

.wizard-step-indicator .step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.3s;
}

.wizard-step-indicator.active .step-num {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--color-accent-glow);
}

.wizard-step-indicator.completed .step-num {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.wizard-step-indicator .step-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wizard-step-indicator.active .step-label {
  color: var(--color-primary);
}

.wizard-progress-line {
  flex: 1;
  height: 2px;
  background-color: var(--color-border);
  margin-top: -16px; /* Alinear verticalmente con el círculo */
  position: relative;
}

.progress-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.wizard-step-pane {
  display: none;
  animation: fadeInPane 0.25s ease-in-out forwards;
}

.wizard-step-pane.active {
  display: block;
}

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

.wizard-actions-row {
  display: flex;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

.wizard-btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

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

.wizard-btn-secondary {
  background-color: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-btn-secondary:hover {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

/* Banner de Puntos de Fidelización */
.loyalty-points-banner {
  background-color: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.loyalty-points-banner .loyalty-icon {
  font-size: 18px;
}

.loyalty-points-banner .loyalty-text {
  font-size: 13px;
  font-weight: 600;
  color: #4f46e5;
}

[data-theme="dark"] .loyalty-points-banner .loyalty-text {
  color: #818cf8;
}

.payment-instructions-box {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.instructions-header {
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.bank-qr-placeholder {
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 12px;
}

.qr-placeholder-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════
   MEJORAS PARA PC / ESCRITORIO Y ADAPTACIÓN MULTI-NEGOCIO
   ═══════════════════════════════════════════════════════ */

/* Botón de Carrito en Cabecera (Desktop / Tablet) */
.header-cart-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  height: 38px;
  padding: 0 14px;
  transition: all var(--transition-smooth);
}

.header-cart-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.header-cart-badge {
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
}

/* Modalidad de Entrega (Paso 2 del Checkout) */
.delivery-type-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.delivery-radio-label {
  cursor: pointer;
  position: relative;
  display: block;
}

.delivery-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.delivery-radio-tile {
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: all var(--transition-smooth);
  height: 100%;
}

.delivery-radio-label input[type="radio"]:checked + .delivery-radio-tile {
  border-color: var(--color-primary);
  background-color: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.delivery-icon {
  font-size: 22px;
}

.delivery-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  display: block;
}

.delivery-sub {
  font-size: 10px;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

/* Banner de Retiro en Tienda */
.pickup-info-banner {
  background-color: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}

.pickup-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.pickup-address-text {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* Agendamiento de Citas / Horario */
.appointment-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.appointment-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appointment-field .field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.date-input, .time-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 13px;
  transition: all var(--transition-smooth);
}

.date-input:focus, .time-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Selector de Variantes / Tallas en Modal de Detalle */
.detail-variant-container {
  margin: 14px 0;
}

.detail-variant-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  display: block;
  margin-bottom: 8px;
}

.variant-options-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-pill {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.variant-pill:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.variant-pill.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--color-accent-glow);
}

/* Notas de Cocina / Especiales en Detalle */
.detail-special-notes-container {
  margin: 14px 0;
}

.special-notes-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  display: block;
  margin-bottom: 6px;
}

.special-notes-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 13px;
  transition: all var(--transition-smooth);
}

.special-notes-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Badges en ítems del Carrito */
.cart-item-variant-badge {
  display: inline-block;
  background-color: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

[data-theme="dark"] .cart-item-variant-badge {
  background-color: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
}

.cart-item-instructions-tag {
  display: block;
  font-size: 11px;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: 2px;
}

/* Subtítulos en Resumen de Checkout */
.qty-name-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-item-variant {
  font-size: 11px;
  color: #7c3aed;
  font-weight: 600;
}

.summary-item-note {
  font-size: 11px;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Botón Copiar Resumen en Pantalla de Éxito */
.copy-order-btn {
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-smooth);
}

.copy-order-btn:hover {
  border-color: var(--color-primary);
  background-color: var(--color-bg);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════
   OPTIMIZACIÓN RESPONSIVE PARA ESCRITORIO / PC (>= 992px)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 992px) {
  /* Mostrar botón de carrito en la cabecera */
  .header-cart-btn {
    display: flex;
  }

  /* Ocultar botón flotante en PC para dejar espacio limpio */
  .floating-cart-btn {
    display: none !important;
  }

  /* Contenedor principal más amplio en monitores */
  #app {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px 60px 20px;
  }

  .app-header {
    padding: 36px 32px;
    border-radius: 28px;
    margin-bottom: 24px;
  }

  .store-title {
    font-size: 32px;
  }

  /* Grid de Productos en PC: 3 a 4 columnas elegantes */
  .catalog-grid.grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
  }

  .product-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.12);
  }

  .product-card .card-img-wrapper {
    max-height: 200px;
    aspect-ratio: 1.1;
  }

  .product-card .card-placeholder-img {
    width: 64px;
    height: 64px;
    font-size: 26px;
    border-radius: 18px;
  }

  .product-card .card-info {
    padding: 16px;
  }

  .product-card .product-name {
    font-size: 15px;
    height: 44px;
    line-height: 1.45;
  }

  .product-card .product-price {
    font-size: 18px;
  }

  .product-card .add-btn {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 40px;
  }

  /* Carrito en PC: Drawer Lateral Derecho en lugar de Bottom Sheet */
  .bottom-sheet-overlay {
    display: flex;
    justify-content: flex-end;
  }

  .bottom-sheet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto !important;
    width: 440px !important;
    max-width: 90vw;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 24px 0 0 24px !important;
    transform: translateX(100%) !important;
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
  }

  .bottom-sheet-overlay.open .bottom-sheet {
    transform: translateX(0) !important;
  }

  .sheet-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .cart-items-container {
    flex: 1;
    max-height: none;
    padding: 16px 20px;
  }

  /* Modal de Detalle de Producto en PC: 2 columnas */
  .modal-content.product-modal {
    max-width: 760px;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
  }

  .modal-content.product-modal .modal-body {
    display: grid;
    grid-template-columns: 340px 1fr;
  }

  .modal-content.product-modal .modal-img-container {
    height: 100%;
    min-height: 380px;
    border-radius: 0;
  }

  .modal-content.product-modal .modal-info {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* Modal de Historial de Pedidos en PC */
  .modal-content.orders-modal {
    max-width: 640px;
  }

  /* Vista Checkout en PC */
  .checkout-main {
    max-width: 680px;
    margin: 0 auto;
    background-color: var(--color-surface);
    padding: 32px 36px;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
  }
}

