/* ==========================================================================
   ESHARD PERU - MEGASTORE HIGH-DENSITY ENTERPRISE B2B CLEAN STYLESHEET
   Paleta: Manual de Marca ESHARD (Pantone 7693 C #124B75 / 3015 C #12619F / 7690 C #1278AD)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary:          #12619F; /* Azul Primario ESHARD (Pantone 3015 C) */
  --primary-hover:    #0e4873;
  --primary-light:    #e0f2fe;
  --primary-glow:     rgba(18, 97, 159, 0.15);
  --brand-navy:       #124B75; /* Azul Marino ESHARD (Pantone 7693 C) */
  --accent-blue:      #1278AD; /* Azul Acento ESHARD (Pantone 7690 C) */
  --dark-navy:        #0c1b2b;
  
  --body-bg:          #f8fafc; /* Modo Claro Limpio Enterprise B2B */
  --surface-white:    #ffffff;
  --surface-muted:    #f1f5f9;
  --surface-border:   #e2e8f0;
  --border:           #e2e8f0;
  --border-focus:     #12619F;

  --text-dark:        #0f172a;
  --text-body:        #334155;
  --text-gray:        #64748b;
  --text-light:       #94a3b8;
  --text-white:       #ffffff;

  --green-stock:      #059669;
  --green-stock-bg:   rgba(5, 150, 105, 0.1);
  --amber-stock:      #d97706;
  --amber-stock-bg:   rgba(217, 119, 6, 0.1);
  --red-stock:        #dc2626;
  --red-stock-bg:     rgba(220, 38, 38, 0.1);

  --radius-xs:        4px;
  --radius-sm:        6px;
  --radius-md:        8px;
  --radius-lg:        12px;
  --radius-full:      9999px;

  --shadow-sm:        0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card:      0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-card-hover:0 10px 25px -5px rgba(18, 97, 159, 0.12), 0 8px 10px -6px rgba(18, 97, 159, 0.08);
  --shadow-dropdown:  0 12px 30px rgba(15, 23, 42, 0.15);

  --font:             'Inter', system-ui, -apple-system, sans-serif;
}

/* --- RESET & BASICS --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: var(--body-bg);
  color: var(--text-body);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 60px; /* Margen para barra móvil */
}
a {
  color: inherit;
  text-decoration: none;
}
button, input, select, textarea {
  font-family: var(--font);
}

/* --- TOP NOTICE BAR --- */
.top-notice {
  background: var(--dark-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}
.top-notice a {
  color: #cbd5e1;
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.15s;
}
.top-notice a:hover {
  color: var(--text-white);
}

/* --- MEGA HEADER --- */
.mega-header {
  background: var(--brand-navy);
  border-bottom: 1px solid #0e3b5c;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.mobile-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-wrap img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  background: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.logo-title {
  display: flex;
  flex-direction: column;
}
.logo-title-text {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.logo-title-text span {
  color: #60a5fa;
}
.logo-badge {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  letter-spacing: 0.5px;
  width: fit-content;
  margin-top: 2px;
}
.mobile-cart-header {
  display: none;
  color: #fff;
  font-size: 20px;
  position: relative;
  text-decoration: none;
}

/* BUSCADOR ULTRA-OPTIMIZADO */
.search-mega-box {
  flex: 1;
  display: flex;
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.search-category-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-right: none;
  color: var(--text-dark);
  padding: 0 12px;
  outline: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  cursor: pointer;
}
.search-mega-box input {
  flex: 1;
  padding: 11px 40px 11px 16px;
  border: 1px solid #cbd5e1;
  border-right: none;
  background: #ffffff;
  color: var(--text-dark);
  outline: none;
  font-size: 13.5px;
  transition: border-color 0.2s;
}
.search-mega-box input:focus {
  border-color: var(--primary);
}
.search-mega-box input::placeholder {
  color: var(--text-gray);
}
.search-clear-btn {
  position: absolute;
  right: 120px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  font-size: 13px;
  display: none;
  padding: 4px;
}
.search-mega-box button.btn-search {
  background: var(--primary);
  border: none;
  color: #ffffff;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}
.search-mega-box button.btn-search:hover {
  background: var(--primary-hover);
}

/* DROPDOWN DE AUTOCOMPLETADO INTERACTIVO */
.search-autocomplete-box {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  z-index: 1000;
  overflow: hidden;
}
.search-autocomplete-header {
  padding: 8px 14px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gray);
  display: flex;
  justify-content: space-between;
}
.search-autocomplete-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--surface-muted);
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-dark);
  transition: background 0.15s;
}
.search-autocomplete-item:hover {
  background: #f8fafc;
}
.search-item-thumb {
  width: 36px;
  height: 36px;
  background: var(--surface-muted);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.search-item-info {
  flex: 1;
  min-width: 0;
}
.search-item-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-meta {
  font-size: 11px;
  color: var(--text-gray);
}
.search-item-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 13px;
}

/* ACCIONES DE USUARIO EN CABECERA */
.user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}
.action-item:hover {
  opacity: 0.9;
}
.action-item span.icon {
  font-size: 18px;
}
.cart-btn-mega {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.15s;
}
.cart-btn-mega:hover {
  background: rgba(255, 255, 255, 0.25);
}
.cart-badge {
  background: #38bdf8;
  color: #0f172a;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

/* --- BARRA RÁPIDA DE BÚSQUEDA MÓVIL (PILLS HORIZONTALES) --- */
.mobile-search-strip {
  display: none;
  background: #0f3d60;
  padding: 8px 14px 10px;
  border-bottom: 1px solid #1a4f78;
}
.search-pills-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.search-pills-scroll::-webkit-scrollbar {
  display: none;
}
.search-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-dark);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.search-pill:hover, .search-pill.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}

/* --- SUB NAVEGACIÓN (DESKTOP) --- */
.sub-nav {
  background: #ffffff;
  padding: 0 30px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.mega-menu-trigger {
  background: var(--brand-navy);
  color: #ffffff;
  padding: 11px 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  font-size: 13px;
}
.quick-links {
  display: flex;
  list-style: none;
  margin-left: 20px;
  gap: 22px;
  font-weight: 500;
  font-size: 13px;
  flex-wrap: wrap;
}
.quick-links a {
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.15s;
}
.quick-links a:hover {
  color: var(--primary);
}
.quick-links a.highlight {
  color: var(--primary);
  font-weight: 700;
}

/* --- CONTENEDOR PRINCIPAL: SIDEBAR + MAIN CONTENT --- */
.mega-container {
  max-width: 1440px;
  margin: 18px auto 40px;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
}

/* SIDEBAR TREE & FILTERS */
.sidebar-tree {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  height: fit-content;
  overflow: hidden;
}
.tree-title {
  background: var(--surface-muted);
  padding: 12px 16px;
  font-weight: 800;
  font-size: 11.5px;
  color: var(--text-dark);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cat-group {
  display: flex;
  flex-direction: column;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-muted);
  border-left: 3px solid transparent;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-left-color 0.15s;
}
.cat-item:hover {
  background: #f8fafc;
  color: var(--primary);
}
.cat-item.active {
  background: #eff6ff;
  color: var(--primary);
  font-weight: 700;
  border-left-color: var(--primary);
}
.cat-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.cat-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.cat-name {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cat-toggle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-gray);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  min-width: 20px;
  text-align: center;
}
.cat-toggle:hover {
  background: var(--surface-muted);
  color: var(--text-dark);
}
.cat-item.active .cat-toggle,
.cat-toggle.open {
  color: var(--primary);
}

.cat-item.level-0 { font-size: 13px; font-weight: 600; padding-left: 16px; }
.cat-item.level-1 { font-size: 12.5px; padding-left: 28px; color: var(--text-body); }
.cat-item.level-2 { font-size: 12px; padding-left: 38px; color: var(--text-gray); }

.cat-sublist {
  display: none;
  flex-direction: column;
}
.cat-sublist.open {
  display: flex;
}

/* FILTROS DE PRECIO Y STOCK */
.filter-section {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}
.filter-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}
.price-inputs {
  display: flex;
  gap: 8px;
}
.price-inputs input {
  width: 100%;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-size: 12.5px;
  outline: none;
}
.price-inputs input:focus {
  border-color: var(--primary);
}
.btn-filtrar {
  width: 100%;
  margin-top: 10px;
  padding: 9px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-filtrar:hover {
  background: var(--primary-hover);
}
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.toggle {
  position: relative;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input {
  display: none;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: 0.2s;
}
.toggle input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: 0.2s;
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}
.toggle-text {
  font-size: 12.5px;
  color: var(--text-body);
  font-weight: 500;
}

/* --- HERO BANNER ENTERPRISE B2B --- */
.hero-banner-main {
  background: linear-gradient(135deg, #124B75 0%, #12619F 100%);
  border: 1px solid #0e3d60;
  border-radius: var(--radius-md);
  padding: 32px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(18, 75, 117, 0.12);
  margin-bottom: 20px;
}
.hero-banner-main::after {
  content: 'ESHARD';
  position: absolute;
  right: -20px;
  bottom: -35px;
  font-size: 130px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.banner-content h2 {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.25;
}
.banner-content p {
  color: #e2e8f0;
  max-width: 520px;
  margin-bottom: 18px;
  line-height: 1.45;
  font-size: 13.5px;
}
.hero-badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-badge-item {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
}
.btn-cta {
  background: #ffffff;
  color: var(--brand-navy);
  border: none;
  padding: 11px 24px;
  font-weight: 800;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-cta:hover {
  background: #f0f9ff;
  color: #0c3350;
  transform: translateY(-2px);
}

/* BRANDS STRIP */
.brands-strip {
  margin: 0 0 20px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  gap: 20px;
  box-shadow: var(--shadow-card);
}
.brand-logo-item {
  font-weight: 800;
  font-size: 13px;
  color: var(--text-gray);
  letter-spacing: 0.8px;
  white-space: nowrap;
}

/* --- BARRA DE SUBCATEGORÍAS DINÁMICAS (PILLS) --- */
.subcategories-bar {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.subcategories-bar.visible {
  display: flex;
}
.subcat-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.subcat-pill:hover {
  background: #eff6ff;
  color: var(--primary);
  border-color: var(--primary);
}
.subcat-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 600;
}

/* --- TOOLBAR DE RESULTADOS Y ORDENAMIENTO --- */
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.results-count {
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 500;
}
.results-count span {
  color: var(--text-dark);
  font-weight: 800;
}
.sort-select {
  padding: 7px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
.sort-select:focus {
  border-color: var(--primary);
}

/* --- GRID DE PRODUCTOS DE ALTA DENSIDAD (MEGASTORE CLEAN) --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.product-img-wrap {
  aspect-ratio: 1;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}
.product-img-wrap .no-img {
  font-size: 2.5rem;
  color: var(--text-light);
}

.stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  display: inline-block;
  line-height: 1.2;
}
.stock-badge.disponible {
  background: var(--green-stock-bg);
  color: var(--green-stock);
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.stock-badge.bajo {
  background: var(--amber-stock-bg);
  color: var(--amber-stock);
  border: 1px solid rgba(217, 119, 6, 0.2);
}
.stock-badge.agotado {
  background: var(--red-stock-bg);
  color: var(--red-stock);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.destaque-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #12619F;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-brand {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 6px;
  height: 35px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-category {
  font-size: 11px;
  color: var(--text-gray);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price-box {
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}
.product-price {
  font-size: 17px;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.product-price .currency {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
}
.product-price-usd {
  font-size: 11px;
  color: var(--text-gray);
  margin-top: 1px;
}

.product-footer {
  margin-top: 10px;
}
.btn-add-cart {
  width: 100%;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
  box-shadow: 0 2px 6px rgba(18, 97, 159, 0.2);
}
.btn-add-cart:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-add-cart:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- PAGINACIÓN --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* --- SKELETON LOADER --- */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- TOASTS NOTIFICACIONES --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  min-width: 260px;
  animation: slideInToast 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
}
.toast.success { border-left: 4px solid var(--green-stock); }
.toast.error   { border-left: 4px solid var(--red-stock); }
.toast.info    { border-left: 4px solid var(--primary); }
@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- MODAL DETALLE PRODUCTO --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden {
  display: none;
}
.modal-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-dropdown);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--surface-muted);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: var(--text-body);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* --- FOOTER ENTERPRISE B2B --- */
.footer {
  background: var(--dark-navy);
  border-top: 2px solid var(--primary);
  padding: 44px 30px 24px;
  margin-top: 50px;
  color: #cbd5e1;
}
.footer-grid {
  max-width: 1440px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}
.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}
.footer-brand h3 span {
  color: #38bdf8;
}
.footer-brand p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  max-width: 320px;
}
.footer-badges {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.footer-badge-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  color: #e2e8f0;
}
.footer-section h4 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff;
  margin-bottom: 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  display: inline-block;
}
.footer-section a {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.footer-section a:hover {
  color: #38bdf8;
}
.footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  color: #64748b;
  font-size: 12px;
}

/* --- MOBILE BOTTOM APP BAR --- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  flex: 1;
}
.bottom-nav-item span.icon {
  font-size: 19px;
}
.bottom-nav-item.active {
  color: var(--primary);
}
.bottom-badge {
  position: absolute;
  top: 0;
  right: 25%;
  background: var(--primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

/* --- DRAWER MÓVIL OFF-CANVAS DE CATEGORÍAS --- */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 10000;
  backdrop-filter: blur(3px);
}
.mobile-drawer {
  position: fixed;
  top: 0; bottom: 0; left: -320px;
  width: 300px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  z-index: 10001;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-dropdown);
}
.mobile-drawer.open {
  left: 0;
}
.mobile-drawer-header {
  padding: 16px;
  background: var(--brand-navy);
  border-bottom: 1px solid #0e3b5c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #ffffff;
}
.mobile-drawer-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}
.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & MÓVILES)
   ========================================================================== */
@media (max-width: 1024px) {
  .mega-container {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  .sidebar-tree {
    display: none;
  }
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .sub-nav {
    padding: 0 20px;
  }
  .quick-links {
    gap: 14px;
  }
  .top-notice {
    padding: 6px 20px;
  }
  .mega-header {
    padding: 12px 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 70px;
  }
  .top-notice {
    display: none;
  }
  .sub-nav {
    display: none;
  }
  .brands-strip {
    display: none;
  }

  .mega-header {
    padding: 10px 14px;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .mobile-header-top {
    width: 100%;
    justify-content: space-between;
  }
  .mobile-menu-btn {
    display: block;
  }
  .mobile-cart-header {
    display: block;
  }
  .user-actions {
    display: none;
  }

  .search-mega-box {
    width: 100%;
    max-width: 100%;
  }
  .search-category-select {
    display: none; /* Simplificado en celular para dar ancho al input */
  }
  .search-mega-box input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 10px 34px 10px 12px;
    font-size: 13px;
  }
  .search-clear-btn {
    right: 86px;
  }
  .search-mega-box button.btn-search {
    padding: 0 16px;
    font-size: 12px;
  }
  .search-mega-box button.btn-search span:last-child {
    display: none; /* Solo icono en celular */
  }

  .mobile-search-strip {
    display: block;
  }

  .hero-banner-main {
    padding: 22px 18px;
    flex-direction: column;
    text-align: center;
  }
  .hero-banner-main::after {
    display: none;
  }
  .banner-content h2 {
    font-size: 20px;
  }
  .banner-content p {
    font-size: 12.5px;
    margin-bottom: 14px;
  }
  .hero-badges-row {
    justify-content: center;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card {
    padding: 10px;
  }
  .product-img-wrap {
    padding: 4px;
  }
  .product-name {
    font-size: 12px;
    height: 32px;
  }
  .product-price {
    font-size: 15px;
  }
  .btn-add-cart {
    padding: 7px;
    font-size: 11px;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .footer {
    padding: 30px 16px 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

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

/* ==========================================================================
   ESHARD ENTERPRISE — INTERNAL PAGES (UNIFIED STYLES)
   Carrito, Checkout, Producto, Confirmación, Términos, Libro de Reclamaciones
   ========================================================================== */

/* --- INNER PAGE HEADER (simplified mega-header for inner pages) --- */
.inner-page-header {
  background: var(--brand-navy);
  border-bottom: 1px solid #0e3b5c;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.inner-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.inner-header-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  background: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.inner-header-logo .logo-title-text {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.inner-header-logo .logo-title-text span {
  color: #60a5fa;
}
.inner-header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.inner-header-search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: 0.2s;
}
.inner-header-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.inner-header-search input:focus {
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.18);
}
.inner-header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  pointer-events: none;
}
.inner-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.inner-breadcrumb {
  font-size: 12.5px;
  color: #cbd5e1;
}
.inner-breadcrumb a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.inner-breadcrumb a:hover {
  color: #ffffff;
}
.inner-breadcrumb .active-crumb {
  color: #38bdf8;
  font-weight: 600;
}
.inner-btn-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
  font-size: 13px;
}
.inner-btn-cart:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- FORMULARIOS ENTERPRISE B2B --- */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-label .req {
  color: var(--red-stock);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-size: 13.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input.error {
  border-color: var(--red-stock);
}
.form-error {
  font-size: 12px;
  color: var(--red-stock);
  margin-top: 4px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- GRADIENT PRIMARY BUTTON (inner pages) --- */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-blue) 100%);
}

/* --- INNER PAGE CONTAINER --- */
.inner-container {
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 30px;
}
@media (max-width: 768px) {
  .inner-container {
    padding: 0 16px;
    margin: 16px auto;
  }
}

/* --- ENTERPRISE CARD --- */
.esh-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   CARRITO DE COMPRAS
   ========================================================================== */
.cart-layout {
  max-width: 1000px;
  margin: 28px auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}
@media (max-width: 760px) {
  .cart-layout {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
}
.cart-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.cart-empty {
  text-align: center;
  padding: 60px 20px;
}
.cart-empty .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}
.cart-empty h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.cart-empty p {
  color: var(--text-gray);
  margin-bottom: 24px;
}
.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cart-item-info {
  flex: 1;
}
.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-brand {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cart-item-price {
  font-weight: 800;
  font-size: 1rem;
  margin-top: 4px;
  color: var(--primary);
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-dark);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s;
}
.qty-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.qty-num {
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  color: var(--text-dark);
}
.btn-remove {
  background: none;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  transition: 0.15s;
}
.btn-remove:hover {
  color: var(--red-stock);
  background: var(--red-stock-bg);
}
.cart-subtotal {
  font-size: 12.5px;
  color: var(--text-gray);
  margin-top: 4px;
}
.btn-checkout-enterprise {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s;
  border: none;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 12px rgba(18, 97, 159, 0.25);
}
.btn-checkout-enterprise:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(18, 97, 159, 0.35);
}

/* ==========================================================================
   CHECKOUT
   ========================================================================== */
.checkout-layout {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
}
@media (max-width: 840px) {
  .checkout-layout {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
}
.checkout-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.checkout-card h2 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
}
.step-number {
  background: var(--primary);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

/* Modalidad de entrega */
.entrega-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 680px) {
  .entrega-tabs {
    grid-template-columns: 1fr;
  }
}
.entrega-tab {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--surface-muted);
}
.entrega-tab.active {
  border-color: var(--primary);
  background: rgba(18, 97, 159, 0.06);
}
.entrega-tab .entrega-icon {
  font-size: 1.8rem;
}
.entrega-tab .entrega-nombre {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dark);
}
.entrega-tab .entrega-desc {
  font-size: 11.5px;
  color: var(--text-gray);
}
.panel-entrega.hidden {
  display: none;
}

/* Método de pago */
.pago-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.pago-tab {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface-muted);
}
.pago-tab.active {
  border-color: var(--primary);
  background: rgba(18, 97, 159, 0.06);
}
.pago-tab .pago-icon {
  font-size: 2rem;
}
.pago-tab .pago-nombre {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-dark);
}
.pago-tab .pago-desc {
  font-size: 11.5px;
  color: var(--text-gray);
}

/* Datos de pago */
.pago-datos {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.pago-datos.hidden {
  display: none;
}
.pago-datos h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}
.pago-dato-fila {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.pago-dato-fila:last-child {
  border-bottom: none;
}
.pago-dato-fila .label {
  color: var(--text-gray);
}
.pago-dato-fila .value {
  font-weight: 700;
  color: var(--text-dark);
}

/* Resumen del pedido */
.order-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.order-item:last-child {
  border-bottom: none;
}
.order-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border);
}
.order-item-info {
  flex: 1;
}
.order-item-name {
  font-size: 12.5px;
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.order-item-qty {
  font-size: 11.5px;
  color: var(--text-gray);
}
.order-item-price {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
  white-space: nowrap;
}
.order-total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-body);
}
.order-total-row.total {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  border-top: 2px solid var(--primary);
  padding-top: 14px;
  margin-top: 6px;
}

/* Upload comprobante */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 8px;
}
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(18, 97, 159, 0.04);
}
.upload-area .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.upload-area p {
  color: var(--text-gray);
  font-size: 13px;
}
.upload-area .upload-hint {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 6px;
}
.upload-preview {
  display: none;
  text-align: center;
  padding: 12px;
  background: var(--green-stock-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(5, 150, 105, 0.3);
}
.upload-preview.visible {
  display: block;
}
.upload-preview span {
  color: var(--green-stock);
  font-size: 13px;
  font-weight: 600;
}

/* Términos y condiciones checkbox (checkout) */
.tyc-wrapper {
  margin: 24px 0;
  padding: 20px 22px;
  background: rgba(18, 97, 159, 0.04);
  border: 1px solid rgba(18, 97, 159, 0.2);
  border-radius: var(--radius-md);
  transition: 0.2s;
}
.tyc-wrapper.error-shake {
  border-color: var(--red-stock);
  background: var(--red-stock-bg);
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.tyc-check-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.tyc-checkbox-custom {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}
.tyc-checkbox-custom input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  cursor: pointer;
  margin: 0;
  z-index: 2;
}
.tyc-checkmark {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 5px;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tyc-checkbox-custom input:checked ~ .tyc-checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.tyc-checkmark::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0);
  transition: 0.15s;
}
.tyc-checkbox-custom input:checked ~ .tyc-checkmark::after {
  opacity: 1;
  transform: scale(1);
}
.tyc-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-body);
}
.tyc-text a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}
.tyc-text a:hover {
  color: var(--accent-blue);
}
.tyc-error-msg {
  display: none;
  margin-top: 10px;
  color: var(--red-stock);
  font-size: 12px;
  align-items: center;
  gap: 6px;
}
.tyc-error-msg.visible {
  display: flex;
}
.tyc-info {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botón confirmar pedido */
.btn-confirmar {
  width: 100%;
  padding: 15px;
  font-size: 14px;
  font-weight: 800;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(18, 97, 159, 0.25);
}
.btn-confirmar:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--primary-hover);
  box-shadow: 0 8px 24px rgba(18, 97, 159, 0.35);
}
.btn-confirmar:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  color: var(--text-gray);
  opacity: 0.6;
}
.btn-confirmar .lock-icon {
  font-size: 1rem;
}
.seguridad-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.seguridad-badge {
  font-size: 11px;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Alerta de horario */
.alerta-horario {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: 0.3s;
}
.alerta-horario.especial {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--text-body);
}
.alerta-horario.especial strong {
  color: var(--text-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: #f59e0b;
}
.alerta-horario.regular {
  background: rgba(18, 97, 159, 0.06);
  border: 1px solid rgba(18, 97, 159, 0.2);
  color: var(--text-body);
}
.alerta-horario.regular strong {
  color: var(--text-dark);
  font-weight: 800;
}
.alerta-horario-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.alerta-horario-content h5 {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
}
.alerta-horario-content p {
  margin: 0;
}

/* ==========================================================================
   PRODUCTO DETALLE
   ========================================================================== */
.detalle-container {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 30px;
}
.breadcrumb {
  font-size: 12.5px;
  color: var(--text-gray);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.detalle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .detalle-grid {
    grid-template-columns: 1fr;
  }
  .detalle-container {
    padding: 0 16px;
  }
}

.detalle-img-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  position: relative;
  box-shadow: var(--shadow-card);
}
.detalle-img-wrap img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.no-img-icon {
  font-size: 5rem;
  opacity: 0.4;
}

.detalle-info {
  display: flex;
  flex-direction: column;
}
.detalle-marca {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 8px;
}
.detalle-nombre {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text-dark);
}
.detalle-codigo {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 16px;
}
.detalle-precio {
  font-size: 2.4rem;
  font-weight: 900;
  margin: 16px 0;
  color: var(--primary);
}
.detalle-precio .currency {
  font-size: 1.2rem;
  color: var(--text-dark);
  font-weight: 700;
}
.detalle-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.detalle-badge {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-disponible {
  background: var(--green-stock-bg);
  color: var(--green-stock);
}
.badge-bajo {
  background: var(--amber-stock-bg);
  color: var(--amber-stock);
}
.badge-agotado {
  background: var(--red-stock-bg);
  color: var(--red-stock);
}
.badge-garantia {
  display: none;
}
.detalle-desc {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 20px;
}

.btn-add-full {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 4px 12px rgba(18, 97, 159, 0.25);
}
.btn-add-full:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--primary-hover);
}
.btn-add-full:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #cbd5e1;
}

/* Specs table */
.specs-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}
.specs-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
}
.specs-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--text-gray);
  font-weight: 700;
  background: var(--surface-muted);
  width: 38%;
  border-bottom: 1px solid var(--border);
}
.specs-table td {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
}
.specs-table tr:last-child th,
.specs-table tr:last-child td {
  border-bottom: none;
}

/* Skeleton loader for product */
.skeleton-line {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.4s infinite;
}
.specs-searching {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-gray);
  font-size: 13px;
  padding: 12px 0;
}
.spinner-sm {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   CONFIRMACIÓN DE PEDIDO
   ========================================================================== */
.confirmacion-wrap {
  max-width: 580px;
  margin: 50px auto;
  padding: 0 24px;
  text-align: center;
}
.confirmacion-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   TÉRMINOS Y CONDICIONES (ENTERPRISE)
   ========================================================================== */
.tyc-hero-enterprise {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--primary) 100%);
  border-bottom: 2px solid var(--primary);
  padding: 50px 40px;
  text-align: center;
}
.tyc-hero-enterprise h1 {
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 12px;
}
.tyc-hero-enterprise h1 span {
  color: #38bdf8;
}
.tyc-hero-enterprise p {
  color: #cbd5e1;
  font-size: 14px;
  max-width: 560px;
  margin: 0 auto 20px;
}
.tyc-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.tyc-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}
.tyc-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 97, 159, 0.1);
  border: 1px solid rgba(18, 97, 159, 0.25);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tyc-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 40px;
}
@media (max-width: 768px) {
  .tyc-layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .tyc-nav {
    display: none;
  }
}

.tyc-nav {
  position: sticky;
  top: 80px;
  align-self: start;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  height: fit-content;
  box-shadow: var(--shadow-card);
}
.tyc-nav h3 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-gray);
  margin-bottom: 14px;
}
.tyc-nav a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-body);
  text-decoration: none;
  transition: 0.15s ease;
  border-left: 2px solid transparent;
}
.tyc-nav a:hover,
.tyc-nav a.active {
  background: rgba(18, 97, 159, 0.06);
  color: var(--primary);
  border-left-color: var(--primary);
}

.tyc-content section {
  margin-bottom: 48px;
  scroll-margin-top: 80px;
}
.tyc-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-dark);
}
.tyc-content p,
.tyc-content li {
  color: var(--text-body);
  font-size: 14px;
  margin-bottom: 12px;
}
.tyc-content ul,
.tyc-content ol {
  padding-left: 20px;
}
.tyc-content li {
  margin-bottom: 8px;
}
.tyc-content strong {
  color: var(--text-dark);
}
.tyc-box {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 16px 0;
}
.tyc-box.important {
  border-left: 3px solid var(--primary);
}
.tyc-box.success {
  border-left: 3px solid var(--green-stock);
}
.tyc-box.warning {
  border-left: 3px solid var(--amber-stock);
}
.tyc-box h4 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.tyc-box.important h4 {
  color: var(--primary);
}
.tyc-box.success h4 {
  color: var(--green-stock);
}
.tyc-box.warning h4 {
  color: var(--amber-stock);
}
.tyc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.tyc-table th {
  background: var(--surface-muted);
  color: var(--text-dark);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--primary);
}
.tyc-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
}
.tyc-table tr:last-child td {
  border-bottom: none;
}
.tyc-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 40px 0;
}

/* ==========================================================================
   LIBRO DE RECLAMACIONES (ENTERPRISE)
   ========================================================================== */
.reclamaciones-container {
  max-width: 820px;
  margin: 28px auto;
  padding: 0 30px;
}
@media (max-width: 768px) {
  .reclamaciones-container {
    padding: 0 16px;
  }
}
