/* OTLY 869 — Archive Category Hero */

.elementor-widget-otly_archive_hero {
  width: 100% !important;
  max-width: 100% !important;
}

.otly-arch-hero {
  --otly-hero-bg: #f9f8f6;
  --otly-hero-copy-max: 520px;
  --otly-hero-copy-extra-pad: 0px;
  background: var(--otly-hero-bg);
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

.otly-arch-hero.is-visible .otly-arch-hero__copy,
.otly-arch-hero.is-visible .otly-arch-hero__media {
  opacity: 1;
  transform: none;
}

.otly-arch-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(var(--otly-hero-min-h, 480px), auto);
  min-height: var(--otly-hero-min-h, 480px);
  max-width: var(--otly-hero-max-w, 1440px);
  margin: 0 auto;
  align-items: stretch;
  width: 100%;
}

.otly-arch-hero--inner-full .otly-arch-hero__inner {
  max-width: none;
  width: 100%;
}

/* ── Split bleed (opt-in): narrow copy band, image fills remainder; viewport breakout with inner-full only ── */
@media (min-width: 1025px) {
  .elementor-widget-otly_archive_hero.otly-arch-hero--inner-full > .elementor-widget-container {
    overflow: visible;
  }

  /* Margin breakout avoids transform FOUC (content flashing right before centering). */
  .elementor-widget-otly_archive_hero.otly-arch-hero--inner-full .otly-arch-hero.otly-arch-hero--split-bleed {
    position: relative;
    left: auto;
    right: auto;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    transform: none;
    overflow-x: clip;
  }

  /* Column presets (image % slider when preset = custom) */
  .elementor-widget-otly_archive_hero.otly-arch-hero--preset-balanced .otly-arch-hero--image-right .otly-arch-hero__inner,
  .elementor-widget-otly_archive_hero.otly-arch-hero--preset-balanced .otly-arch-hero--image-left .otly-arch-hero__inner {
    grid-template-columns: 1fr 1fr !important;
  }

  .elementor-widget-otly_archive_hero.otly-arch-hero--preset-wide-image .otly-arch-hero--image-right .otly-arch-hero__inner {
    grid-template-columns: 1fr 1.38fr !important;
  }

  .elementor-widget-otly_archive_hero.otly-arch-hero--preset-wide-image .otly-arch-hero--image-left .otly-arch-hero__inner {
    grid-template-columns: 1.38fr 1fr !important;
  }

  .elementor-widget-otly_archive_hero.otly-arch-hero--preset-wide-copy .otly-arch-hero--image-right .otly-arch-hero__inner {
    grid-template-columns: 1.38fr 1fr !important;
  }

  .elementor-widget-otly_archive_hero.otly-arch-hero--preset-wide-copy .otly-arch-hero--image-left .otly-arch-hero__inner {
    grid-template-columns: 1fr 1.38fr !important;
  }

  /* Split bleed: after presets so tight-copy + bleed wins when both classes exist */
  .otly-arch-hero--split-bleed .otly-arch-hero__copy {
    padding-right: calc(48px + var(--otly-hero-copy-extra-pad, 0px));
  }

  .elementor-widget-otly_archive_hero .otly-arch-hero--split-bleed.otly-arch-hero--image-right .otly-arch-hero__inner {
    grid-template-columns: minmax(0, min(var(--otly-hero-copy-max, 520px), 48vw)) minmax(0, 1fr) !important;
  }

  .elementor-widget-otly_archive_hero .otly-arch-hero--split-bleed.otly-arch-hero--image-left .otly-arch-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, min(var(--otly-hero-copy-max, 520px), 48vw)) !important;
  }
}

.otly-arch-hero--image-right .otly-arch-hero__copy {
  grid-column: 1;
  grid-row: 1;
}

.otly-arch-hero--image-right .otly-arch-hero__media {
  grid-column: 2;
  grid-row: 1;
}

.otly-arch-hero--image-left .otly-arch-hero__copy {
  grid-column: 2;
  grid-row: 1;
}

.otly-arch-hero--image-left .otly-arch-hero__media {
  grid-column: 1;
  grid-row: 1;
}

.otly-arch-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  padding: 48px 48px 48px 64px;
  box-sizing: border-box;
}

.otly-arch-hero__copy-inner {
  width: 100%;
  margin-block: auto;
}

.elementor-widget-otly_archive_hero.otly-arch-hero--copy-center .otly-arch-hero__copy-inner,
.otly-arch-hero--copy-center .otly-arch-hero__copy-inner {
  margin-block: auto;
}

.elementor-widget-otly_archive_hero.otly-arch-hero--copy-top .otly-arch-hero__copy-inner,
.otly-arch-hero--copy-top .otly-arch-hero__copy-inner {
  margin-top: 0;
  margin-bottom: auto;
}

.elementor-widget-otly_archive_hero.otly-arch-hero--copy-bottom .otly-arch-hero__copy-inner,
.otly-arch-hero--copy-bottom .otly-arch-hero__copy-inner {
  margin-top: auto;
  margin-bottom: 0;
}

/* Override legacy Elementor inline flex-end on Hoodies / T-Shirts templates */
.elementor-widget-otly_archive_hero .otly-arch-hero__copy {
  justify-content: flex-start !important;
}

.otly-arch-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #8a8984;
  margin-bottom: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}

.otly-arch-hero__bc-link {
  color: #5f5e5e;
  text-decoration: none;
  transition: color 0.2s ease;
}

.otly-arch-hero__bc-link:hover {
  color: #1b1c18;
  text-decoration: none;
}

.otly-arch-hero__bc-current {
  color: #1b1c18;
  font-weight: 500;
}

.otly-arch-hero__bc-sep {
  margin: 0 10px;
  opacity: 0.45;
  font-size: 12px;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
}

/* Hide WooCommerce default breadcrumb classes if theme injects both */
.otly-arch-hero__breadcrumb .woocommerce-breadcrumb {
  all: unset;
  display: contents;
}

.otly-arch-hero__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #1b1c18;
  margin: 0 0 10px;
}

.otly-arch-hero__divider {
  width: 32px;
  height: 2px;
  background: #1b1c18;
  margin: 10px 0 18px;
  border: none;
  opacity: 1;
}

.otly-arch-hero__desc {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  color: #5f5e5e;
  max-width: 400px;
  margin: 0 0 36px;
}
.otly-arch-hero__desc p {
  margin: 0 0 0.75em;
}
.otly-arch-hero__desc p:last-child {
  margin-bottom: 0;
}

.otly-arch-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 28px;
  align-items: start;
  max-width: 100%;
}

.otly-arch-trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  min-width: 0;
  max-width: none;
  width: 100%;
  justify-self: center;
}
.otly-arch-trust__item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}
.otly-arch-trust__item a:hover {
  opacity: 0.75;
}

.otly-arch-trust__icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1b1c18;
}

.otly-arch-trust__icon i,
.otly-arch-trust__icon svg,
.otly-arch-trust__icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.otly-arch-trust__icon svg {
  width: 22px;
  height: 22px;
  stroke: #1b1c18;
  fill: none;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.otly-arch-trust__icon svg path,
.otly-arch-trust__icon svg circle,
.otly-arch-trust__icon svg line,
.otly-arch-trust__icon svg polyline,
.otly-arch-trust__icon svg rect {
  stroke-width: inherit;
  vector-effect: non-scaling-stroke;
}

.otly-arch-trust__icon i {
  font-size: 22px;
  line-height: 1;
  width: auto;
  height: auto;
}

.otly-arch-trust__icon .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
  width: 1em;
  height: 1em;
  font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;
}

.otly-arch-trust__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: #5f5e5e;
  text-align: center;
}

.otly-arch-trust__title,
.otly-arch-trust__subtitle {
  display: block;
  white-space: normal;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.otly-arch-trust__subtitle {
  font-weight: 400;
  font-size: 10px;
  line-height: 1.4;
  opacity: 0.88;
  max-width: 13em;
}

.otly-arch-trust__item--has-sub {
  max-width: none !important;
}

.otly-arch-hero__media {
  position: relative;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  max-height: none;
  background: #e5e3de;
  overflow: hidden;
}

.otly-arch-hero__media > img,
.otly-arch-hero__media > .otly-arch-hero__slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.otly-arch-hero__media img,
.otly-arch-hero__media .otly-arch-hero__slide img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: var(--otly-hero-object-fit, cover);
  object-position: var(--otly-hero-object-position, center top);
  transform: scale(var(--otly-hero-image-scale, 1.02));
  transform-origin: center center;
  display: block;
  vertical-align: top;
}

.otly-arch-hero--is-category .otly-arch-hero__media img,
.otly-arch-hero--is-category .otly-arch-hero__media .otly-arch-hero__slide img {
  object-fit: cover !important;
  object-position: var(--otly-hero-object-position, center 22%) !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
}

/* Desktop only: let inner grid stretch media; on mobile explicit heights must win (see @media blocks). */
@media (min-width: 1025px) {
  .elementor-widget-otly_archive_hero .otly-arch-hero__media {
    min-height: 0 !important;
    max-height: none !important;
    height: 100% !important;
  }
}

.otly-arch-hero__overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--otly-hero-overlay, 0);
  pointer-events: none;
  z-index: 1;
}

/* Reveal: opacity only (no transform) so split-bleed / layout never shifts horizontally. */
.otly-arch-hero--reveal:not(.is-visible):not(.otly-arch-hero--editor) .otly-arch-hero__copy,
.otly-arch-hero--reveal:not(.is-visible):not(.otly-arch-hero--editor) .otly-arch-hero__media {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.otly-arch-hero--reveal.is-visible .otly-arch-hero__copy,
.otly-arch-hero--reveal.is-visible .otly-arch-hero__media,
.otly-arch-hero--reveal.otly-arch-hero--editor .otly-arch-hero__copy,
.otly-arch-hero--reveal.otly-arch-hero--editor .otly-arch-hero__media {
  opacity: 1;
}

.otly-arch-hero--parallax .otly-arch-hero__media img {
  will-change: transform;
}

/* Shop hero category slider */
.otly-arch-hero__slider {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.otly-arch-hero__slider-track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.otly-arch-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.otly-arch-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.otly-arch-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: var(--otly-hero-object-fit, cover);
  object-position: var(--otly-hero-object-position, center center);
  display: block;
}

.otly-arch-hero__slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #1b1c18;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.otly-arch-hero__slider-btn--prev { left: 12px; }
.otly-arch-hero__slider-btn--next { right: 12px; }

.otly-arch-hero__slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.otly-arch-hero__slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.otly-arch-hero__slider-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 1024px) {
  .otly-arch-hero--stack-mobile .otly-arch-hero__inner,
  .elementor-device-mobile .otly-arch-hero__inner,
  .elementor-device-tablet .otly-arch-hero__inner {
    grid-template-columns: 1fr !important;
    min-height: auto;
    max-height: none;
  }

  .otly-arch-hero--stack-mobile .otly-arch-hero__copy,
  .otly-arch-hero--stack-mobile .otly-arch-hero__media,
  .elementor-device-mobile .otly-arch-hero__copy,
  .elementor-device-mobile .otly-arch-hero__media {
    grid-column: 1 !important;
    grid-row: auto;
  }

  .otly-arch-hero--image-top-mobile .otly-arch-hero__media,
  .otly-arch-hero--mobile-order-top .otly-arch-hero__media,
  .elementor-device-mobile .otly-arch-hero--image-top-mobile .otly-arch-hero__media,
  .elementor-device-mobile .otly-arch-hero--mobile-order-top .otly-arch-hero__media {
    order: -1;
  }

  .otly-arch-hero--content-top-mobile .otly-arch-hero__copy,
  .otly-arch-hero--mobile-order-bottom .otly-arch-hero__copy,
  .elementor-device-mobile .otly-arch-hero--content-top-mobile .otly-arch-hero__copy,
  .elementor-device-mobile .otly-arch-hero--mobile-order-bottom .otly-arch-hero__copy {
    order: -1;
  }

  .otly-arch-hero--hide-media-mobile .otly-arch-hero__media {
    display: none !important;
  }

  .otly-arch-hero--stack-mobile .otly-arch-hero__media,
  .elementor-device-mobile .otly-arch-hero__media {
    width: 100%;
    height: min(52vw, 320px) !important;
    min-height: 240px !important;
    max-height: 320px !important;
  }

  .otly-arch-hero--stack-mobile .otly-arch-hero__copy,
  .elementor-device-mobile .otly-arch-hero__copy {
    width: 100%;
    max-width: none;
    min-height: 0;
    height: auto;
    padding: 28px 20px 36px;
    justify-content: center;
  }

  .otly-arch-hero--stack-mobile .otly-arch-hero__title,
  .elementor-device-mobile .otly-arch-hero__title {
    font-size: clamp(36px, 10vw, 44px);
  }

  .otly-arch-hero--stack-mobile .otly-arch-trust,
  .elementor-device-mobile .otly-arch-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }
}

@media (max-width: 768px) {
  .elementor-widget-otly_archive_hero > .elementor-widget-container {
    overflow: visible;
  }

  .elementor-widget-otly_archive_hero .otly-arch-hero {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    left: auto;
    transform: none;
  }

  .otly-arch-hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
    max-width: none;
    width: 100%;
  }

  .otly-arch-hero__media {
    width: 100%;
    height: min(56vw, 320px) !important;
    min-height: 220px !important;
    max-height: 320px !important;
    border-radius: 0;
  }

  .otly-arch-hero__media .otly-arch-hero__img-link,
  .otly-arch-hero__media img {
    border-radius: 0;
  }

  .otly-arch-hero__copy {
    padding: 28px var(--otly-hero-mobile-pad, 20px) 36px;
    box-sizing: border-box;
  }

  .otly-arch-hero__title {
    font-size: 40px;
  }

  .otly-arch-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .otly-arch-hero--reveal .otly-arch-hero__copy,
  .otly-arch-hero--reveal .otly-arch-hero__media {
    opacity: 1;
    transition: none;
  }
}
