/* ============================================================================
   Aroma — homepage hero carousel
   Built on Bootstrap 5.3's Carousel (already loaded sitewide — no new JS
   dependency) with a full brand reskin: circular glass arrows, slim dot
   indicators, a dedicated CTA button per slide, and the same soft hover-zoom
   language already used on product cards. RTL-safe via logical properties
   throughout, so it mirrors correctly with zero direction-specific rules.
   ========================================================================== */

.aroma-hero-carousel {
  position: relative;
  border-radius: var(--aroma-radius-lg);
  overflow: hidden;
}

.aroma-hero-carousel .carousel-inner {
  border-radius: var(--aroma-radius-lg);
  cursor: grab;
  touch-action: pan-y; /* leave vertical page scroll to the browser, horizontal to the drag/swipe handlers */
}
.aroma-hero-carousel .carousel-inner.is-dragging {
  cursor: grabbing;
}
.aroma-hero-carousel .carousel-inner.is-dragging .aroma-hero-slide-cta {
  cursor: grabbing;
}

/* --- Hero media box ---------------------------------------------------------
   Full width, full height of its own 16:9 — no shadow, no cropping. Height
   used to be an explicit clamp() tuned to look "tall and cinematic"
   regardless of the image underneath, deliberately wider than the images'
   own 16:9 so object-fit:cover would crop top/bottom to fill it; at wide
   viewports that clamp's capped height made the box considerably wider than
   16:9, cropping a visibly large slice off the top and bottom, and on
   narrow phones the same clamp flips the other way (taller than wide),
   cropping the sides instead — either way, part of the photo was always
   being thrown away.

   aspect-ratio: 16/9 matches HeroImageProcessor's own standardized output
   (every slide is processed to exactly 1920x1080) exactly, at every
   viewport width — so the box ratio and the image ratio are always
   identical and object-fit:cover has nothing left to crop; the whole photo
   is always in frame. The trade-off is a hero that scales taller on very
   wide monitors (unavoidable once cropping is off the table for a
   full-width band), which is the correct trade for "show the whole image". */
.aroma-hero-slide {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--aroma-skin); /* shows while an image loads — same ratio, so no jump once it's in */
  overflow: hidden;
}
.aroma-hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--aroma-transition-slower);
  -webkit-user-drag: none; /* no native drag-ghost fighting the custom pointer drag */
  user-select: none;
}

/* The slide itself is not a link — only the CTA button is clickable (an <a>
   wrapping the whole image is natively draggable in the browser, which
   fights the custom drag-to-navigate handling). A slow, considered zoom on
   hover reinforces the carousel is interactive without feeling like a UI
   hover state — luxury motion takes its time. */
.aroma-hero-slide:hover img {
  transform: scale(1.045);
}

/* A permanent gradient scrim (not just a hover effect) across the lower
   two-thirds — this is what lets the caption sit directly on the image as
   an editorial poster treatment instead of needing its own backdrop-blur
   card. Deliberately reaches high and dark: several slides carry their own
   baked-in campaign copy (a tagline, a small feature-icon strip) low in the
   frame, and this needs to fully read over that, not just tint it. Tinted
   toward the deep-emerald end of true black so it reads as "this brand's
   shadow", not a generic dark overlay. */
.aroma-hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* --- Caption (title + CTA) --------------------------------------------------
   A full-width editorial block sitting directly on the scrim — large,
   confident type standing on the image itself, the way a print campaign
   spread would set a headline over its own photography, rather than a
   floating UI card layered on top of it. */
.aroma-hero-slide-caption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 2;
  padding: clamp(1.75rem, 3.5vw, 3.25rem);
  padding-inline-end: clamp(4rem, 9vw, 7rem); /* keep clear of the arrow controls */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  pointer-events: none; /* title is decorative — only the CTA link (below) is clickable */
}
.aroma-hero-slide-title {
  color: #fff;
  font-family: var(--aroma-heading-en);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-size: clamp(1.6rem, 2.7vw, 2.5rem);
  margin: 0;
  max-width: 460px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  /* Flex children default to min-width:auto, which lets long text overflow
     its box instead of wrapping — this is what makes it actually wrap. */
  min-width: 0;
}
html[lang="ar"] .aroma-hero-slide-title {
  font-family: var(--aroma-heading-ar);
  font-weight: 600;
  letter-spacing: 0;
}
/* Solid filled CTA — mockup-driven: a solid Burgundy pill rather than the
   previous ghost/outline treatment. The title above keeps its white text +
   scrim (untouched, deliberately tuned this session to stay legible across
   all 5 campaign photos) — only the button itself changes, since a solid
   fill reads correctly regardless of how strong the scrim is underneath. */
.aroma-hero-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--aroma-brown);
  border: 1px solid var(--aroma-brown);
  color: var(--aroma-white);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto; /* re-enables clicks within the otherwise pointer-events:none caption */
  transition: background-color var(--aroma-transition), border-color var(--aroma-transition), transform var(--aroma-transition-fast);
}
.aroma-hero-slide-cta:hover,
.aroma-hero-slide-cta:focus-visible {
  background-color: var(--aroma-emerald-deep);
  border-color: var(--aroma-emerald-deep);
  color: var(--aroma-white);
  transform: translateX(4px);
}
html[dir="rtl"] .aroma-hero-slide-cta:hover,
html[dir="rtl"] .aroma-hero-slide-cta:focus-visible {
  transform: translateX(-4px);
}
.aroma-hero-slide-cta i {
  transition: transform var(--aroma-transition-fast);
}
html[dir="rtl"] .aroma-hero-slide-cta i {
  transform: scaleX(-1);
}

/* No height override at either breakpoint below — aspect-ratio: 16/9 above
   already scales the box correctly at every width on its own; a fixed
   height here would fight it and start cropping the image again. */
@media (max-width: 575.98px) {
  .aroma-hero-slide-caption { padding: 1.5rem 1.25rem; padding-inline-end: 1.25rem; gap: 0.85rem; }
  .aroma-hero-slide-title { font-size: clamp(1.5rem, 7vw, 2rem); max-width: 100%; }
  .aroma-hero-slide-cta { padding: 0.6rem 1.35rem; font-size: 0.72rem; }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .aroma-hero-slide-caption { padding: 2rem; padding-inline-end: 3.5rem; }
  .aroma-hero-slide-title { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
}
.aroma-hero-slide-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}
@media (prefers-reduced-motion: reduce) {
  .aroma-hero-slide img { transition: none; }
}

/* --- Controls (circular glass buttons, replacing Bootstrap's default
       gradient-mask arrow icons with real Bootstrap Icons glyphs) --------- */
.aroma-hero-carousel .carousel-control-prev,
.aroma-hero-carousel .carousel-control-next {
  width: auto;
  height: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  opacity: 1;
}
.aroma-hero-carousel .carousel-control-prev { inset-inline-start: 1rem; }
.aroma-hero-carousel .carousel-control-next { inset-inline-end: 1rem; }

.aroma-hero-carousel .carousel-control-prev-icon,
.aroma-hero-carousel .carousel-control-next-icon {
  width: 3.25rem;
  height: 3.25rem;
  background-image: none; /* drop Bootstrap's default SVG mask */
  border-radius: 50%;
  background-color: rgba(250, 247, 242, 0.9); /* --aroma-white, translucent */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(10, 26, 20, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--aroma-transition-fast), transform var(--aroma-transition-fast), box-shadow var(--aroma-transition-fast);
}
.aroma-hero-carousel .carousel-control-prev-icon::before,
.aroma-hero-carousel .carousel-control-next-icon::before {
  font-family: "bootstrap-icons", sans-serif;
  font-size: 1.15rem;
  color: var(--aroma-brown);
  line-height: 1;
}
/* Logical (start/end) glyphs so the arrows point the right way in RTL too —
   Bootstrap's carousel JS already reverses slide *order* for RTL; this just
   keeps the icon glyph consistent with "previous/next" rather than
   literal left/right. */
.aroma-hero-carousel .carousel-control-prev-icon::before { content: "\f284"; } /* chevron-left */
.aroma-hero-carousel .carousel-control-next-icon::before { content: "\f285"; } /* chevron-right */
html[dir="rtl"] .aroma-hero-carousel .carousel-control-prev-icon::before { content: "\f285"; }
html[dir="rtl"] .aroma-hero-carousel .carousel-control-next-icon::before { content: "\f284"; }

.aroma-hero-carousel .carousel-control-prev:hover .carousel-control-prev-icon,
.aroma-hero-carousel .carousel-control-next:hover .carousel-control-next-icon {
  background-color: var(--aroma-white);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(20, 4, 4, 0.24);
}
.aroma-hero-carousel .carousel-control-prev:active .carousel-control-prev-icon,
.aroma-hero-carousel .carousel-control-next:active .carousel-control-next-icon {
  transform: scale(0.96);
}
.aroma-hero-carousel .carousel-control-prev:focus-visible .carousel-control-prev-icon,
.aroma-hero-carousel .carousel-control-next:focus-visible .carousel-control-next-icon {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 4px 16px rgba(20, 4, 4, 0.18);
}

/* --- Indicators (slim dots, not Bootstrap's default fat bars) ------------
   Moved to the top edge (Bootstrap defaults them to the bottom) — the bottom
   is where the caption card and, on several slides, baked-in artwork detail
   already live, so the top edge is the one spot every slide keeps clear. */
.aroma-hero-carousel .carousel-indicators {
  top: 1.5rem;
  bottom: auto;
  margin: 0;
  gap: 0.5rem;
  /* The bottom scrim doesn't reach this high, so a light image can leave a
     white dot with nothing to read against — a soft drop-shadow keeps every
     dot legible regardless of what's directly behind it. */
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}
.aroma-hero-carousel .carousel-indicators [data-bs-target] {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.6);
  opacity: 1;
  transition: background-color var(--aroma-transition-fast), width var(--aroma-transition-fast);
}
.aroma-hero-carousel .carousel-indicators .active {
  width: 1.5rem;
  border-radius: 999px;
  background-color: var(--aroma-gold);
}

@media (max-width: 575.98px) {
  .aroma-hero-carousel { border-radius: var(--aroma-radius, 0.85rem); }
  .aroma-hero-carousel .carousel-inner { border-radius: var(--aroma-radius, 0.85rem); }
  .aroma-hero-carousel .carousel-control-prev-icon,
  .aroma-hero-carousel .carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  .aroma-hero-carousel .carousel-control-prev { inset-inline-start: 0.6rem; }
  .aroma-hero-carousel .carousel-control-next { inset-inline-end: 0.6rem; }
}
