/* CSF — Premium Conversion-Focused Design System (Stripe/Apple Clean Retail) */

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

:root {
  /* Surface & Background (60%) */
  --bg-base:       #EDF1F5;
  --bg-surface:    #ffffff;
  
  /* Trust & Structure (30%) */
  --navy:          #0C2340;
  --navy-light:    #15305B;
  --navy-muted:    #4E5E80;
  
  /* Conversion & Action (10%) */
  --accent:        #E8621A;
  --accent-hover:  #CE5212;
  --accent-light:  rgba(232, 98, 26, 0.05);

  /* Typography */
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-primary:  #1d1d1f;
  --text-secondary:#6e6e73;
  --text-muted:    #86868b;

  /* Borders & Dividers */
  --border-color:  #E2E8F0;
  --border-light:  #F1F5F9;

  /* Semantics */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger:  #EF4444;

  /* Spacing (Apple scale) */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 24px;  --s6: 32px;  --s8: 48px;  --s10: 64px;
  --s12: 80px;

  /* Geometria */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  /* Shadows (Soft & Realistic) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; outline: none; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Layout & Grid ────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s5);
}

.section {
  padding: var(--s8) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--s5);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--s3);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

/* SVG Icons */
.svg-icon {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; fill: none;
  display: inline-block; vertical-align: middle;
}
.svg-icon.sm { width: 14px; height: 14px; }
.svg-icon.lg { width: 22px; height: 22px; }
.svg-icon.fill { fill: currentColor; stroke: none; }

.text-center { text-align: center; }
.mb-2 { margin-bottom: var(--s2); }
.mb-4 { margin-bottom: var(--s4); }
.mb-6 { margin-bottom: var(--s6); }
.mt-4 { margin-top: var(--s4); }
.mt-6 { margin-top: var(--s6); }
.hidden { display: none !important; }

/* ── Header Corporativo (Navy) ───────────────────────────────────────────── */
.top-bar {
  background-color: #08172c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px 0;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  background-color: var(--navy);
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 var(--s5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
}

.navbar-brand {
  text-align: left;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-main {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.search-bar {
  flex: 1;
  max-width: 600px;
  margin: 0 var(--s6);
  position: relative;
}
.search-bar input {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-md);
  border: none;
  background-color: #ffffff;
  padding: 0 48px 0 var(--s4);
  color: #1d1d1f;
  font-size: 14px;
  transition: all 0.2s ease;
}
.search-bar input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 98, 26, 0.2);
}
.search-bar input::placeholder {
  color: #86868b;
}
.search-icon-right {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #86868b;
  pointer-events: none;
}

/* Spotlight Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 110;
}
.search-results-dropdown.open {
  display: block;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s4);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s ease;
}
.search-result-item:hover {
  background-color: var(--border-light);
}
.search-result-item img {
  width: 32px; height: 32px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.search-result-item .name { font-size: 13px; font-weight: 500; }
.search-result-item .price { margin-left: auto; font-size: 13px; color: var(--accent); font-weight: 600; }

/* Navigation links */
.navbar-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: var(--s5);
}
.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}
.nav-link.active {
  color: #ffffff;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-icon-btn {
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.nav-icon-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.cart-btn-orange {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  position: relative;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.cart-btn-orange:hover {
  background-color: var(--accent-hover) !important;
}

.btn-membership {
  height: 44px;
  padding: 0 var(--s5);
  background-color: #0b1a30;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.btn-membership:hover {
  background-color: #ffffff;
  color: var(--navy);
}

.badge {
  position: absolute;
  top: 2px; right: 2px;
  background-color: #ffffff;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  height: 16px; min-width: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── Buttons (Apple & Stripe Realism) ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 var(--s4);
  height: 38px;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-lg { height: 46px; font-size: 14px; padding: 0 var(--s6); }
.btn-sm { height: 32px; font-size: 12px; padding: 0 var(--s3); }
.btn-full { width: 100%; }

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(255, 107, 53, 0.1);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-navy {
  background-color: var(--navy);
  color: #ffffff;
}
.btn-navy:hover:not(:disabled) {
  background-color: var(--navy-light);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-outline:hover:not(:disabled) {
  background-color: var(--border-light);
  border-color: var(--text-secondary);
}

.btn-ghost {
  color: var(--accent);
  background-color: transparent;
}
.btn-ghost:hover {
  background-color: var(--accent-light);
}

/* ── Banner Principal Héroe ──────────────────────────────────────────────── */
.hero {
  background-color: #E2E8F0;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(rgba(26, 34, 56, 0.4), rgba(26, 34, 56, 0.7)), 
                    url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1200&q=80');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 280px;
  text-align: left;
}

.hero-content {
  max-width: 550px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s4);
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: var(--s3);
  letter-spacing: -0.02em;
}
.hero h1 span {
  color: #ffffff;
}

.hero p {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--s5);
}

/* Hero Stats */
.hero-floating {
  margin-top: var(--s5);
  display: flex;
  gap: var(--s4);
}
.hero-stat {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-md);
  min-width: 140px;
}
.hero-stat .value {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}
.hero-stat .label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

/* ── Product Grid & Cards (Modern Grid System) ───────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s5);
}

.product-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease-in-out;
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.product-card-image {
  aspect-ratio: 1.18;
  position: relative;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  padding: 12px;
}

.product-card-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product-card:hover .product-card-image img {
  transform: scale(1.04);
}

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

.badge-label {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-featured {
  background-color: var(--navy);
  color: #ffffff;
}
.badge-outlet {
  background-color: var(--color-danger);
  color: #ffffff;
}
.badge-low-stock {
  background-color: var(--color-warning);
  color: #ffffff;
}
.badge-out-stock {
  background-color: #94A3B8;
  color: #ffffff;
}

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

.product-card-name {
  font-weight: 600;
  font-size: 15px;
  color: #1d1d1f;
  margin-bottom: var(--s2);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
}

/* Discount DTO Badge */
.discount-dto-badge {
  display: inline-flex;
  align-self: flex-start;
  background-color: #EFEFEF;
  color: #1d1d1f;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: var(--s3);
  text-transform: uppercase;
}

/* Star Rating */
.star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: var(--s3);
  color: #F59E0B;
  font-size: 12px;
}
.star-rating span {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 4px;
}

.product-card-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--s3);
}

.price-original {
  font-size: 16px;
  color: #8c8c8c;
  text-decoration: line-through;
}

.price-main {
  font-size: 22px;
  font-weight: 800;
  color: #B92E1C;
}

.product-card-footer {
  margin-top: auto;
}

.btn-add-cart {
  width: 100%;
  height: 40px;
  background-color: #ffffff;
  border: 1px solid #1A2238;
  color: #1A2238;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 20px;
  transition: all 0.2s ease-in-out;
}
.btn-add-cart:hover:not(:disabled) {
  background-color: #1A2238;
  color: #ffffff;
}
.btn-add-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Filters & Category Bar (Catalog Page) ──────────────────────────────── */
.filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
  gap: var(--s4);
}

#categoryFilters {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 16px;
  background-color: #f0f2f5;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}
.filter-chip:hover {
  background-color: #e2e8f0;
  color: var(--text-primary);
}
.filter-chip.active {
  background-color: var(--navy);
  color: #ffffff;
  font-weight: 600;
}

.filter-select {
  padding: 8px 36px 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234E5E80' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}
.filter-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.1);
}

/* ── Sección de Liquidación (Outlet) ─────────────────────────────────────── */
.outlet-section {
  background-color: var(--bg-base);
}

/* Wrapper that stacks card + countdown vertically */
.outlet-card-wrapper {
  display: flex;
  flex-direction: column;
}

.outlet-card-wrapper .product-card {
  border-color: rgba(232, 98, 26, 0.2);
}
.outlet-card-wrapper .product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(232, 98, 26, 0.1);
}

/* Countdown sits below the card as its own block */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s3);
  background-color: var(--navy);
  color: #ffffff;
  padding: 10px var(--s4);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--navy-light);
  border-top: none;
}
.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
}
.countdown-value {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  line-height: 1;
}
.countdown-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Remove bottom radius from card when countdown is below */
.outlet-card-wrapper .product-card {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ── Cart Side Panel ────────────────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(26, 34, 56, 0.4);
  z-index: 200; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-panel {
  position: fixed; top: 0; right: -400px; bottom: 0;
  width: 400px; max-width: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 210; display: flex; flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-panel.open { right: 0; }

.cart-header {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
}
.cart-title { font-weight: 700; font-size: 15px; color: var(--navy); }
.cart-close {
  font-size: 16px; color: var(--text-secondary);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s;
}
.cart-close:hover { background: var(--border-light); color: var(--navy); }

.cart-items {
  flex: 1; overflow-y: auto; padding: var(--s4);
  display: flex; flex-direction: column; gap: var(--s3);
}
.cart-item {
  display: flex; gap: var(--s3); padding: var(--s3);
  border: 1px solid var(--border-light); border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.cart-item-img {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: var(--radius-sm);
}
.cart-item-info { flex: 1; display: flex; flex-direction: column; }
.cart-item-name { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 2px; line-height: 1.3; }
.cart-item-price { font-weight: 600; color: var(--text-primary); font-size: 13px; margin-bottom: auto; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.qty-btn {
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  background: var(--border-light); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; transition: background 0.15s;
}
.qty-btn:hover { background: var(--border-color); }

.cart-footer {
  padding: var(--s5); border-top: 1px solid var(--border-color); background: var(--bg-surface);
}
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s4); }
.cart-total-label { font-size: 13px; color: var(--text-secondary); }
.cart-total-amount { font-size: 20px; font-weight: 700; color: var(--navy); }

/* ── Product Detail Layout ───────────────────────────────────────────────── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  margin-top: var(--s5);
  background-color: var(--panel-color);
  padding: var(--s6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.product-image-main {
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
}
.product-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Toast / Notificaciones ───────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  max-width: 360px;
}
.toast {
  padding: 12px 20px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  animation: slideInToast 0.3s ease;
  background: var(--navy); color: #fff;
}
.toast.success { background: #059669; }
.toast.error { background: #DC2626; }
@keyframes slideInToast {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Skeleton Loading ─────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
.skeleton-card { height: 280px; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Stock Indicator ──────────────────────────────────────────────────────── */
.stock-indicator { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stock-verde .stock-dot, .stock-verde > .stock-dot { background: #10B981; box-shadow: 0 0 6px rgba(16,185,129,0.4); }
.stock-amarillo .stock-dot, .stock-amarillo > .stock-dot { background: #F59E0B; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.stock-rojo .stock-dot, .stock-rojo > .stock-dot { background: #EF4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.stock-verde { color: #059669; }
.stock-amarillo { color: #D97706; }
.stock-rojo { color: #DC2626; }

/* ── Tablas del Admin ─────────────────────────────────────────────────────── */
.data-table-wrapper {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.data-table-header {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.data-table thead { background: #f8fafc; }
.data-table th {
  padding: 12px 16px; text-align: left;
  font-weight: 600; color: var(--navy-muted);
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background-color: rgba(12,35,64,0.02); }
.data-table tbody tr:active { background-color: rgba(12,35,64,0.04); }

/* ── Admin Dashboard ─────────────────────────────────────────────────────── */
.admin-layout {
  display: flex; height: 100vh; overflow: hidden; background: var(--bg-base);
}
.admin-sidebar {
  width: 260px; background: var(--navy); color: #ffffff;
  display: flex; flex-direction: column; flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-hamburger {
  display: none;
  background: none; border: none; color: var(--navy); cursor: pointer;
  width: 36px; height: 36px; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); transition: background 0.2s;
}
.admin-hamburger:hover { background: var(--bg-base); }
.admin-sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  z-index: 89; opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
}
.admin-sidebar-overlay.open { opacity: 1; visibility: visible; }
.admin-logo { padding: var(--s4) var(--s5); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.admin-logo-text { font-size: 16px; font-weight: 700; color: #ffffff; }
.admin-logo-sub { font-size: 11px; color: rgba(255, 255, 255, 0.5); margin-top: 1px; }

.admin-nav { padding: var(--s2) 0; flex: 1; overflow-y: auto; }
.admin-nav-item {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 10px var(--s5); color: rgba(255, 255, 255, 0.7);
  text-align: left; font-size: 13px; font-weight: 500;
  transition: all 0.2s; border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.04); }
.admin-nav-item.active {
  color: #ffffff; background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent); font-weight: 600;
}

.admin-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-topbar {
  height: 54px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 var(--s5); flex-shrink: 0;
}
.admin-page-title { font-size: 16px; font-weight: 700; color: var(--navy); }
.admin-badge {
  font-size: 11px; font-weight: 600; color: var(--navy-muted);
  background: var(--bg-base); padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.admin-main { flex: 1; overflow-y: auto; padding: var(--s5); }

.page-view { display: none; }
.page-view.active { display: block; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── KPI Cards ────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.kpi-card:nth-child(1)::before { background: linear-gradient(90deg, #0C2340, #1e4a7a); }
.kpi-card:nth-child(2)::before { background: linear-gradient(90deg, #059669, #34D399); }
.kpi-card:nth-child(3)::before { background: linear-gradient(90deg, #D97706, #FBBF24); }
.kpi-card:nth-child(4)::before { background: linear-gradient(90deg, #DC2626, #F87171); }
.kpi-label {
  font-size: 12px; font-weight: 600;
  color: var(--navy-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 26px; font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

/* ── Charts ───────────────────────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.chart-title {
  font-size: 13px; font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

/* ── Plan Cards (Membresía) ───────────────────────────────────────────────── */
.membership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 600px;
  margin: 0 auto;
}
.plan-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  transition: all 0.2s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 16px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.plan-name { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.plan-price { margin-bottom: 20px; }
.plan-price .amount { font-size: 32px; font-weight: 800; color: var(--navy); }
.plan-price .period { font-size: 14px; color: var(--navy-muted); }
.plan-benefits { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.plan-benefits li {
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
  font-size: 13px; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.plan-benefits li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
  font-size: 14px;
}
.btn-gold {
  background: linear-gradient(135deg, #D97706, #F59E0B);
  color: #fff; font-weight: 700; height: 44px;
  box-shadow: 0 2px 8px rgba(217,119,6,0.2);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(217,119,6,0.3); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 var(--s2); height: 60px; gap: 8px; }
  .navbar-nav { display: none; }
  .search-bar { margin: 0; flex: 1; min-width: 0; }
  .search-bar input { height: 38px; font-size: 13px; padding: 0 40px 0 12px; }
  .brand-main { font-size: 18px; }
  .brand-sub { font-size: 16px; }
  .btn-membership { display: none; }
  .nav-icon-btn { width: 36px; height: 36px; }
  .cart-btn-orange { width: 38px; height: 38px; }

  .hero { padding: 32px 0; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .hero-floating { flex-direction: column; align-items: stretch; gap: 8px; }
  .hero-stat { min-width: auto; }
  .hero-cta { display: flex; flex-direction: column; gap: 8px; }
  .hero-cta .btn { width: 100%; }

  .section { padding: var(--s5) 0; }
  .section-title { font-size: 18px; }
  .container { padding: 0 var(--s4); }

  .charts-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-card { padding: 14px 16px; }
  .kpi-value { font-size: 20px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-name { font-size: 13px; }
  .price-main { font-size: 18px; }

  .product-detail-grid {
    grid-template-columns: 1fr; gap: var(--s4); padding: var(--s4);
  }

  .data-table-wrapper { overflow-x: auto; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; }

  /* Admin mobile: sidebar as off-canvas */
  .admin-layout { flex-direction: row; position: relative; }
  .admin-hamburger { display: flex; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
    width: 280px; transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-overlay.open { display: block; }
  .admin-content { width: 100%; }
  .admin-main { padding: var(--s4); }
  .admin-topbar { padding: 0 var(--s4); }
  .admin-badge { display: none; }
  .admin-nav-item { padding: 12px var(--s5); white-space: nowrap; }
  .admin-nav-item svg { width: 20px; height: 20px; }

  .membership-grid { grid-template-columns: 1fr; padding: 0 var(--s4); }
  .plan-card { padding: 24px 20px; }
  .plan-price .amount { font-size: 28px; }

  #createOutletForm { grid-template-columns: 1fr !important; }
  .track-form-row { flex-direction: column; }
}

/* ── Order Tracking Page ─────────────────────────────────────────────── */
.track-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--s6);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s6);
}
.track-form-row {
  display: flex;
  gap: var(--s4);
  align-items: center;
}
.track-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s4);
}
.track-result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.track-result-id {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}
.track-result-date {
  font-size: 12px;
  color: var(--navy-muted);
  margin-top: 2px;
}
.track-status-badge {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.track-status-badge.status-pending { background: #FEF3C7; color: #D97706; }
.track-status-badge.status-paid { background: #D1FAE5; color: #059669; }
.track-status-badge.status-shipped { background: #DBEAFE; color: #2563EB; }
.track-status-badge.status-cancelled { background: #FEE2E2; color: #DC2626; }
.track-detail-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--navy-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}
.track-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--bg-base);
  border-radius: var(--radius-md);
}
.track-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.track-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.track-item-meta {
  font-size: 12px;
  color: var(--navy-muted);
  margin-top: 2px;
}
