/**
 * Smartweb Hero (Page Builder element) na sajtu.
 *
 * Glavni baner je traka slajdova (slika ili video), desno su dvije kartice
 * i crvena kutija samo na telefonu; raspored „Samo baner” desnu stranu
 * nema. Okretanje, prevlacenje, tackice i istekle banere radi
 * js/hero-slider.js.
 *
 * Obican CSS, bez build-a, pa radi na Hyva i Luma temi. Izgled se
 * prilagodjava promjenljivim ispod: podrazumijevano uzimaju promjenljive
 * teme ako postoje (--color-soft, --font-serif, ...), a tema moze da ih
 * pregazi na [data-content-type="citymoda_hero"].
 *
 * Nije u @layer-u: element stoji u Page Builder redu, a Page Builder svoje
 * stilove pise kao neslojeviti <style> u sadrzaju bloka.
 */

[data-content-type="citymoda_hero"] {
  --sw-hero-soft: var(--color-soft, #f5f5f3);
  --sw-hero-hairline: var(--color-hairline, #e5e5e5);
  --sw-hero-font: var(--font-sans, system-ui, sans-serif);
  --sw-hero-font-title: var(--font-serif, var(--sw-hero-font));
  --sw-hero-tracking: var(--tracking-eyebrow, .24em);
  --sw-hero-sale-bg: #c8102e;
  --sw-hero-height: 68vh;
  --sw-hero-min-height: 460px;
  --sw-hero-max-height: 760px;
}

/*
 * Baner sa „Prikazuj do” ostaje skriven dok hero-slider.js ne provjeri da
 * nije istekao (tada dobija .is-live, a istekli se uklanja). Prazan atribut
 * znaci „stalno”. Kad istekne sve na jednoj strani, druga zauzme cijelu
 * sirinu.
 */
[data-content-type="citymoda_hero"] {
  width: 100%;
}

[data-content-type="citymoda_hero"] [data-active-to]:not([data-active-to=""]):not(.is-live), [data-content-type="citymoda_hero"][data-layout="full"] .cm-hero-ct__rail, .cm-hero-ct__grid.is-rail-empty .cm-hero-ct__rail, .cm-hero-ct__grid.is-main-empty .cm-hero-ct__main {
  display: none;
}

@media (min-width: 64rem) {
  [data-content-type="citymoda_hero"][data-layout="full"] .cm-hero-ct__main, .cm-hero-ct__grid.is-rail-empty .cm-hero-ct__main, .cm-hero-ct__grid.is-main-empty .cm-hero-ct__rail {
    grid-column: 1 / -1;
  }
}

.cm-hero-ct__grid {
  grid-template-columns: minmax(0, 1fr);
  gap: .375rem;
  width: 100%;
  display: grid;
}

@media (min-width: 48rem) {
  .cm-hero-ct__grid {
    gap: .5rem;
  }
}

@media (min-width: 64rem) {
  .cm-hero-ct__grid {
    height: var(--sw-hero-height);
    min-height: var(--sw-hero-min-height);
    max-height: var(--sw-hero-max-height);
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

.cm-hero-ct__main {
  background-color: var(--sw-hero-soft);
  border: 1px solid var(--sw-hero-hairline);
  min-width: 0;
  height: var(--sw-hero-height);
  min-height: var(--sw-hero-min-height);
  max-height: var(--sw-hero-max-height);
  position: relative;
  overflow: hidden;
}

@media (min-width: 64rem) {
  .cm-hero-ct__main {
    grid-column: span 8 / span 8;
    height: 100%;
    min-height: 0;
    max-height: none;
  }
}

.cm-hero-ct__track {
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.cm-hero-ct__track.is-dragging {
  cursor: grabbing;
  transition: none;
}

.cm-hero-ct__slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.cm-hero-ct__slide-picture, .cm-hero-ct__slide-img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.cm-hero-ct__slide-img {
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  max-width: none;
}

.cm-hero-ct__slide[data-media-type="image"] .cm-hero-ct__video {
  display: none;
}

.cm-hero-ct__dots {
  z-index: 3;
  gap: .375rem;
  display: flex;
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

@media (min-width: 48rem) {
  .cm-hero-ct__dots {
    top: 1.5rem;
    right: 1.5rem;
  }
}

.cm-hero-ct__dot {
  cursor: pointer;
  background: none;
  border: 0;
  width: 2rem;
  height: 1.25rem;
  padding: 0;
  position: relative;
}

.cm-hero-ct__dot:before {
  content: "";
  left: 0;
  right: 0;
  background: #fff6;
  height: 2px;
  margin-top: -1px;
  position: absolute;
  top: 50%;
}

.cm-hero-ct__dot-fill {
  transform-origin: 0;
  background: #fff;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: scaleX(0);
}

.cm-hero-ct__dot.is-active .cm-hero-ct__dot-fill {
  transform: scaleX(1);
}

.cm-hero-ct__main.is-playing .cm-hero-ct__dot.is-active .cm-hero-ct__dot-fill {
  animation: cm-hero-ct-progress var(--sw-hero-interval, 7s) linear forwards;
}

.cm-hero-ct__main.is-paused .cm-hero-ct__dot.is-active .cm-hero-ct__dot-fill {
  animation-play-state: paused;
}

@keyframes cm-hero-ct-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.cm-hero-ct__video {
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  border: 0;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.cm-hero-ct__copy {
  left: 0;
  right: 0;
  z-index: 2;
  color: #fff;
  background-image: linear-gradient(to top, #000000a6, #0000);
  padding: 2rem 1.5rem;
  position: absolute;
  bottom: 0;
}

@media (min-width: 48rem) {
  .cm-hero-ct__copy {
    padding: 3rem;
  }
}

.cm-hero-ct__eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--sw-hero-tracking);
  font-size: .6875rem;
  font-weight: 500;
  font-family: var(--sw-hero-font);
  opacity: .92;
  margin: 0 0 .75rem;
}

.cm-hero-ct__title {
  font-family: var(--sw-hero-font-title);
  letter-spacing: -.02em;
  color: #fff;
  margin: 0 0 .75rem;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.05;
}

@media (min-width: 48rem) {
  .cm-hero-ct__title {
    font-size: 3rem;
  }
}

.cm-hero-ct__title-line {
  display: block;
}

.cm-hero-ct__text {
  font-family: var(--sw-hero-font);
  max-width: 34rem;
  margin: 0 0 1.25rem;
  font-size: .9375rem;
  line-height: 1.5;
}

.cm-hero-ct__cta {
  text-transform: uppercase;
  letter-spacing: var(--sw-hero-tracking);
  font-size: .6875rem;
  font-weight: 500;
  font-family: var(--sw-hero-font);
  color: #fff;
  border-bottom: 1px solid #fff;
  gap: .4em;
  padding-bottom: .25rem;
  text-decoration: none;
  display: inline-flex;
}

.cm-hero-ct__rail {
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex-wrap: nowrap;
  gap: .75rem;
  min-width: 0;
  display: flex;
  overflow: auto hidden;
}

.cm-hero-ct__rail::-webkit-scrollbar {
  display: none;
}

@media (min-width: 64rem) {
  .cm-hero-ct__rail {
    grid-column: span 4 / span 4;
    grid-auto-rows: minmax(0, 1fr);
    gap: .5rem;
    height: 100%;
    display: grid;
    overflow: visible;
  }
}

.cm-hero-ct__card, .cm-hero-ct__sale {
  scroll-snap-align: start;
  aspect-ratio: 480 / 340;
  border: 1px solid var(--sw-hero-hairline);
  background-color: var(--sw-hero-soft);
  color: #fff;
  flex: 0 0 72%;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

@media (min-width: 64rem) {
  .cm-hero-ct__card, .cm-hero-ct__sale {
    flex: initial;
    aspect-ratio: auto;
    height: 100%;
  }
}

.cm-hero-ct__picture, .cm-hero-ct__img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.cm-hero-ct__img {
  object-fit: cover;
  max-width: none;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
  transform: scale(1);
}

.cm-hero-ct__card:hover .cm-hero-ct__img {
  transform: scale(1.04);
}

.cm-hero-ct__card-copy {
  left: 0;
  right: 0;
  z-index: 2;
  background-image: linear-gradient(to top, #0009, #0000);
  padding: 1.25rem;
  position: absolute;
  bottom: 0;
}

.cm-hero-ct__card-eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--sw-hero-tracking);
  font-size: .625rem;
  font-weight: 500;
  font-family: var(--sw-hero-font);
  opacity: .9;
  margin: 0 0 .35rem;
}

.cm-hero-ct__card-title {
  font-family: var(--sw-hero-font-title);
  color: #fff;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0 0 .35rem;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
  display: -webkit-box;
  overflow: hidden;
}

.cm-hero-ct__card-cta {
  text-transform: uppercase;
  letter-spacing: var(--sw-hero-tracking);
  font-size: .625rem;
  font-weight: 500;
  font-family: var(--sw-hero-font);
  text-underline-offset: 4px;
  gap: .4em;
  margin: 0;
  text-decoration: underline;
  display: flex;
}

.cm-hero-ct__sale {
  text-align: center;
  aspect-ratio: 16 / 10;
  background-color: var(--sw-hero-sale-bg);
  border-color: var(--sw-hero-sale-bg);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  padding-inline-start: 1.5rem;
  padding-inline-end: 1.5rem;
  display: flex;
}

@media (min-width: 64rem) {
  .cm-hero-ct__sale {
    display: none;
  }
}

.cm-hero-ct__sale-eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--sw-hero-tracking);
  font-size: .625rem;
  font-weight: 500;
  font-family: var(--sw-hero-font);
  opacity: .92;
  margin: 0 0 .35rem;
}

.cm-hero-ct__sale-title {
  font-family: var(--sw-hero-font-title);
  letter-spacing: -.02em;
  color: #fff;
  margin: 0;
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cm-hero-ct__img, .cm-hero-ct__track {
    transition: none;
  }
}
