/* ==========================================================================
   Hero Section — karmatistore.com
   ========================================================================== */

:root {
  --hero-purple:  #7b2c2d;
  --hero-gold:    #C9A84C;
  --hero-white:   #FFFFFF;
  --hero-overlay: rgba(0, 0, 0, 0.30);
}

/* --------------------------------------------------------------------------
   Wrapper — breakout 100vw.
   - Desktop  ≥901px : min-height 80vh (~864px) — niente zoom sul
     viewport standard; l'immagine 3:2 viene coperta con crop leggero
     top/bottom dall'object-fit cover dell' <img>.
   - Tablet   601-900 : aspect-ratio 4/3
   - Mobile   ≤600px : aspect-ratio 4/5 (frame portrait per art-direction)
   -------------------------------------------------------------------------- */
.karmati-hero {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
}

#main { overflow-x: hidden; }

/* --------------------------------------------------------------------------
   Background slideshow
   -------------------------------------------------------------------------- */
.karmati-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #d9c8b0;
}

.karmati-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  z-index: 1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Slides — <picture> wrapper + <img> interno.
   <picture> è il container posizionato; <img> lo riempie con cover.
   Niente bande: l'immagine riempie sempre il box del suo breakpoint.
   -------------------------------------------------------------------------- */
.karmati-hero__slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 0;
  pointer-events: none;
}

.karmati-hero__slide.active { opacity: 1; }

.karmati-hero__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* --------------------------------------------------------------------------
   Dots — FUORI da __bg, posizionati relativi a .karmati-hero
   z-index: 10 per stare sopra __content (z-index: 2) e __bg (z-index: 0)
   -------------------------------------------------------------------------- */
.karmati-hero__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  pointer-events: auto;
}

.karmati-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, border-color 0.3s;
}

.karmati-hero__dot.active {
  background: #fff;
  border-color: #fff;
}

.karmati-hero__dot:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   Content — testo + bottoni sovrapposti all'immagine
   -------------------------------------------------------------------------- */
.karmati-hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 80px 60px 60px;
  gap: 40px;
}

.karmati-hero__text { max-width: 520px; }

.karmati-hero__title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--hero-white) !important;
  letter-spacing: 0.02em;
  margin: 0 0 24px;
}

#top .karmati-hero__title { color: var(--hero-white) !important; }

.karmati-hero__subtitle {
  font-size: clamp(0.875rem, 1.4vw, 1rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--hero-white) !important;
  margin: 0;
}

/* --------------------------------------------------------------------------
   CTA buttons
   -------------------------------------------------------------------------- */
.karmati-hero__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-width: 220px;
  max-width: 260px;
}

.karmati-hero__btn {
  display: inline-block;
  padding: 18px 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s;
  position: relative;
  z-index: 2;
}

.karmati-hero__btn:hover { opacity: 0.85; text-decoration: none; }

.karmati-hero__btn--primary {
  background-color: var(--hero-white);
  color: var(--hero-gold) !important;
  border: 2px solid var(--hero-purple);
}

.karmati-hero__btn--secondary {
  background-color: transparent;
  color: var(--hero-white) !important;
  border: 2px solid var(--hero-white);
}

.karmati-hero__btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Strip — rinominato da "banner" per evitare collisione con CSS Enfold
   Enfold applica transform: rotate() su elementi con "banner" nel nome classe
   -------------------------------------------------------------------------- */
.karmati-hero__strip {
  position: relative;
  z-index: 2;
  background-color: var(--hero-gold);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.karmati-hero__strip-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  transform: none !important; /* sicurezza extra */
}

.karmati-hero__strip-item {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-purple);
}

.karmati-hero__strip-sep {
  color: var(--hero-purple);
  margin: 0 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Tablet (≤ 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .karmati-hero {
    aspect-ratio: 4 / 3;
  }

  .karmati-hero__content {
    flex-direction: column;
    align-items: flex-start;
    padding: 60px 40px 40px;
    gap: 32px;
  }

  .karmati-hero__cta {
    flex-direction: row;
    max-width: 100%;
    min-width: unset;
    width: 100%;
  }

  .karmati-hero__btn { flex: 1; }

  /* Su tablet il crop laterale è più aggressivo: alza il focus */
  .karmati-hero__slide img {
    object-position: center 25%;
  }
}

/* --------------------------------------------------------------------------
   Mobile (≤ 600px)
   Altezza fluida: min-height 70vh per stare sopra la fold senza dominare.
   justify-content: flex-start evita il gap enorme tra testo e bottoni.
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .karmati-hero {
    aspect-ratio: 4 / 5;
  }

  /* Su mobile portrait teniamo alta la posizione verticale per
     non tagliare il soggetto (testa/prodotto in alto). */
  .karmati-hero__slide img {
    object-position: center 20%;
  }

  .karmati-hero__content {
    padding: 32px 20px 20px;
    gap: 20px;
    justify-content: flex-start; /* no space-between su mobile */
  }

  .karmati-hero__title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
    margin: 0 0 12px;
  }

  .karmati-hero__subtitle {
    font-size: 0.9rem;
  }

  .karmati-hero__cta {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: unset;
    gap: 12px;
  }

  .karmati-hero__btn {
    width: 100%;
    padding: 14px 20px;
  }

  /* Dots posizionati sopra lo strip, non sopra i bottoni */
  .karmati-hero__dots {
    bottom: 56px; /* altezza strip (~47px) + margine */
  }

  .karmati-hero__dot {
    width: 6px;
    height: 6px;
  }

  .karmati-hero__strip {
    padding: 12px 16px;
  }

  .karmati-hero__strip-sep { margin: 0 10px; }

  .karmati-hero__strip-item,
  .karmati-hero__strip-sep { font-size: 0.65rem; }
}

/* --------------------------------------------------------------------------
   Arrows prev/next — slider hero
   Posizionati centrati verticalmente, ai lati. Nascosti su mobile
   (la navigazione è gestita da dots e swipe touch).
   -------------------------------------------------------------------------- */
.karmati-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10; /* sopra __content (2) e __bg (0) come i dots */
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: var(--hero-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.karmati-hero__arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.karmati-hero__arrow:focus-visible {
  outline: 2px solid var(--hero-gold);
  outline-offset: 2px;
}

.karmati-hero__arrow--prev { left: 20px; }
.karmati-hero__arrow--next { right: 20px; }

@media (max-width: 900px) {
  .karmati-hero__arrow {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
  .karmati-hero__arrow--prev { left: 12px; }
  .karmati-hero__arrow--next { right: 12px; }
}

@media (max-width: 600px) {
  /* Su mobile il touch swipe + dots bastano, frecce nascoste */
  .karmati-hero__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .karmati-hero__slide { transition: opacity 0.001s; }
  .karmati-hero__arrow { transition: background-color 0.001s; }
}
