/* =============================================================================
   EVERGREEN TECHNOLOGIES C.A. — TIENDA MAYORISTA B2B (SUITE FLOYDIA V11.0)
   Estructura homologada con arquitectura WattSaver Tienda V34
   ============================================================================= */

html, body {
  overflow-x: clip;
}

:root {
  --ev-header-total-height: 101px;
}
@media (max-width: 768px) {
  :root {
    --ev-header-total-height: 51px;
  }
}
@media (max-width: 640px) {
  :root {
    --ev-header-total-height: 51px;
  }
}

/* 1. BARRA DE DEPARTAMENTOS CON SCROLL SNAP Y FLECHAS */
.dept-bar {
  background: var(--ev-green-dark, #072517);
  border-bottom: 2px solid var(--ev-green-brand, #008751);
  color: #FFFFFF;
  position: sticky;
  top: var(--ev-header-total-height, 101px);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: top 0.2s ease;
}

.dept-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  overflow: hidden;
}

.dept-title {
  font-family: var(--ev-font-mono, monospace);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  color: #86EFAC;
}

.dept-scroll-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
}

.dept-scroll {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px;
  cursor: grab;
  user-select: none;
}
.dept-scroll::-webkit-scrollbar { display: none; }

.dept-pill {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.dept-pill:hover, .dept-pill.is-active {
  background: var(--ev-green-brand, #008751);
  border-color: #34D399;
  color: #FFFFFF;
}

.dept-pill small {
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 11px;
  font-family: var(--ev-font-mono, monospace);
}

.dept-scroll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #E2E8F0;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.dept-scroll-btn:hover {
  background: var(--ev-green-brand, #008751);
  color: #FFFFFF;
}

/* 2. BUSCADOR EN VIVO Y BARRA DE FILTROS */
.store-toolbar {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  padding: 14px 0;
}

.toolbar-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-box {
  position: relative;
  flex: 1 1 260px;
  max-width: 440px;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: #64748B;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #0F172A;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
  border-color: #008751;
  box-shadow: 0 0 0 3px rgba(0, 135, 81, 0.15);
}

.filter-row-snap {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
}
.filter-row-snap::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  scroll-snap-align: start;
  white-space: nowrap;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.filter-pill:hover, .filter-pill.is-active {
  background: #008751;
  border-color: #008751;
  color: #FFFFFF;
}

.sort-select {
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #0F172A;
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: #008751; }

/* 3. GRID DE PRODUCTOS Y TARJETAS */
.store-section {
  padding: 32px 0 64px;
  background: #FFFFFF;
}

.catalog-grid,
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}

.product-card {
  min-width: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 440px;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: #008751;
}

.product-media {
  position: relative;
  background: #FFFFFF;
  padding: 16px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #F1F5F9;
  overflow: hidden;
}

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 25;
  pointer-events: none;
  font-variant-ligatures: none;
  background: #F0FDF4;
  color: #007A49;
  border: 1px solid #86EFAC;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: var(--ev-font-mono, monospace);
}

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

.product-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.product-sku {
  font-family: var(--ev-font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
}

.product-warranty {
  font-size: 10.5px;
  color: #007A49;
  font-weight: 700;
  background: #F0FDF4;
  padding: 1px 6px;
  border-radius: 3px;
}

.product-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 8px;
  min-height: 40px;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.spec-pill {
  font-size: 11px;
  background: #F1F5F9;
  color: #334155;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.price-block {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

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

.price-usd {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
}

.price-ves {
  font-size: 12px;
  color: #007A49;
  font-weight: 700;
  margin-top: 1px;
}

.price-box-note {
  font-size: 10.5px;
  color: #64748B;
  text-align: right;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
}

.qty button {
  background: transparent;
  border: none;
  width: 28px;
  height: 34px;
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  cursor: pointer;
  transition: background 0.15s;
}
.qty button:hover { background: #F1F5F9; color: #008751; }

.qty span {
  min-width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
}

.btn-add {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.btn-wa-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #25D366;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
  transition: filter 0.15s;
}
.btn-wa-icon:hover { filter: brightness(1.08); }
.btn-wa-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* 4. RESPONSIVE */
@media (max-width: 768px) {
  .dept-title { display: none; }
  .dept-bar { top: var(--ev-header-total-height, 51px); }
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .product-media { height: 160px; padding: 8px; }
  .product-body { padding: 12px; }
  .product-title { font-size: 13.5px; min-height: 36px; }
  .price-usd { font-size: 17px; }
  .spec-row { display: none; }
  .product-actions { flex-wrap: wrap; }
  .qty { width: 100%; justify-content: space-between; }
  .qty button { flex: 1; }
  .btn-add { width: 100%; }
}

/* =============================================================================
   HERO BANNER COMPACTO B2B DE LA TIENDA (HIGH-CONTRAST & ZERO-CLS)
   ============================================================================= */
.store-hero-banner {
  position: relative !important;
  overflow: hidden !important;
  width: 100%;
  min-height: 175px;
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  background-color: var(--ev-brand-surface, #072517);
  border-bottom: 2px solid var(--ev-green-brand, #008751);
  box-shadow: inset 0 -6px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  padding: 1.5rem 0;
}

.store-hero-overlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  pointer-events: none !important;
  background: linear-gradient(90deg, rgba(7, 37, 23, 0.42) 0%, rgba(7, 37, 23, 0.22) 60%, rgba(7, 37, 23, 0.08) 100%);
  z-index: 1;
}

.store-hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-left: var(--ev-space-6, 1.5rem);
  padding-right: var(--ev-space-6, 1.5rem);
}

.store-hero-content {
  max-width: 860px;
}

.store-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86EFAC;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
  backdrop-filter: blur(4px);
}

.store-hero-title {
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  margin: 0 0 8px 0;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.store-hero-desc {
  font-size: clamp(0.82rem, 1vw, 0.92rem);
  color: #E2E8F0;
  line-height: 1.45;
  margin: 0 0 12px 0;
  max-width: 720px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.store-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.store-feat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #F1F5F9;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .store-hero-banner {
    min-height: 145px;
    padding: 1.25rem 0;
  }
  .store-hero-title {
    font-size: 1.2rem;
  }
  .store-hero-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.80rem;
    margin-bottom: 8px;
  }
  .store-feat-item {
    font-size: 11px;
    padding: 2px 6px;
  }
}

/* 7. FRANJA DE CONFIANZA Y CONDICIONES B2B */
.store-results-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--ev-text-muted, #64748B);
  white-space: nowrap;
}

.store-features {
  background: var(--ev-bg-sunken, #F8FAFC);
  border-top: 1px solid var(--ev-border-subtle, #E2E8F0);
  padding: 40px 0;
}

.store-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.store-feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.store-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ev-accent-light, rgba(4, 120, 87, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ev-action-primary, #047857);
  flex-shrink: 0;
}

.store-feature-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ev-text-primary, #0F172A);
  margin: 0 0 4px 0;
}

.store-feature-desc {
  font-size: 13px;
  color: var(--ev-text-muted, #64748B);
  line-height: 1.4;
  margin: 0;
}
