/* ---------------------------------------------------------------
   Culper hero slider
   All rules are scoped under #culper-hero so Botiga theme styles
   don't leak in (and we don't leak out).
   --------------------------------------------------------------- */

/* Allow our 100vw hero to break out of any of Botiga's content
   wrappers that have overflow:hidden. Without this, the hero gets
   clipped at the wrapper's right edge on wider viewports. */
body:has(#culper-hero) .site,
body:has(#culper-hero) .site-content,
body:has(#culper-hero) .site-main,
body:has(#culper-hero) .entry-content,
body:has(#culper-hero) #content,
body:has(#culper-hero) #primary,
body:has(#culper-hero) .container,
body:has(#culper-hero) main,
body:has(#culper-hero) article {
  overflow-x: visible !important;
}

#culper-hero.culper-hero {
  --culper-hero-h:     80vh;
  --culper-hero-h-min: 520px;
  --culper-text:       #ffffff;
  --culper-accent:     #d4a017;            /* warm gold — tweak to brand */
  --culper-overlay:    linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.6) 100%);
  --culper-ease:       cubic-bezier(0.22, 1, 0.36, 1);

  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: var(--culper-hero-h);
  min-height: var(--culper-hero-h-min);
  overflow: hidden;
  background: #0a0a0a;
}

/* [hidden] should always win. We set display: flex on .culper-form__pair
   below, which would otherwise override the user-agent's [hidden]
   { display: none } at the same specificity. */
#culper-hero [hidden] { display: none !important; }

/* Pause-state visual: progress bar stops animating + dims slightly. */
#culper-hero.is-paused .culper-progress__bar { opacity: 0.4; }

#culper-hero .swiper-wrapper { height: 100%; }

#culper-hero .culper-slide {
  display: flex;
  height: 100%;
  width: 100%;
}

#culper-hero .culper-slide--triple { gap: 2px; }

/* ----- Panels (each tire-type tile or full-bleed image) ----- */

#culper-hero .culper-panel {
  position: relative;
  display: block;
  flex: 1;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  color: var(--culper-text);
  background-color: #111;
  transition: flex 0.7s var(--culper-ease);
  isolation: isolate;
}

#culper-hero .culper-panel--full { flex: 1 1 100%; }

/* The actual image — on a pseudo so we can Ken-Burns it without
   touching the panel itself (which is doing flex transitions). */
#culper-hero .culper-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 9s linear, filter 0.5s var(--culper-ease);
  z-index: -2;
  will-change: transform;
}

/* Bottom-up gradient for text legibility */
#culper-hero .culper-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--culper-overlay);
  z-index: -1;
  transition: background 0.4s var(--culper-ease);
}

/* Slow zoom on the active slide only */
#culper-hero .swiper-slide-active .culper-panel::before {
  transform: scale(1.14);
}

#culper-hero .culper-panel__inner {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(1.25rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#culper-hero h2.culper-panel__title {
  margin: 0;
  padding: 0;
  font-size: clamp(1.6rem, 3.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--culper-text);
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

#culper-hero .culper-panel__cta {
  margin: 0;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 500;
  color: var(--culper-accent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--culper-ease), transform 0.4s var(--culper-ease);
}

/* Full-bleed slides always show their CTA */
#culper-hero .culper-panel--full .culper-panel__cta {
  opacity: 1;
  transform: none;
}

/* ----- Desktop hover behaviour on the triple slide -----
   Hovered panel expands, siblings shrink and blur. */
@media (hover: hover) and (min-width: 1024px) {
  #culper-hero .culper-slide--triple:hover .culper-panel        { flex: 0.8; }
  #culper-hero .culper-slide--triple .culper-panel:hover        { flex: 1.6; }
  #culper-hero .culper-slide--triple:hover .culper-panel:not(:hover)::before {
    filter: blur(2px) brightness(0.7);
  }
  #culper-hero .culper-panel:hover .culper-panel__cta {
    opacity: 1;
    transform: translateY(0);
  }
  #culper-hero .culper-panel:hover::after {
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.75) 100%);
  }
}

/* ----- Form slides (motorcycle tire size, license plate) ----- */

#culper-hero .culper-panel__inner--form {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: clamp(1.5rem, 4vw, 4rem);
  max-width: min(640px, 92%);
}

/* Centered layout variant — title, copy and form all stacked in the
   middle of the slide. Used for the MP and license-plate forms. */
#culper-hero .culper-panel__inner--center {
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: min(720px, 92%);
  margin: 0 auto;
  gap: 1rem;
}

#culper-hero .culper-panel__inner--center .culper-form {
  align-items: center;
  align-self: center;
}

/* Cap individual form widths so the full-width Hae button doesn't
   stretch absurdly wide on a centered hero with a 720px container. */
#culper-hero .culper-panel__inner--center .culper-form--mc    { max-width: 380px; }
#culper-hero .culper-panel__inner--center .culper-form--plate { max-width: 620px; }

#culper-hero .culper-panel--form .culper-panel__cta {
  opacity: 1;
  transform: none;
  color: rgba(255,255,255,0.85);
}

#culper-hero .culper-form {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Single-line forms (wheels) keep the row + button on one line */
#culper-hero .culper-form--single { display: block; }

/* Front/rear pair grouping — label sits above the input row */
#culper-hero .culper-form__pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

#culper-hero .culper-form__rowlabel {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.85);
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

/* Bare row variant — used when the row contains its own visually
   distinct controls (FIN plate, solid select) and shouldn't have
   the surrounding glass card. */
#culper-hero .culper-form__row--bare {
  background: transparent;
  border: 0;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: none;
  padding: 0;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

#culper-hero .culper-form__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 15, 15, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

#culper-hero .culper-form__input {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 500;
  padding: 0.85rem 0.75rem;
  border-radius: 10px;
  text-align: center;
  letter-spacing: 0.01em;
}
#culper-hero .culper-form__input::placeholder { color: rgba(255,255,255,0.55); }
#culper-hero .culper-form__input:focus {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 2px var(--culper-accent) inset;
}

#culper-hero .culper-form__input--plate {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  flex: 1 1 auto;
}

#culper-hero .culper-form__sep {
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  user-select: none;
}

#culper-hero .culper-form__submit {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  background: var(--culper-accent);
  color: #1a1208;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  transition: transform 0.2s var(--culper-ease), filter 0.2s var(--culper-ease);
}
#culper-hero .culper-form__submit:hover  { filter: brightness(1.08); }
#culper-hero .culper-form__submit:active { transform: scale(0.97); }

/* MC form: cap Hae width and lift a hair from the inputs */
#culper-hero .culper-form--mc .culper-form__submit {
  width: auto;
  min-width: 200px;
  padding: 0.85rem 2.5rem;
  margin-top: 0.5rem;
  align-self: center;
}

/* ----- MP tire-size form: lightweight underline inputs -----
   Each digit input sits on its own thin underline. Reads like a
   tire size code (120 / 70 R 17), not a chunky form. */
#culper-hero .culper-form--mc .culper-form__row {
  background: transparent;
  border: 0;
  border-radius: 0;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: none;
  padding: 0.25rem 0;
  gap: 0.5rem;
}

#culper-hero .culper-form--mc .culper-form__input {
  flex: 0 0 auto;
  width: 3.5ch;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid rgba(255,255,255,0.35);
  border-radius: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0.3rem 0.15rem;
  transition: border-color 0.2s var(--culper-ease);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

#culper-hero .culper-form--mc .culper-form__input::placeholder {
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}

#culper-hero .culper-form--mc .culper-form__input:focus {
  border-bottom-color: var(--culper-accent);
  background: transparent;
  box-shadow: none;
  outline: 0;
}

#culper-hero .culper-form--mc .culper-form__sep {
  font-size: 1.25rem;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  align-self: center;
}

#culper-hero .culper-form--mc .culper-form__remove {
  margin-left: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.06);
}

/* Native select dressed up to match input styling */
#culper-hero .culper-form__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  flex: 0 0 auto;
  width: auto;
  min-width: 7.5rem;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  cursor: pointer;
  text-align: left;
  text-align-last: left;
}
#culper-hero .culper-form__select option {
  background: #1a1a1a;
  color: #fff;
}

/* "+ Lisää takarengas" inline text-button */
#culper-hero .culper-form__addsize {
  align-self: flex-start;
  background: transparent;
  border: 0;
  padding: 0.25rem 0;
  margin-top: -0.25rem;
  color: var(--culper-accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.2s var(--culper-ease);
}
#culper-hero .culper-form__addsize:hover { opacity: 0.75; }

/* ---------- FIN EU-style license plate input ---------- */

#culper-hero .culper-plate-wrap {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid #111;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  height: 50px;
  flex: 0 0 auto;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}
#culper-hero .culper-plate-eu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #003399;
  padding: 2px 6px;
  min-width: 30px;
  flex-shrink: 0;
}
#culper-hero .culper-plate-eu__stars { display: block; margin: 0 auto; }
#culper-hero .culper-plate-eu__country {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.04em;
}
#culper-hero .culper-plate-wrap input,
#culper-hero .culper-plate-wrap input[type="text"] {
  /* Botiga forces width:100% on inputs site-wide, so we !important these
     to keep the plate visually consistent with a real EU plate. */
  flex: 0 0 180px !important;
  width: 180px !important;
  min-width: 0 !important;
  max-width: 180px !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 14px !important;
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  text-align: center !important;
  text-align-last: center !important;
  outline: none !important;
  background: #fff !important;
  color: #181818 !important;
  box-shadow: none !important;
  font-family: "Helvetica Neue", Arial, sans-serif !important;
  box-sizing: border-box !important;
}
#culper-hero .culper-plate-wrap input::placeholder {
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #b5b5b5;
  text-align: center;
}
#culper-hero .culper-plate-wrap:focus-within {
  border-color: var(--culper-accent);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.35), 0 6px 22px rgba(0,0,0,0.35);
}

/* Solid-style select (matches plate height, sits on dark image) */
#culper-hero .culper-form__select--solid {
  height: 50px;
  background-color: #fff;
  color: #181818;
  border: 2px solid #111;
  border-radius: 6px;
  padding: 0 2.5rem 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23181818' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 12px 8px;
  background-position: right 1rem center;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}

#culper-hero .culper-form--plate .culper-form__submit {
  height: 50px;
  padding: 0 1.75rem;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}

/* "×" remove button on the rear row */
#culper-hero .culper-form__remove {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--culper-ease), color 0.2s var(--culper-ease);
}
#culper-hero .culper-form__remove:hover {
  background: rgba(220, 60, 60, 0.85);
  color: #fff;
}

@media (max-width: 640px) {
  #culper-hero .culper-form__row {
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.4rem;
  }
  #culper-hero .culper-form__input { padding: 0.7rem 0.4rem; font-size: 1rem; }
  #culper-hero .culper-form__submit { width: 100%; padding: 0.85rem; margin-top: 0.25rem; }
  #culper-hero .culper-form__sep { font-size: 0.85rem; }
}

/* ----- Navigation arrows (desktop only) ----- */

#culper-hero .culper-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.25);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s var(--culper-ease),
              background 0.3s var(--culper-ease),
              transform 0.3s var(--culper-ease);
}

#culper-hero:hover .culper-nav { opacity: 1; }
#culper-hero .culper-nav:hover { background: rgba(0,0,0,0.6); }
#culper-hero .culper-nav:active { transform: translateY(-50%) scale(0.94); }
#culper-hero .culper-nav--prev { left: 24px; }
#culper-hero .culper-nav--next { right: 24px; }

#culper-hero .culper-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}
#culper-hero .culper-nav--prev::before { transform: rotate(-135deg); margin-left: 22px; }
#culper-hero .culper-nav--next::before { transform: rotate(45deg);   margin-right: 22px; }

/* ----- Autoplay progress bar ----- */

#culper-hero .culper-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 10;
}
#culper-hero .culper-progress__bar {
  height: 100%;
  width: 0;
  background: var(--culper-accent);
}

/* ----- Mobile ----- */

@media (max-width: 768px) {
  #culper-hero.culper-hero {
    --culper-hero-h:     70vh;
    --culper-hero-h-min: 480px;
  }
  #culper-hero .culper-slide--triple { flex-direction: column; }
  #culper-hero h2.culper-panel__title { font-size: clamp(1.3rem, 5vw, 2rem); }
  #culper-hero .culper-panel__cta {
    opacity: 1;
    transform: none;
    font-size: 0.9rem;
  }
  #culper-hero .culper-nav { display: none; }
}

/* ----- Reduced motion ----- */

@media (prefers-reduced-motion: reduce) {
  #culper-hero .culper-panel,
  #culper-hero .culper-panel::before,
  #culper-hero .culper-panel::after,
  #culper-hero .culper-panel__cta { transition: none !important; }
  #culper-hero .culper-panel::before { transform: none !important; }
}
