/* ==========================================================
   CATALOGO.CSS — Página de productos con filtros
   Estilo Concesionaria: rojo / negro / gris / blanco
   Sin degradados · Tipografía Oswald + Inter · Bordes rectos
   ========================================================== */

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

:root {
  /* Paleta */
  --rojo: #d81e2c;
  --rojo-oscuro: #a8141f;
  --negro: #161616;
  --gris-90: #2e2e2e;
  --gris-60: #6f6f6f;
  --gris-30: #c9c9c9;
  --gris-15: #e2e2e2;
  --gris-10: #f0f0f0;
  --blanco: #ffffff;
  --fondo: #f7f7f7;

  /* Derivados */
  --rojo-suave: rgba(216, 30, 44, 0.07);
  --rojo-hover: rgba(216, 30, 44, 0.14);

  /* Bordes y sombras planas */
  --borde: 1px solid var(--gris-30);
  --borde-fuerte: 2px solid var(--negro);
  --sombra: 0 3px 12px rgba(0, 0, 0, 0.07);
  --sombra-hover: 0 8px 22px rgba(0, 0, 0, 0.12);

  --radio: 6px;
  --radio-sm: 3px;

  --transicion: all 0.22s ease;
  --transicion-lenta: all 0.4s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--fondo);
  color: var(--negro);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Oswald', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ==========================================================
   HEADER (coherente con el index)
   ========================================================== */
.top-bar {
  background: var(--negro);
  color: white;
  text-align: center;
  padding: 10px 0;
  font-weight: 600;
  font-size: 0.88rem;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 3px solid var(--rojo);
}

.top-bar span {
  display: inline-block;
  animation: scrollText 50s linear infinite;
}

@keyframes scrollText {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

header {
  background: var(--blanco);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border-bottom: 2px solid transparent;
  transition: var(--transicion);
}

header:hover {
  border-bottom-color: var(--rojo);
}

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

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
}

.logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transicion);
}

.logo:hover { transform: scale(1.02); }

.logo img {
  width: 220px;
  height: 50px;
  object-fit: contain;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-btn {
  background: var(--rojo);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radio-sm);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transicion);
  font-family: inherit;
  font-size: 0.9rem;
}

.contact-btn:hover {
  background: var(--rojo-oscuro);
  transform: translateY(-1px);
}

.phone-number {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gris-10);
  padding: 10px 18px;
  border-radius: var(--radio-sm);
  font-weight: 600;
  border: var(--borde);
  font-size: 0.9rem;
}

.phone-number i { color: var(--rojo); }

nav { display: flex; gap: 5px; }

nav a {
  color: var(--negro);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radio-sm);
  font-weight: 500;
  transition: var(--transicion);
  font-size: 0.95rem;
  border: 1px solid transparent;
}

nav a:hover {
  background: var(--rojo-suave);
  color: var(--rojo);
  border-color: var(--rojo);
}

nav a.active {
  background: var(--rojo);
  color: white;
  border-color: var(--rojo);
}

/* ==========================================================
   MAIN
   ========================================================== */
.catalog-main {
  padding: 20px 0 60px;
  min-height: 60vh;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--gris-60);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--gris-60);
  text-decoration: none;
  transition: var(--transicion);
}

.breadcrumb a:hover { color: var(--rojo); }

.breadcrumb span {
  color: var(--negro);
  font-weight: 600;
}

/* ==========================================================
   SEARCH
   ========================================================== */
.catalog-search {
  display: flex;
  gap: 0;
  background: white;
  border-radius: var(--radio);
  padding: 5px;
  box-shadow: var(--sombra);
  margin-bottom: 24px;
  max-width: 700px;
  transition: var(--transicion);
  border: 2px solid transparent;
}

.catalog-search:focus-within {
  border-color: var(--rojo);
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
  min-width: 0;
}

.search-icon {
  color: var(--gris-60);
  font-size: 0.95rem;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 0;
  background: transparent;
  min-width: 0;
  color: var(--negro);
}

.search-input::placeholder { color: var(--gris-30); }

.search-clear {
  background: none;
  border: none;
  color: var(--gris-30);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: var(--transicion);
}

.search-clear:hover {
  background: var(--gris-10);
  color: var(--rojo);
}

.search-btn {
  background: var(--rojo);
  color: white;
  border: none;
  padding: 12px 22px;
  border-radius: var(--radio-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transicion);
  font-family: inherit;
  font-size: 0.9rem;
}

.search-btn:hover {
  background: var(--rojo-oscuro);
}

.search-btn:active { transform: scale(0.97); }

/* ==========================================================
   LAYOUT
   ========================================================== */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* ==========================================================
   SIDEBAR DE FILTROS
   ========================================================== */
.catalog-sidebar {
  background: white;
  border-radius: var(--radio);
  padding: 20px;
  box-shadow: var(--sombra);
  border: var(--borde);
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rojo) var(--gris-10);
}

.catalog-sidebar::-webkit-scrollbar { width: 6px; }

.catalog-sidebar::-webkit-scrollbar-track {
  background: var(--gris-10);
  border-radius: 3px;
}

.catalog-sidebar::-webkit-scrollbar-thumb {
  background: var(--rojo);
  border-radius: 3px;
}

.filters-toggle-mobile {
  display: none;
  width: 100%;
  background: white;
  border: 2px solid var(--negro);
  color: var(--negro);
  padding: 12px;
  border-radius: var(--radio-sm);
  font-weight: 600;
  cursor: pointer;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transicion);
}

.filters-toggle-mobile:hover {
  background: var(--negro);
  color: white;
}

/* Filtros activos (chips) */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--rojo-suave);
  border-radius: var(--radio-sm);
  margin-bottom: 16px;
  align-items: center;
  border: 1px solid var(--rojo);
}

.active-filters-label {
  font-size: 0.75rem;
  color: var(--gris-90);
  font-weight: 600;
  width: 100%;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: white;
  color: var(--negro);
  border: 1px solid var(--rojo);
  padding: 4px 10px;
  border-radius: var(--radio-sm);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: var(--transicion);
}

.active-filter-chip:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: white;
}

.active-filter-chip i { font-size: 0.65rem; }

/* Grupos de filtro */
.filter-group {
  padding: 16px 0;
  border-bottom: 1px solid var(--gris-15);
}

.filter-group:last-of-type { border-bottom: none; }

.filter-title {
  font-size: 0.9rem;
  color: var(--negro);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-family: 'Oswald', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-title i {
  color: var(--rojo);
  font-size: 0.85rem;
}

.filter-search-mini { margin-bottom: 10px; }

.filter-mini-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gris-15);
  border-radius: var(--radio-sm);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transicion);
  background: var(--fondo);
  color: var(--negro);
}

.filter-mini-input:focus {
  border-color: var(--rojo);
  background: white;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-options.scrollable {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--gris-30) transparent;
}

.filter-options.scrollable::-webkit-scrollbar { width: 5px; }

.filter-options.scrollable::-webkit-scrollbar-thumb {
  background: var(--gris-30);
  border-radius: 3px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 0;
  transition: var(--transicion);
  color: var(--gris-60);
  user-select: none;
}

.filter-option:hover { color: var(--negro); }

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  accent-color: var(--rojo);
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.filter-option span {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.filter-option small {
  color: var(--gris-30);
  font-size: 0.75rem;
}

/* Rango de precio */
.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.price-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gris-15);
  border-radius: var(--radio-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  min-width: 0;
  background: var(--fondo);
  color: var(--negro);
  transition: var(--transicion);
}

.price-input:focus {
  border-color: var(--rojo);
  background: white;
}

.price-separator {
  color: var(--gris-60);
  font-weight: 600;
}

.price-presets {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.price-preset {
  background: none;
  border: none;
  color: var(--gris-60);
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radio-sm);
  font-family: inherit;
  transition: var(--transicion);
}

.price-preset:hover {
  background: var(--rojo-suave);
  color: var(--rojo);
}

/* Switch */
.filter-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.filter-switch input { display: none; }

.switch-slider {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--gris-30);
  border-radius: 11px;
  transition: var(--transicion);
  flex-shrink: 0;
}

.switch-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: var(--transicion);
}

.filter-switch input:checked + .switch-slider {
  background: var(--rojo);
}

.filter-switch input:checked + .switch-slider::before {
  transform: translateX(18px);
}

.switch-label {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-clear-filters {
  width: 100%;
  background: white;
  border: 2px solid var(--gris-30);
  color: var(--negro);
  padding: 10px;
  border-radius: var(--radio-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 15px;
  transition: var(--transicion);
  font-family: inherit;
}

.btn-clear-filters:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: white;
}

/* ==========================================================
   RESULTADOS
   ========================================================== */
.catalog-results { min-width: 0; }

.catalog-toolbar {
  background: white;
  border-radius: var(--radio);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: var(--sombra);
  border: var(--borde);
  flex-wrap: wrap;
  gap: 12px;
}

.results-info {
  font-size: 0.9rem;
  color: var(--gris-60);
  font-weight: 500;
}

.results-info strong {
  color: var(--negro);
  font-weight: 700;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  background: var(--gris-10);
  border-radius: var(--radio-sm);
  padding: 3px;
  border: 1px solid var(--gris-15);
}

.view-btn {
  background: none;
  border: none;
  padding: 7px 12px;
  border-radius: var(--radio-sm);
  cursor: pointer;
  color: var(--gris-60);
  transition: var(--transicion);
  font-size: 0.9rem;
}

.view-btn.active {
  background: var(--rojo);
  color: white;
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gris-60);
}

.sort-select {
  border: 1px solid var(--gris-15);
  border-radius: var(--radio-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  background: white;
  color: var(--negro);
  outline: none;
  transition: var(--transicion);
}

.sort-select:focus { border-color: var(--rojo); }

/* Loader */
.catalog-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 15px;
}

.catalog-loader i { color: var(--rojo); }

.catalog-loader p {
  color: var(--gris-60);
  font-size: 0.9rem;
}

/* ==========================================================
   GRID DE PRODUCTOS
   ========================================================== */
.products-grid {
  display: grid;
  gap: 18px;
}

.products-grid.vista-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.products-grid.vista-list {
  grid-template-columns: 1fr;
}

/* Card producto */
.product-card {
  background: white;
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: var(--transicion);
  cursor: pointer;
  border: var(--borde);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: fadeInUp 0.4s ease-out both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.product-card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--gris-10);
  overflow: hidden;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img { transform: scale(1.05); }

/* Badges en card */
.property-badge {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  border-radius: var(--radio-sm);
  font-weight: 700;
  font-size: 0.62rem;
  z-index: 2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: 'Oswald', Arial, sans-serif;
}

.badge-oferta {
  background: var(--rojo);
  color: white;
  right: 10px;
}

.badge-destacado {
  background: var(--negro);
  color: white;
  left: 10px;
}

.badge-nuevo {
  background: white;
  color: var(--negro);
  border: 1px solid var(--negro);
  left: 10px;
  top: 38px;
}

/* Stock badge */
.stock-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: var(--radio-sm);
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stock-out {
  background: var(--rojo);
  color: white;
}

.stock-low {
  background: var(--negro);
  color: white;
}

.product-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  border-top: var(--borde);
}

.product-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--negro);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  transition: var(--transicion);
}

.product-card:hover .product-card-title { color: var(--rojo); }

.product-card-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 18px;
}

.product-card-chips:empty { display: none; }

.property-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--gris-10);
  color: var(--gris-90);
  padding: 2px 8px;
  border-radius: var(--radio-sm);
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--gris-15);
}

.property-chip i {
  color: var(--rojo);
  font-size: 0.6rem;
  flex-shrink: 0;
}

.product-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rojo);
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-family: 'Oswald', Arial, sans-serif;
}

.product-card-old-price {
  font-size: 0.75rem;
  color: var(--gris-60);
  text-decoration: line-through;
  font-weight: 500;
  font-family: 'Inter', Arial, sans-serif;
}

/* Vista lista */
.vista-list .product-card {
  flex-direction: row;
}

.vista-list .product-card-img-wrapper {
  width: 180px;
  min-width: 180px;
  aspect-ratio: 1 / 1;
}

.vista-list .product-card-body {
  padding: 16px 20px;
  justify-content: center;
  border-top: none;
  border-left: var(--borde);
}

.vista-list .product-card-title {
  font-size: 1.05rem;
  -webkit-line-clamp: 3;
  min-height: auto;
}

/* Sin resultados */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  border: var(--borde);
}

.no-results i {
  font-size: 3.5rem;
  color: var(--gris-30);
  margin-bottom: 16px;
}

.no-results h3 {
  color: var(--negro);
  margin-bottom: 8px;
  font-size: 1.15rem;
  font-family: 'Oswald', Arial, sans-serif;
  text-transform: uppercase;
}

.no-results p {
  color: var(--gris-60);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.no-results .btn-clear-filters {
  max-width: 250px;
  margin: 0 auto;
}

/* Paginación */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radio-sm);
  background: white;
  border: 1px solid var(--gris-15);
  color: var(--negro);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transicion);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--rojo);
  color: var(--rojo);
}

.page-btn.active {
  background: var(--rojo);
  color: white;
  border-color: var(--rojo);
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-dots {
  color: var(--gris-60);
  padding: 0 5px;
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer {
  background: var(--negro);
  color: white;
  padding: 60px 20px 20px;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--rojo);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-col h4 {
  color: white;
  margin-bottom: 18px;
  font-size: 1.05rem;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 35px;
  height: 3px;
  background: var(--rojo);
  transition: width 0.3s ease;
}

.footer-col:hover h4::after { width: 60px; }

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  font-size: 0.9rem;
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transicion);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--rojo);
  transform: translateX(4px);
}

.footer-links i { color: var(--rojo); }

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.social-links a {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  width: 38px;
  height: 38px;
  border-radius: var(--radio-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transicion);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.social-links a:hover {
  background: var(--rojo);
  border-color: var(--rojo);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 968px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .filters-toggle-mobile { display: flex; }

  .filters-content {
    display: none;
    margin-top: 15px;
  }

  .filters-content.open { display: block; }

  .nav-mobile { display: block; }

  nav {
    display: none;
    width: 100%;
    flex-direction: column;
    background: white;
    padding: 15px;
    border-radius: var(--radio);
    margin-top: 10px;
    box-shadow: var(--sombra-hover);
    border: var(--borde);
  }

  nav.open { display: flex; }

  nav a {
    text-align: center;
    padding: 12px;
    color: var(--negro);
  }

  .contact-info {
    order: 3;
    width: 100%;
    justify-content: center;
    max-height: 100px;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
  }

  .contact-info.hidden-on-scroll {
    opacity: 0;
    max-height: 0;
  }
}

@media (max-width: 768px) {
  .products-grid.vista-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-right {
    justify-content: space-between;
  }

  .vista-list .product-card-img-wrapper {
    width: 120px;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .products-grid.vista-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .breadcrumb { display: none; }

  .product-card-body { padding: 10px; }
  .product-card-title { font-size: 0.82rem; }
  .product-card-price { font-size: 0.95rem; }

  .sort-wrapper label { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links a { justify-content: center; }
  .social-links { justify-content: center; }
  .footer-col h4::after { left: 50%; transform: translateX(-50%); }
}

/* ==========================================================
   ACCESIBILIDAD
   ========================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.filter-option:focus-visible,
.page-btn:focus-visible {
  outline: 2px solid var(--rojo);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}