/* Sección 5 — Nuestros Productos (El Core) */
.products {
  position: relative;
  padding: var(--section-padding) var(--gutter);
  background-color: var(--background);
}

.products__intro {
  max-width: var(--container-max);
  margin: 0 auto 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.products__eyebrow {
  font-family: var(--font-annotation);
  font-size: 16px;
  font-weight: 100;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 16px;
}

.products__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.15;
  max-width: 22ch;
}

.products__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.products__filter-btn {
  position: relative;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--on-surface-variant);
  background: var(--surface);
  border: 1px solid #a8760a85;
  border-radius: 5px;
  padding: 10px 22px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.products__filter-btn:hover {
  color: var(--on-surface);
  border-color: var(--outline);
}

.products__filter-btn--active {
  color: #fff;
  background: #a8760a;
  border-radius: 5px;
}

.products__stack {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
}

.products__panel {
  position: sticky;
  top: 180px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  background-color: var(--surface-container);
  will-change: transform, opacity, filter;
}

.products__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    url("../images/icons/tornillo.svg"),
    url("../images/icons/tornillo.svg"),
    url("../images/icons/tornillo.svg"),
    url("../images/icons/tornillo.svg");
  background-repeat: no-repeat;
  background-size: 24px 24px;
  background-position:
    top 12px left 12px,
    top 12px right 12px,
    bottom 12px left 12px,
    bottom 12px right 12px;
}

.products__panel + .products__panel {
  margin-top: 32px;
}

.products__panel:nth-of-type(1) { z-index: 1; }
.products__panel:nth-of-type(2) { z-index: 2; }
.products__panel:nth-of-type(3) { z-index: 3; }
.products__panel:nth-of-type(4) { z-index: 4; }
.products__panel:nth-of-type(5) { z-index: 5; }
.products__panel:nth-of-type(6) { z-index: 6; }
.products__panel:nth-of-type(7) { z-index: 7; }
.products__panel:nth-of-type(8) { z-index: 8; }
.products__panel:nth-of-type(9) { z-index: 9; }
.products__panel:nth-of-type(10) { z-index: 10; }
.products__panel:nth-of-type(11) { z-index: 11; }
.products__panel:nth-of-type(12) { z-index: 12; }
.products__panel:nth-of-type(13) { z-index: 13; }

.products__panel--lactea,
.products__panel--agro,
.products__panel--vial,
.products__panel--electrica {
  background-color: #00295ee8;
  border-color: var(--primary);
  backdrop-filter: blur(10px);
}

.products__panel--hidden {
  display: none;
}

.products__panel--limit-hidden {
  display: none;
}

.products__more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.products__more-btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--on-surface);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px 4px;
}

.products__more-btn:hover {
  color: var(--primary);
}

.products__more--hidden {
  display: none;
}

.products__panel-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 24px;
  min-height: 568px;
  padding: 48px 48px;
}

.products__col {
  display: flex;
  flex-direction: column;
  align-content: flex-end;
  align-items: center;
  margin-right: 20px;
}

.products__col--left {
  gap: 0px;
}

.products__category-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--on-surface-variant);
}

.products__category-text {
  display: block;
  text-align: center;
}

.products__category {
  font-family: var(--font-annotation);
  font-size: 16px;
  font-weight: 100;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  /* border: 1px solid var(--outline-variant); */
  width: fit-content;
  padding: 8px 0px;
}

.products__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.products__cta-primary {
  width: fit-content;
  padding: 16px 32px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--on-primary);
  background: var(--primary);
}

.products__cta-primary::before {
  content: none;
}

.products__cta-primary .btn-frame__light {
  box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.85);
}

.products__cta-primary:hover {
  filter: drop-shadow(0 0 4px var(--primary));
}

.products__cta-secondary {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--on-surface-variant);
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.7;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.products__cta-secondary:hover {
  opacity: 1;
  color: var(--on-surface);
}

.products__col--model {
  position: relative;
  height: 480px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products__model {
  width: 90%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  --poster-color: transparent;
}

.products__model--tilt {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.products__col--right {
  gap: 16px;
}

.products__product-label {
  font-family: var(--font-annotation);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  align-self: baseline;
}

.products__product-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.2;
}

.products__product-desc {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-surface-variant);
  max-width: 42ch;
}

@media (max-width: 1024px) {
  .products__panel-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 20px 15px;
    text-align: left;
  }

  .products__col--model {
    height: 360px;
    order: -1;
  }
}

@media (max-width: 860px) {
  .products__eyebrow {
    text-align: center;
  }

  .products__filters {
    justify-content: center;
  }

  .products__panel {
    position: static;
  }

  .products__col--right {
    order: 0;
  }

  .products__col--left {
    order: 1;
  }

  .products__col--model {
    height: auto;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .products__col--left {
    margin-right: 0;
    margin-bottom: 20px;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .products__title {
    font-size: 27px;
  }
}
