/* ==========================================================================
   COMPRAPROMOCIONALES.COM - ESTILOS CORPORATIVOS PREMIUM (STANDALONE CSS)
   100% Autónomo: No requiere CDN, carga en 0 ms en cualquier navegador.
   ========================================================================== */

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

:root {
  --primary: #1e3a8a;
  --primary-dark: #0f172a;
  --primary-light: #2563eb;
  --primary-subtle: #eff6ff;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --emerald: #10b981;
  --emerald-subtle: #ecfdf5;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px -6px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 40px -8px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LAYOUT GENERAL
   ========================================================================== */

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

/* Barra superior */
.top-bar {
  background-color: var(--primary-dark);
  color: #e2e8f0;
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.top-bar a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 20px;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo-img {
  height: 52px;
  max-height: 54px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}
.logo-container:hover .site-logo-img {
  transform: scale(1.02);
}

/* Barra de Navegación Oficial (Mismo diseño comprapromocionales.com: #00498F) */
.site-nav-bar {
  background-color: #00498F;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
}
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-menu::-webkit-scrollbar {
  display: none;
}
.nav-item {
  flex-shrink: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}
.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.nav-link.active {
  background-color: rgba(0, 0, 0, 0.2);
  color: #facc15;
  border-bottom-color: #facc15;
}
.nav-link-highlight {
  font-weight: 800;
}

/* Buscador central */
.header-search {
  flex: 1;
  max-width: 540px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: #f1f5f9;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}
.header-search input:focus {
  background-color: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.header-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-subtle);
  pointer-events: none;
}

/* Botones de acción cabecera */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-whatsapp-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--emerald-subtle);
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-whatsapp-header:hover {
  background-color: #d1fae5;
  transform: translateY(-1px);
}
.btn-quote-bag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.btn-quote-bag:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}
.bag-count-pill {
  background-color: var(--accent);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 9999px;
}

/* ==========================================================================
   SECCIÓN DE CATEGORÍAS PRINCIPALES CON IMAGEN (CUADRITOS VISUALES)
   ========================================================================== */

.category-showcase-section {
  padding: 30px 0 10px 0;
}
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}
.section-title-large {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}
.section-subtitle-muted {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.category-square-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 220px;
  height: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.category-square-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}
.category-square-card.active {
  border-color: var(--primary-light);
  background-color: var(--primary-subtle);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.category-card-img-box {
  width: 100%;
  max-width: 150px;
  height: 125px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 10px;
}
.category-card-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.category-square-card:hover .category-card-img {
  transform: scale(1.08);
}

.category-card-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  gap: 4px;
}
.category-card-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}
.category-seo-pill-link {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary-light);
  background: var(--primary-subtle);
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  padding: 2px 7px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.category-seo-pill-link:hover {
  background: var(--primary-light);
  color: #ffffff;
  border-color: var(--primary-light);
  transform: scale(1.05);
}
.btn-clear-cat {
  padding: 6px 14px;
  background-color: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-clear-cat:hover {
  background-color: #dbeafe;
}

.filter-own-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.filter-own-toggle:hover {
  border-color: #f59e0b;
  background: #fef3c7;
}
.filter-own-toggle input[type="checkbox"] {
  display: none;
}
.own-toggle-custom {
  width: 28px;
  height: 28px;
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.filter-own-toggle input[type="checkbox"]:checked + .own-toggle-custom {
  background: #f59e0b;
  color: #fff;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.own-toggle-text {
  display: flex;
  flex-direction: column;
}
.own-toggle-text strong {
  font-size: 12px;
  color: #92400e;
  font-weight: 800;
}
.own-toggle-text small {
  font-size: 10px;
  color: #b45309;
}

.badge-immediate-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
}
.badge-supplier-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
}

/* ==========================================================================
   CATÁLOGO: SIDEBAR Y GRID
   ========================================================================== */

.main-content {
  padding: 24px 0 60px 0;
}
.catalog-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  align-items: start;
}

/* Sidebar de filtros con scroll independiente */
.filter-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 130px;
  max-height: calc(100vh - 145px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.filter-sidebar::-webkit-scrollbar {
  width: 6px;
}
.filter-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.filter-sidebar::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}
.filter-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filter-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}
.btn-reset-filters {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn-reset-filters:hover {
  text-decoration: underline;
}

/* Switch / Toggle de Entrega Inmediata */
.immediate-switch-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}
.immediate-switch-box:hover {
  background: #fef3c7;
}
.immediate-switch-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.immediate-switch-title {
  font-size: 12px;
  font-weight: 800;
  color: #92400e;
}
.immediate-switch-sub {
  font-size: 10px;
  color: #b45309;
}

.filter-group {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}
.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.filter-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.badge-filter-tag {
  background-color: var(--emerald-subtle);
  color: #065f46;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Inputs de stock y volumen */
.input-with-suffix {
  position: relative;
}
.input-with-suffix input {
  width: 100%;
  padding: 10px 48px 10px 14px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s;
}
.input-with-suffix input:focus {
  border-color: var(--border-focus);
}
.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
}
.quick-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.btn-quick-chip {
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.btn-quick-chip:hover {
  background-color: #e2e8f0;
  color: var(--text-main);
}

/* Filtro de Colores */
.colors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.color-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}
.color-badge-btn:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.color-badge-btn.active {
  background-color: var(--primary-subtle);
  border-color: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}
.color-circle {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Rango de precio */
.price-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.price-inputs-grid input {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
}
.price-inputs-grid input:focus {
  border-color: var(--border-focus);
}

/* Selector de categoría */
.select-styled {
  width: 100%;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
}

/* ==========================================================================
   GRID DE PRODUCTOS Y TARJETAS
   ========================================================================== */

.catalog-header-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Indicador de recarga tipo barra de progreso superior */
.catalog-refresh-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #00498F, #3b82f6, #f59e0b, #00498F);
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.18s ease;
  z-index: 5;
}
.catalog-refresh-indicator.is-active {
  opacity: 1;
  transform: scaleX(1);
  animation: catalogProgressSweep 0.75s ease-in-out infinite;
}
@keyframes catalogProgressSweep {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.results-counter {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.results-counter.is-flashing {
  animation: counterFlash 0.35s ease;
}
@keyframes counterFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); color: #00498F; }
  100% { transform: scale(1); }
}

.filter-speed-badge {
  background-color: var(--primary-subtle);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  transition: all 0.2s ease;
}
.filter-speed-badge.is-active-pulse {
  background-color: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
  animation: badgePulse 0.4s ease-in-out infinite alternate;
}
@keyframes badgePulse {
  from { transform: scale(1); opacity: 0.85; }
  to { transform: scale(1.04); opacity: 1; }
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-control label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.sort-control select {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  outline: none;
}

/* Grid de tarjetas con transición de refresco */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}
.products-grid.is-refreshing {
  opacity: 0.35;
  filter: blur(1.5px);
  transform: translateY(6px);
  pointer-events: none;
}

/* Tarjeta individual */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

/* Badge de Entrega Inmediata */
.badge-immediate {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 2;
}

/* Imagen de tarjeta y efecto hover dinámico con imagen secundaria */
.product-card-img-wrapper {
  background-color: #f8fafc;
  height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
  text-decoration: none;
}
.product-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.product-card-img.primary-img {
  position: relative;
  z-index: 1;
}
.product-card-img.secondary-img {
  position: absolute;
  top: 16px;
  left: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  object-fit: contain;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}
.product-card:hover .product-card-img.primary-img.has-secondary {
  opacity: 0;
}
.product-card:hover .product-card-img.secondary-img {
  opacity: 1;
  transform: scale(1.06);
}
.product-card:hover .product-card-img:not(.has-secondary) {
  transform: scale(1.06);
}

.product-card-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-card-title-link:hover .product-card-title {
  color: var(--primary-light);
}

.stock-tag-float {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: #ffffff;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  z-index: 10;
  pointer-events: none;
}
.stock-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Info de tarjeta */
.product-card-body {
  padding: 16px;
}
.product-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-subtle);
  margin-bottom: 6px;
}
.product-card-sku {
  font-family: monospace;
  font-weight: 700;
  color: var(--text-muted);
}
.product-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  height: 38px;
}
.product-card-title:hover {
  color: var(--primary-light);
}

.color-dots-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 16px;
  margin-top: 6px;
}
.color-dot-small {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Footer tarjeta */
.product-card-footer {
  padding: 16px;
  padding-top: 0;
}
.price-block {
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  margin-bottom: 12px;
}
.price-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-subtle);
  display: block;
}
.price-amount {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-main);
}
.min-order-pill {
  display: inline-flex;
  align-items: center;
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
.price-subtext {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
}
.modal-pricing-disclaimer {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 10px;
  color: #1e3a8a;
}

.card-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-view-card {
  padding: 9px;
  background-color: #f1f5f9;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-view-card:hover {
  background-color: #e2e8f0;
}
.btn-quote-card {
  padding: 9px;
  background-color: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-quote-card:hover {
  background-color: var(--primary-dark);
}

/* Scroll Infinito */
.infinite-scroll-container {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}
.infinite-scroll-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}
.spinner-circle {
  width: 20px;
  height: 20px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinLoader 0.75s linear infinite;
}
@keyframes spinLoader {
  to { transform: rotate(360deg); }
}
.infinite-scroll-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
  background-color: #ffffff;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.infinite-scroll-end strong {
  color: var(--text-main);
}
.btn-back-to-top {
  padding: 8px 18px;
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-back-to-top:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   MODAL DE PRODUCTO
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
}
.modal-backdrop.open {
  display: block;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.product-modal.open {
  display: flex;
}
.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-subtle);
  cursor: pointer;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

#modal-prod-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
#modal-prod-desc strong {
  color: var(--text-main);
  font-weight: 700;
}
#modal-prod-desc p {
  margin: 0 0 8px 0;
}

.gallery-main-img-box {
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 12px;
}
.gallery-main-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gallery-thumbs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.gallery-thumb-item {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.gallery-thumb-item:hover {
  border-color: var(--primary-light);
}

.modal-config-box {
  background-color: var(--primary-subtle);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}
.btn-add-quote-modal {
  width: 100%;
  padding: 12px;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s;
}
.btn-add-quote-modal:hover {
  background-color: var(--primary-dark);
}

/* Tabla de variantes en modal */
.variants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}
.variants-table th {
  background-color: #f8fafc;
  padding: 6px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.variants-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
}

/* ==========================================================================
   DRAWER / BOLSA DE COTIZACIÓN
   ========================================================================== */

.quote-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100%;
  background: #ffffff;
  z-index: 250;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.quote-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}
.drawer-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.drawer-footer {
  padding: 20px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border);
}

.btn-whatsapp-send {
  width: 100%;
  padding: 14px;
  background-color: var(--emerald);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: background 0.2s, transform 0.15s;
  margin-bottom: 0;
}
.btn-whatsapp-send:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--primary-dark);
  color: #94a3b8;
  padding: 50px 0 25px 0;
  font-size: 12px;
  border-top: 1px solid #1e293b;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-title {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover {
  color: #ffffff;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
}

/* ==========================================================================
   RESPONSIVIDAD
   ========================================================================== */

@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .filter-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .category-cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: auto;
    padding: 10px 0;
    gap: 10px;
    flex-wrap: wrap;
  }
  .site-logo-img {
    height: 40px;
  }
  .header-search {
    order: 3;
    width: 100%;
    max-width: 100%;
    display: block;
    margin-top: 4px;
  }
  .nav-link {
    padding: 10px 12px;
    font-size: 12.5px;
  }
  .modal-body {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .product-card-img-wrapper {
    height: 160px;
  }
  .category-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .category-square-card {
    min-height: 180px;
    padding: 10px 6px;
  }
  .category-card-img-box {
    height: 90px;
    padding: 6px;
  }
}

@media (max-width: 480px) {
  .category-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
