body.page-productos .hero {
  background-size: cover;
  background-position: center;
  min-height: clamp(60vh, 70vh, 80vh);
}

body.page-productos .hero h1 {
  font-size: clamp(2.8rem, 5.6vw, 4.4rem);
  line-height: 1.05;
}

body.page-productos .hero .section-title {
  font-size: 1rem;
  letter-spacing: 0.4rem;
}

body.page-productos .hero p {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}

body.page-productos .hero::before {
  background: linear-gradient(120deg, rgba(var(--brand-caramel-rgb), 0.9), rgba(var(--brand-orange-rgb), 0.35));
}

body.theme-dark.page-productos .hero::before {
  background: linear-gradient(135deg, rgba(6, 6, 10, 0.9), rgba(var(--brand-orange-rgb), 0.25));
}

.productos-hero {
  background-image: url('../../assets/img/obrador/hero_productos.jpg');
}

.catalogo {
  padding: 2.5rem 0 1rem;
}

.filters-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.35rem 1.6rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(var(--brand-cream-rgb), 0.75), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(var(--brand-amber-rgb), 0.22);
  box-shadow: 0 18px 35px rgba(139, 77, 2, 0.12);
}

.filters-header {
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.filters-header .section-title {
  margin-bottom: 0.4rem;
}

.filters-header .section-heading {
  margin-bottom: 0.5rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.filter-chip {
  border: 1px solid rgba(var(--brand-orange-rgb), 0.2);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-dark);
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(139, 77, 2, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(139, 77, 2, 0.14);
}

.filter-chip.active {
  background: linear-gradient(135deg, rgba(var(--brand-orange-rgb), 0.95), rgba(var(--brand-yellow-rgb), 0.85));
  border-color: transparent;
  color: #1a1510;
  box-shadow: 0 18px 30px rgba(var(--brand-orange-rgb), 0.35);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(var(--brand-amber-rgb), 0.35);
  box-shadow: 0 14px 24px rgba(139, 77, 2, 0.12);
}

.search-box i {
  color: var(--color-primary);
  font-size: 1rem;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  min-width: 0;
  width: 100%;
  flex: 1;
  color: inherit;
}

.search-box:focus-within {
  border-color: rgba(var(--brand-orange-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), 0.18), 0 16px 28px rgba(139, 77, 2, 0.16);
}

body.theme-dark .search-box {
  background: rgba(18, 17, 23, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .filter-chip {
  background: rgba(22, 20, 27, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fdf7ed;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.35);
}

body.theme-dark .filter-chip.active {
  background: linear-gradient(135deg, rgba(var(--brand-orange-rgb), 0.85), rgba(var(--brand-yellow-rgb), 0.75));
  border-color: transparent;
  color: #1a1510;
}

body.theme-dark .filters-hero {
  background: linear-gradient(135deg, rgba(16, 15, 20, 0.95), rgba(26, 24, 32, 0.95));
  border-color: rgba(255, 255, 255, 0.08);
}

.products-section {
  position: relative;
  padding: 3rem 0 2rem;
}

.products-section + .products-section {
  margin-top: 2.5rem;
  padding-top: 3.5rem;
}

.section-top {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 2rem;
  padding: 1.4rem 1.6rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 249, 240, 0.95), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(var(--brand-amber-rgb), 0.18);
  box-shadow: 0 18px 30px rgba(139, 77, 2, 0.08);
  width: 100%;
  text-align: center;
}

.section-top::before {
  content: '';
  position: absolute;
  top: 0.9rem;
  left: 50%;
  width: 100px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--brand-orange-rgb), 0.7), rgba(var(--brand-yellow-rgb), 0.7));
  opacity: 0.65;
  transform: translateX(-50%);
}

.section-top::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(var(--brand-cream-rgb), 0.28), transparent 60%);
  opacity: 0.55;
  pointer-events: none;
}

.section-top > * {
  position: relative;
  z-index: 1;
}

.section-top .section-title {
  margin-bottom: 0.35rem;
}

body.theme-dark .section-top {
  background: linear-gradient(135deg, rgba(20, 18, 26, 0.95), rgba(16, 15, 21, 0.95));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.theme-dark .section-top::after {
  background: radial-gradient(circle at 15% 20%, rgba(var(--brand-orange-rgb), 0.18), transparent 55%);
}

body.theme-dark .section-top .section-title {
  color: rgba(var(--brand-yellow-rgb), 0.85);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.product-card {
  padding: 2.4rem;
}

.product-card h3 {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.product-card .card-thumb {
  height: 260px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22px;
}

.product-features {
  margin: 0 0 1rem;
  padding-left: 1rem;
  color: var(--color-muted);
}

.product-features li {
  margin-bottom: 0.35rem;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-specs li {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
}

body.theme-dark .product-specs li {
  border-color: rgba(255, 255, 255, 0.12);
}

.tag-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

body.theme-dark .tag-list li {
  background: rgba(255, 255, 255, 0.07);
}

.product-card.is-hidden {
  display: none;
}

.products-section.is-hidden {
  display: none;
}

.modal h3 {
  margin-top: 0;
}

.modal .spec-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.5rem;
}

.modal .spec-list li {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
}

body.theme-dark .modal .spec-list li {
  background: rgba(255, 255, 255, 0.07);
}

.modal .cta-row {
  justify-content: flex-start;
}

/* --------- Detail pages --------- */
.product-detail {
  padding: 4rem 0 6rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.product-detail figure {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.detail-meta {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.detail-meta-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.detail-meta-item strong {
  min-width: 120px;
}

body.theme-dark .detail-meta-item {
  border-color: rgba(255, 255, 255, 0.12);
}

.detail-tabs {
  margin-top: 2rem;
  border-radius: 26px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 2rem;
}

.detail-tabs h3 {
  margin-top: 0;
}

.detail-tabs ul {
  padding-left: 1.2rem;
}

.cta-banner {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(var(--brand-orange-rgb), 0.22), rgba(var(--brand-yellow-rgb), 0.32));
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.hero-emp-grande {
  background-image: url('../../assets/img/118.Lunch_Ternera_2-scaled.jpg');
}

.hero-emp-peque {
  background-image: url('../../assets/img/215.Integral_3-scaled.jpg');
}

.hero-emp-mini {
  background-image: url('../../assets/img/117.Mini_Queso-Ceb_Caramelizada-1-scaled.jpg');
}

.hero-cocas {
  background-image: url('../../assets/img/1976-scaled.jpg');
}

@media (max-width: 768px) {
  .filters-hero {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1.1rem 1.2rem;
  }

  .search-box {
    width: 100%;
  }

  .detail-tabs {
    padding: 1.5rem;
  }

  .cta-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .products-section + .products-section {
    margin-top: 1.75rem;
    padding-top: 2.5rem;
  }

  .section-top {
    padding: 1rem 1.1rem 0.95rem;
  }

  .section-top::before {
    left: 1.1rem;
    width: 90px;
  }

  .filter-chip {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }

  .search-box {
    padding: 0.5rem 0.75rem;
  }

  .products-grid {
    gap: 1.5rem;
  }

  .product-card {
    padding: 1.8rem;
  }

  .product-card .card-thumb {
    height: 210px;
  }

  .detail-meta-item {
    flex-direction: column;
    gap: 0.35rem;
  }

  .detail-meta-item strong {
    min-width: 0;
  }

  .cta-banner {
    padding: 1.5rem;
  }
}
