/* VALGO — Home Hero & Header v1.0
 * Hero editorial de imagen completa, header iconográfico y beneficios premium.
 * Compatible con Montserrat v1.2. No modifica el logotipo SVG.
 */

/* Utilidad accesible */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Evita que se vea el hero estático y luego el hero real. */
body.valgo-loading .hero-slides,
body.valgo-loading .hero-controls {
  visibility: hidden !important;
}

.hero {
  position: relative !important;
  min-height: clamp(510px, 64vw, 690px) !important;
  margin: clamp(18px, 2.3vw, 34px) clamp(18px, 4.2vw, 72px) 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: clamp(22px, 2vw, 34px) !important;
  background: #d9d0c3 !important;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: inherit;
  background:
    linear-gradient(105deg, rgba(245,238,230,.96), rgba(226,216,203,.88)),
    linear-gradient(90deg, #e8dfd4 0%, #d8ccbd 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

body.valgo-loading .hero::after {
  opacity: 1;
  animation: valgoHeroPulse 1.3s ease-in-out infinite alternate;
}

@keyframes valgoHeroPulse {
  from { filter: brightness(.98); }
  to { filter: brightness(1.045); }
}

.hero-slides,
.hero-slide {
  width: 100% !important;
  min-height: inherit !important;
  height: 100% !important;
}

.hero-slide {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  align-items: center !important;
  grid-template-columns: 1fr !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease !important;
}

.hero-slide.is-active {
  position: absolute !important;
  opacity: 1 !important;
  pointer-events: auto;
  z-index: 2;
}

.hero-art {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

.hero-art img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
  transform: scale(1.002);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg,
      rgba(10, 35, 27, .94) 0%,
      rgba(10, 35, 27, .86) 29%,
      rgba(10, 35, 27, .58) 48%,
      rgba(10, 35, 27, .18) 68%,
      rgba(10, 35, 27, 0) 82%);
  pointer-events: none;
}

.hero-copy {
  position: relative !important;
  z-index: 3 !important;
  align-self: center !important;
  width: min(680px, 53%) !important;
  max-width: none !important;
  padding: clamp(52px, 7vw, 100px) clamp(34px, 6.2vw, 104px) !important;
  color: #f8f3ed !important;
}

.hero-copy .eyebrow,
.hero-copy h1,
.hero-copy p {
  color: inherit !important;
  text-shadow: 0 2px 24px rgba(0,0,0,.18);
}

.hero-copy h1 {
  max-width: 13ch !important;
  margin: .5rem 0 1rem !important;
}

.hero-copy p {
  max-width: 55ch;
  font-size: clamp(.96rem, 1.25vw, 1.12rem) !important;
  line-height: 1.65 !important;
  opacity: .94;
}

.hero-copy .hero-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px !important;
  margin-top: clamp(20px, 2.4vw, 30px) !important;
}

.hero-copy .button.primary {
  background: #f5eee6 !important;
  color: #163328 !important;
  border-color: #f5eee6 !important;
}

.hero-copy .button.secondary {
  background: rgba(22, 51, 40, .22) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.76) !important;
  backdrop-filter: blur(8px);
}

.hero-copy .button:hover {
  transform: translateY(-1px);
}

.hero-controls {
  position: absolute !important;
  z-index: 6 !important;
  left: 50% !important;
  bottom: 18px !important;
  transform: translateX(-50%);
}

/* Header: acciones gráficas y compactas. */
.header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.header-icon-button {
  position: relative;
  display: inline-grid !important;
  place-items: center;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border: 1px solid rgba(22,51,40,.28) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.72) !important;
  color: #163328 !important;
  line-height: 1 !important;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.header-icon-button:hover {
  background: #f5eee6 !important;
  border-color: #163328 !important;
  transform: translateY(-1px);
}

.header-icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-cart-button svg {
  width: 23px;
  height: 23px;
}

.header-cart-button .valgo-bag-mark {
  stroke-width: 1.35;
}

.cart-count-badge {
  position: absolute !important;
  top: -5px;
  right: -4px;
  display: grid !important;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c6a164;
  color: #163328;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

/* Beneficios: tres tarjetas con identidad y contraste. */
.benefits--premium {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 18px clamp(18px, 4.2vw, 72px) clamp(28px, 4vw, 54px) !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.benefits--premium .benefit-card {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 118px;
  padding: 22px 24px !important;
  border: 1px solid transparent !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 35px rgba(22, 51, 40, .07);
  transition: transform .22s ease, box-shadow .22s ease;
}

.benefits--premium .benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(22, 51, 40, .12);
}

.benefit-card > div {
  display: grid;
  gap: 6px;
}

.benefit-card strong {
  display: block;
  font-size: .95rem;
  font-weight: 600 !important;
  letter-spacing: .035em;
}

.benefit-card span:not(.benefit-icon) {
  display: block;
  font-size: .82rem;
  line-height: 1.5;
  opacity: .82;
}

.benefit-icon {
  display: grid !important;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.benefit-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit-card--forest {
  background: #163328 !important;
  color: #f5eee6 !important;
}
.benefit-card--forest .benefit-icon {
  background: rgba(198,161,100,.18);
  color: #d9b873;
}

.benefit-card--gold {
  background: #e6cf9f !important;
  color: #163328 !important;
  border-color: rgba(130,96,39,.16) !important;
}
.benefit-card--gold .benefit-icon {
  background: rgba(255,255,255,.46);
}

.benefit-card--sage {
  background: #dce7df !important;
  color: #163328 !important;
  border-color: rgba(22,51,40,.1) !important;
}
.benefit-card--sage .benefit-icon {
  background: rgba(22,51,40,.09);
}

@media (max-width: 980px) {
  .hero {
    min-height: 570px !important;
    margin-inline: 22px !important;
  }
  .hero-copy {
    width: min(700px, 70%) !important;
    padding-inline: clamp(34px, 6vw, 64px) !important;
  }
  .hero-slide::before {
    background: linear-gradient(90deg, rgba(10,35,27,.94) 0%, rgba(10,35,27,.78) 42%, rgba(10,35,27,.25) 73%, transparent 100%);
  }
  .benefits--premium {
    margin-inline: 22px !important;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 16px !important;
  }
  .header-icon-button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }
  .hero {
    min-height: 610px !important;
    margin: 12px 12px 0 !important;
    border-radius: 24px !important;
  }
  .hero-art img {
    object-position: 62% center !important;
  }
  .hero-slide::before {
    background:
      linear-gradient(0deg,
        rgba(10,35,27,.96) 0%,
        rgba(10,35,27,.86) 34%,
        rgba(10,35,27,.34) 69%,
        rgba(10,35,27,.08) 100%);
  }
  .hero-copy {
    align-self: end !important;
    width: 100% !important;
    padding: 42px 24px 36px !important;
  }
  .hero-copy h1 {
    max-width: 14ch !important;
  }
  .hero-copy p {
    max-width: 42ch;
  }
  .benefits--premium {
    grid-template-columns: 1fr !important;
    margin: 12px 12px 34px !important;
  }
  .benefits--premium .benefit-card {
    min-height: 104px;
  }
}

@media (max-width: 430px) {
  .hero {
    min-height: 590px !important;
  }
  .hero-copy {
    padding: 34px 20px 30px !important;
  }
  .hero-copy .hero-actions {
    align-items: stretch;
  }
  .hero-copy .button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero::after,
  .header-icon-button,
  .benefit-card {
    transition: none !important;
    animation: none !important;
  }
}
