/* css/styles.css - Estilos Globales, Temas de Color, Autenticación y Diseño Responsivo para Lulú */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Paleta por Defecto: Celeste Chic */
  --primary-celeste: #0ea5e9;
  --primary-hover: #0284c7;
  --celeste-light: #e0f2fe;
  --celeste-badge: #0284c7;
  --celeste-soft: #f0f9ff;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 2px 4px rgba(14, 165, 233, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(14, 165, 233, 0.15);
  --shadow-hover: 0 15px 30px rgba(14, 165, 233, 0.22);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================
   PALETAS DE COLORES SELECCIONABLES (Temas de Color)
   =================================================== */

/* Tema Rosa Chic */
[data-theme="rosa"] {
  --primary-celeste: #ec4899;
  --primary-hover: #db2777;
  --celeste-light: #fce7f3;
  --celeste-badge: #be185d;
  --celeste-soft: #fff1f2;
  --shadow-lg: 0 10px 25px rgba(236, 72, 153, 0.2);
  --shadow-hover: 0 15px 30px rgba(236, 72, 153, 0.25);
}

/* Tema Elegante Dorado & Negro */
[data-theme="dorado"] {
  --primary-celeste: #d97706;
  --primary-hover: #b45309;
  --celeste-light: #fef3c7;
  --celeste-badge: #92400e;
  --celeste-soft: #fffbeb;
  --shadow-lg: 0 10px 25px rgba(217, 119, 6, 0.2);
  --shadow-hover: 0 15px 30px rgba(217, 119, 6, 0.25);
}

/* Tema Verde Menta Fresco */
[data-theme="menta"] {
  --primary-celeste: #10b981;
  --primary-hover: #059669;
  --celeste-light: #d1fae5;
  --celeste-badge: #047857;
  --celeste-soft: #ecfdf5;
  --shadow-lg: 0 10px 25px rgba(16, 185, 129, 0.2);
  --shadow-hover: 0 15px 30px rgba(16, 185, 129, 0.25);
}

/* Tema Púrpura Lavanda */
[data-theme="lavanda"] {
  --primary-celeste: #8b5cf6;
  --primary-hover: #7c3aed;
  --celeste-light: #ede9fe;
  --celeste-badge: #6d28d9;
  --celeste-soft: #f5f3ff;
  --shadow-lg: 0 10px 25px rgba(139, 92, 246, 0.2);
  --shadow-hover: 0 15px 30px rgba(139, 92, 246, 0.25);
}

/* Tema Azul Rey / Marino */
[data-theme="azul"] {
  --primary-celeste: #2563eb;
  --primary-hover: #1d4ed8;
  --celeste-light: #dbeafe;
  --celeste-badge: #1e40af;
  --celeste-soft: #eff6ff;
  --shadow-lg: 0 10px 25px rgba(37, 99, 235, 0.2);
  --shadow-hover: 0 15px 30px rgba(37, 99, 235, 0.25);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
  touch-action: manipulation;
}

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

/* Header & Navbar */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.top-bar {
  background: var(--bg-dark);
  color: var(--text-white);
  text-align: center;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: var(--transition);
}

.top-bar span {
  color: var(--primary-celeste);
  font-weight: 700;
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--bg-dark);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo span {
  color: var(--primary-celeste);
}

.logo-badge {
  background: var(--celeste-light);
  color: var(--primary-celeste);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.search-box {
  flex: 1;
  max-width: 450px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary-celeste);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  outline: none;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  position: relative;
  background: var(--celeste-soft);
  color: var(--bg-dark);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--primary-celeste);
  color: var(--text-white);
  transform: translateY(-2px);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid white;
}

/* Banner Festivo Promocional */
.hero-banner {
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 20px;
}

.banner-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, var(--primary-celeste) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: var(--transition);
  height: 380px;
}

.banner-content {
  padding: 40px;
  z-index: 2;
}

.banner-badge {
  display: inline-block;
  background: var(--primary-celeste);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.banner-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
}

.banner-subtitle {
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 24px;
  font-weight: 300;
}

.banner-btn {
  background: white;
  color: var(--bg-dark);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.banner-btn:hover {
  background: var(--celeste-light);
  color: var(--primary-hover);
  transform: translateY(-2px);
}

.banner-image-container {
  height: 100%;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  align-self: stretch;
}

.banner-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.banner-image-container img.banner-image-motion {
  animation: kenburns-motion 24s ease-in-out infinite alternate;
  transform-origin: center center;
}

@keyframes kenburns-motion {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.08) translate(-1%, -0.5%);
  }
  100% {
    transform: scale(1.15) translate(-2%, -1%);
  }
}

.banner-image-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Category Filter Bar */
.category-bar-section {
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 20px;
}

.category-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.btn-cat {
  padding: 9px 18px;
  border-radius: var(--radius-full);
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-cat:hover, .btn-cat.active {
  background: var(--primary-celeste);
  color: white;
  border-color: var(--primary-celeste);
  box-shadow: var(--shadow-sm);
}

/* Section Title */
.section-header {
  max-width: 1280px;
  margin: 28px auto 16px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 5px;
  height: 22px;
  background: var(--primary-celeste);
  border-radius: var(--radius-full);
  display: inline-block;
}

/* Product Grid */
.product-grid {
  max-width: 1280px;
  margin: 0 auto 50px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-celeste);
}

.product-img-box {
  height: 240px;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.badge-stock {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-stock.low {
  background: rgba(234, 88, 12, 0.9);
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-cat {
  font-size: 0.72rem;
  color: var(--primary-celeste);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-features-box {
  background: var(--celeste-soft);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--celeste-light);
}

.features-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-celeste);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.features-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.feature-tag {
  background: white;
  color: var(--bg-dark);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 14px;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bg-dark);
}

.old-price {
  font-size: 0.88rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.btn-add-cart {
  width: 100%;
  background: var(--bg-dark);
  color: white;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-cart:hover {
  background: var(--primary-celeste);
}

/* Modal Drawer de Carrito */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: white;
  z-index: 1001;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer-overlay.active .cart-drawer {
  right: 0;
}

.cart-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
}

.btn-close-cart {
  background: transparent;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  padding: 4px 8px;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 10px;
  color: var(--text-muted);
}

.cart-item {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.cart-item-info { flex: 1; }
.cart-item-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.cart-item-features { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.cart-item-price { font-size: 0.85rem; color: var(--primary-celeste); font-weight: 700; }

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-qty:hover {
  background: var(--celeste-light);
  color: var(--primary-celeste);
}

.btn-remove-item {
  background: transparent;
  color: #ef4444;
  padding: 4px;
}

.checkout-form-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 2px dashed var(--border-color);
}

.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  background: var(--bg-main);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary-celeste);
  background: white;
  outline: none;
}

.cart-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cart-total-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--bg-dark);
}

.btn-whatsapp-checkout {
  width: 100%;
  background: #22c55e;
  color: white;
  padding: 13px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.btn-whatsapp-checkout:hover { background: #16a34a; }

/* Footer Store */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 40px 20px 20px;
  margin-top: 50px;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.footer-col h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--primary-celeste);
}

.footer-col p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #334155;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Selector de Tema de Color Preview */
.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.theme-option-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  transition: var(--transition);
}

.theme-option-card.selected, .theme-option-card:hover {
  border-color: var(--primary-celeste);
  box-shadow: 0 0 0 2px var(--celeste-light);
}

.theme-color-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: inline-block;
  flex-shrink: 0;
}

/* ===================================================
   ESTILOS DE AUTENTICACIÓN Y SEGURIDAD ADMIN
   =================================================== */

.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, var(--primary-celeste) 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 36px 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--bg-dark);
  margin-bottom: 4px;
}

.login-logo span {
  color: var(--primary-celeste);
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-login {
  width: 100%;
  background: var(--primary-celeste);
  color: white;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 10px;
  box-shadow: var(--shadow-md);
}

.btn-login:hover {
  background: var(--primary-hover);
}

.recovery-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.84rem;
  color: var(--primary-celeste);
  font-weight: 600;
}

.recovery-link:hover {
  text-decoration: underline;
}

/* ===================================================
   ESTILOS PANEL DE ADMINISTRACIÓN (admin.html)
   =================================================== */

.admin-header {
  background: var(--bg-dark);
  color: white;
  padding: 14px 20px;
}

.admin-nav {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.admin-container {
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--celeste-light);
  color: var(--primary-celeste);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.metric-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--bg-dark);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Tabs Navigation */
.admin-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-btn {
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--primary-celeste); }

.tab-btn.active {
  color: var(--primary-celeste);
  border-bottom-color: var(--primary-celeste);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Controls Bar */
.admin-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.btn-primary-admin {
  background: var(--primary-celeste);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary-admin:hover { background: var(--primary-hover); }

/* Table Design */
.table-responsive {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table th {
  background: var(--bg-main);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.stock-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-stock {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.btn-stock:hover {
  background: var(--primary-celeste);
  color: white;
}

.status-badge {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-block;
}

.status-pendiente { background: #fef3c7; color: #d97706; }
.status-proceso { background: var(--celeste-light); color: var(--primary-celeste); }
.status-completado { background: #dcfce7; color: #16a34a; }

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: white;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  border-radius: var(--radius-md);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-body { padding: 20px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Variable Chips for WhatsApp Template Editor */
.variable-chip {
  background: white;
  border: 1px solid #0284c7;
  color: #0284c7;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: monospace;
}

.variable-chip:hover {
  background: #0284c7;
  color: white;
  transform: translateY(-1px);
}

/* Size Chips for Product Features */
.size-chip {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.size-chip:hover {
  border-color: var(--primary-celeste);
  color: var(--primary-celeste);
}

.size-chip.active {
  background: var(--primary-celeste);
  color: white;
  border-color: var(--primary-celeste);
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.25);
}

/* Color Palette Dots for Product Features */
.color-palette-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.color-palette-dot:hover {
  transform: scale(1.18);
  box-shadow: var(--shadow-sm);
}

.color-palette-dot.active {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-celeste);
}

/* 4 Reference Image Slots in Admin Modal */
.admin-img-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .admin-img-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.img-slot-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.img-slot-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.img-slot-preview-box {
  width: 100%;
  height: 90px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 1px dashed var(--border-color);
}

.img-slot-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder-text {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 600;
}

.img-slot-url {
  width: 100%;
  font-size: 0.7rem;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.img-slot-file-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.img-slot-file-btn:hover {
  background: var(--primary-celeste);
  color: white;
  border-color: var(--primary-celeste);
}

/* Lightbox Modal / Product Detail Modal */
.detail-modal-box {
  background: white;
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.btn-close-detail-modal {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(15, 23, 42, 0.08);
  border: none;
  font-size: 1.8rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  color: var(--bg-dark);
}

.btn-close-detail-modal:hover {
  background: #ef4444;
  color: white;
}

.detail-modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 500px;
}

@media (max-width: 768px) {
  .detail-modal-grid {
    grid-template-columns: 1fr;
  }
}

.detail-gallery-container {
  padding: 24px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border-color);
}

.main-image-viewport {
  width: 100%;
  height: 380px;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.main-image-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.thumbnails-strip {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.thumb-wrapper {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  box-shadow: var(--shadow-sm);
}

.thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-wrapper:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.thumb-wrapper.active {
  border-color: var(--primary-celeste);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
  transform: translateY(-2px);
}

.detail-info-container {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.detail-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--bg-dark);
  line-height: 1.25;
}

.detail-price-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
}

.detail-stock-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.detail-stock-tag.ok { background: #dcfce7; color: #16a34a; }
.detail-stock-tag.low { background: #fef3c7; color: #d97706; }
.detail-stock-tag.out { background: #fee2e2; color: #ef4444; }

.detail-description-box h4, .detail-features-box h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.detail-description-box p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
}

.detail-actions-box {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  display: flex;
}

/* Responsive Rules */
@media (max-width: 640px) {
  .navbar { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .logo { font-size: 1.5rem; }
  .search-box { order: 3; width: 100%; max-width: 100%; }
  .nav-actions { gap: 8px; }
  .banner-card { grid-template-columns: 1fr; min-height: auto; height: auto; }
  .banner-content { padding: 24px 20px; }
  .banner-title { font-size: 1.6rem; }
  .banner-subtitle { font-size: 0.9rem; margin-bottom: 18px; }
  .banner-image-container { height: 200px; min-height: auto; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 0 14px; }
  .product-img-box { height: 170px; }
  .product-info { padding: 12px; }
  .product-name { font-size: 0.9rem; }
  .current-price { font-size: 1.1rem; }
  .cart-drawer { max-width: 100%; right: -100%; }
  .form-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .admin-title { font-size: 0.95rem; }
}
