/* NettiX v2 – Hymer Center ajoneuvolistaus. Kaikki tyylit .hcx-kääreen sisällä, jotta teema ei sotke. */
.hcx {
  --hcx-accent: #0A4A7F;
  --hcx-ink: #14181D;
  --hcx-text: #3F4852;
  --hcx-muted: #5A6470;
  --hcx-line: #E3E1DA;
  --hcx-line-soft: #EEECE6;
  --hcx-bg-soft: #F4F3EF;
  --hcx-img: #DCE1E6;
  --hcx-radius: 16px;
  color: var(--hcx-ink);
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}
.hcx *, .hcx *::before, .hcx *::after { box-sizing: border-box; }
.hcx a { text-decoration: none; }
.hcx img { max-width: 100%; display: block; }
.hcx .hcx-ico { flex: none; display: inline-block; vertical-align: middle; }
.hcx h1, .hcx h2, .hcx h3 { color: var(--hcx-ink); text-transform: none; letter-spacing: normal; font-style: normal; }
.hcx p { margin: 0 0 1em; }
.hcx dl, .hcx dd { margin: 0; }
.hcx button { font: inherit; }
.hcx-muted { color: var(--hcx-muted); font-size: 14px; }

/* ---------- Painikkeet ---------- */
.hcx .hcx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  border: 1px solid #C9CED4; background: #fff; color: var(--hcx-ink);
  font-weight: 600; font-size: 16px; line-height: 1.2; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.hcx .hcx-btn:hover { border-color: var(--hcx-ink); color: var(--hcx-ink); }
.hcx .hcx-btn--primary { background: var(--hcx-accent); border-color: var(--hcx-accent); color: #fff; }
.hcx .hcx-btn--primary:hover { filter: brightness(.9); color: #fff; border-color: var(--hcx-accent); }
.hcx .hcx-btn--ghost { border-color: transparent; background: transparent; color: var(--hcx-accent); }
.hcx .hcx-btn--small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.hcx .hcx-btn--block { width: 100%; }
.hcx :focus-visible { outline: 3px solid var(--hcx-accent); outline-offset: 2px; }

/* ---------- Suodattimet ---------- */
.hcx-controls {
  background: #fff; border: 1px solid var(--hcx-line); border-radius: var(--hcx-radius);
  padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; margin: 0 0 20px;
}
.hcx-controls__row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.hcx-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hcx-chips__label { font-size: 13px; font-weight: 600; color: var(--hcx-muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.hcx .hcx-chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #C9CED4;
  background: #fff; color: var(--hcx-ink); font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1;
}
.hcx .hcx-chip[aria-pressed="true"] { background: var(--hcx-accent); border-color: var(--hcx-accent); color: #fff; }
.hcx-chip__n { font-weight: 400; opacity: .75; margin-left: 2px; }
.hcx-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 16px; }
.hcx-count { font-size: 15px; color: var(--hcx-text); margin: 0; }
.hcx-count strong { color: var(--hcx-ink); }
.hcx .hcx-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--hcx-text); margin: 0; font-weight: 400; }
.hcx-select { position: relative; display: inline-block; }
.hcx-select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--hcx-ink); border-bottom: 2px solid var(--hcx-ink); transform: rotate(45deg); pointer-events: none;
}
.hcx .hcx-select select {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--hcx-ink);
  height: 44px; min-height: 44px; line-height: 1.2; margin: 0; padding: 0 42px 0 14px; border: 1px solid #C9CED4; border-radius: 10px;
  background: #fff; box-shadow: none; width: auto; max-width: 100%; cursor: pointer;
}
.hcx .hcx-select select:hover { border-color: var(--hcx-ink); }

/* Hintaliukusäädin */
.hcx-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.hcx-range__body { flex: 1 1 320px; max-width: 520px; min-width: 0; }
.hcx-range__values { display: flex; gap: 8px; font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.hcx-range__slider { position: relative; height: 32px; }
.hcx-range__track { position: absolute; left: 11px; right: 11px; top: 14px; height: 4px; border-radius: 2px; background: #DCE1E6; }
.hcx-range__fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: var(--hcx-accent); border-radius: 2px; }
.hcx .hcx-range__slider input[type="range"] {
  position: absolute; left: 0; top: 0; width: 100%; height: 32px; margin: 0; padding: 0; background: none; border: 0;
  -webkit-appearance: none; appearance: none; pointer-events: none; z-index: 2; outline: none;
}
.hcx .hcx-range__slider input[type="range"]::-webkit-slider-runnable-track { background: none; border: 0; height: 32px; }
.hcx .hcx-range__slider input[type="range"]::-moz-range-track { background: none; border: 0; }
.hcx .hcx-range__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 5px; border-radius: 50%;
  background: #fff; border: 2px solid var(--hcx-accent); box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: grab;
}
.hcx .hcx-range__slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--hcx-accent); box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: grab;
}
.hcx .hcx-range__slider input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--hcx-accent); outline-offset: 2px; }
.hcx .hcx-range__slider input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--hcx-accent); outline-offset: 2px; }

/* ---------- Kortit ---------- */
/* Kontti vain listaukselle: auton sivulla kiinteät elementit (alapalkki, koko näytön galleria) eivät saa olla kontin sisällä */
.hcx-list { container-type: inline-size; container-name: hcx; }
/* Sarakkeet määräytyvät listauksen todellisen leveyden mukaan: 1 / 2 / 3 */
.hcx-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@container hcx (min-width: 600px) { .hcx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container hcx (min-width: 880px) { .hcx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hcx .hcx-card { container-type: inline-size; }
.hcx .hcx-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hcx-line);
  border-radius: var(--hcx-radius); overflow: hidden; color: var(--hcx-ink);
  transition: box-shadow .2s ease, transform .2s ease;
}
.hcx .hcx-card:hover { box-shadow: 0 10px 30px rgba(20,24,29,.10); transform: translateY(-2px); color: var(--hcx-ink); }
.hcx-card[hidden] { display: none !important; }
.hcx-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--hcx-img); overflow: hidden; }
.hcx-card__media img { width: 100%; height: 100%; object-fit: cover; }
.hcx-card__noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--hcx-muted); }
.hcx-card__count { position: absolute; right: 12px; bottom: 12px; background: rgba(20,24,29,.78); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.hcx-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.hcx-badges--static { position: static; margin: 0 0 10px; }
.hcx-badge { font-size: 12px; font-weight: 600; line-height: 1.2; padding: 5px 10px; border-radius: 999px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.hcx-card__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.hcx-eyebrow { font-size: 13px; font-weight: 600; color: var(--hcx-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.hcx .hcx-card__title { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 700; }
.hcx-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-top: 1px solid var(--hcx-line-soft); border-bottom: 1px solid var(--hcx-line-soft); }
.hcx-spec { display: flex; flex-direction: column; gap: 3px; color: var(--hcx-muted); min-width: 0; }
.hcx-spec dd { color: var(--hcx-ink); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcx-spec dt { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcx-card__engine { font-size: 14px; color: var(--hcx-text); margin: 0; }
.hcx-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; }
.hcx-price { font-weight: 800; font-size: 26px; line-height: 1.1; color: var(--hcx-ink); }
.hcx-price--big { font-size: 36px; margin: 4px 0 6px; }
.hcx-monthly { font-size: 14px; font-weight: 600; color: var(--hcx-accent); margin-top: 4px; }
.hcx-card__more { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--hcx-accent); white-space: nowrap; }
.hcx-empty-filter, .hcx-notice { background: #fff; border: 1px dashed #C9CED4; border-radius: var(--hcx-radius); padding: 28px; text-align: center; color: var(--hcx-text); }
.hcx-notice { border-style: solid; background: #FBEBD6; border-color: #F0D3AC; color: #5C3300; text-align: left; padding: 16px 20px; margin-bottom: 20px; }
.hcx-fin-note { font-size: 13px; color: var(--hcx-muted); margin-top: 20px; }

/* ---------- Tyhjä tila ---------- */
.hcx-empty {
  background: #fff; border: 1px solid var(--hcx-line); border-radius: 20px;
  padding: 48px 32px; text-align: center; max-width: 760px; margin: 0 auto;
}
.hcx-empty__icon { width: 80px; height: 80px; border-radius: 999px; background: var(--hcx-bg-soft); color: var(--hcx-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.hcx .hcx-empty__title { font-size: 28px; line-height: 1.2; margin: 0 0 14px; font-weight: 800; }
.hcx-empty p { color: var(--hcx-text); font-size: 17px; max-width: 560px; margin: 0 auto 12px; }
.hcx-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

/* ---------- Auton sivu ---------- */
.hcx .hcx-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--hcx-accent); min-height: 44px; margin-bottom: 8px; }
.hcx .hcx-detail__title { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; margin: 0 0 24px; font-weight: 800; }
.hcx-detail__layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.hcx-detail__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.hcx-detail__side { flex: 1 1 320px; min-width: 0; position: sticky; top: 24px; }
.hcx .hcx-h2 { font-size: 24px; margin: 0 0 14px; font-weight: 700; line-height: 1.25; }
.hcx-h2row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.hcx-gallery { display: flex; flex-direction: column; gap: 10px; }
.hcx-gallery__stage { position: relative; border-radius: var(--hcx-radius); overflow: hidden; background: var(--hcx-img); aspect-ratio: 3 / 2; }
.hcx-gallery__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.hcx-gallery__track::-webkit-scrollbar { display: none; }
.hcx-gallery__slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; }
.hcx-gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.hcx-gallery__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--hcx-muted); }
.hcx .hcx-gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px;
  border: 0; background: rgba(255,255,255,.92); color: var(--hcx-ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); padding: 0;
}
.hcx-gallery__nav--prev { left: 14px; }
.hcx-gallery__nav--next { right: 14px; }
.hcx-gallery__counter { position: absolute; right: 14px; bottom: 14px; background: rgba(20,24,29,.8); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.hcx .hcx-gallery__full { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--hcx-ink); border: 0; font-size: 14px; font-weight: 600; padding: 0 14px; min-height: 40px; border-radius: 8px; cursor: pointer; }
.hcx-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.hcx .hcx-gallery__thumb { flex: 0 0 104px; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--hcx-img); opacity: .7; outline-offset: -3px; }
.hcx .hcx-gallery__thumb[aria-current="true"] { opacity: 1; outline: 3px solid var(--hcx-accent); }
.hcx-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hcx-gallery.is-full { position: fixed; inset: 0; z-index: 100000; background: #0d0f12; padding: 16px; justify-content: center; }
.hcx-gallery.is-full .hcx-gallery__stage { aspect-ratio: auto; flex: 1; background: transparent; border-radius: 0; }
.hcx-gallery.is-full .hcx-gallery__slide img { object-fit: contain; }
.hcx-gallery.is-full .hcx-media-links, .hcx-gallery.is-full .hcx-media-box { display: none; }
html.hcx-noscroll, html.hcx-noscroll body { overflow: hidden; }
.hcx-media-links { display: flex; gap: 8px; flex-wrap: wrap; }
.hcx-media-box { position: relative; aspect-ratio: 16 / 9; border-radius: var(--hcx-radius); overflow: hidden; background: #000; }
.hcx-media-box iframe, .hcx-media-box > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.hcx-keyfacts { background: #fff; border: 1px solid var(--hcx-line); border-radius: var(--hcx-radius); padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }
.hcx-keyfacts__v { font-size: 18px; font-weight: 600; margin-top: 2px; }
.hcx-usp { background: #E6EEF6; color: #0B3A63; border-radius: var(--hcx-radius); padding: 18px 20px; font-weight: 600; }

.hcx-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.hcx-panel { background: #fff; border: 1px solid var(--hcx-line); border-radius: 14px; padding: 18px; }
.hcx .hcx-panel__title { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--hcx-muted); text-transform: uppercase; letter-spacing: .06em; }
.hcx-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.hcx-dl dt { color: var(--hcx-muted); }
.hcx-dl dd { text-align: right; font-weight: 500; }
.hcx-dl--small { font-size: 14px; gap: 6px 12px; }
.hcx-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.hcx-checklist li { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 0; }
.hcx-checklist .hcx-ico { color: var(--hcx-accent); margin-top: 3px; }
.hcx-desc { color: var(--hcx-text); font-size: 16px; line-height: 1.65; background: #fff; border: 1px solid var(--hcx-line); border-radius: 14px; padding: 20px; }

.hcx-sidecard { background: #fff; border: 1px solid var(--hcx-line); border-radius: var(--hcx-radius); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.hcx-actions { display: flex; flex-direction: column; gap: 10px; }
.hcx-sellers { border-top: 1px solid var(--hcx-line-soft); padding-top: 18px; }
.hcx .hcx-sellers__title { font-size: 13px; font-weight: 600; color: var(--hcx-muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.hcx-sellers__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.hcx-seller { display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 0; }
.hcx .hcx-seller__img { flex: none; width: 64px; height: 64px; border-radius: 999px; object-fit: cover; background: var(--hcx-bg-soft); }
.hcx-seller__ini { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--hcx-accent); font-size: 20px; }
.hcx-seller__info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hcx-seller__name { font-weight: 700; font-size: 16px; }
.hcx .hcx-seller__link { display: inline-flex; align-items: center; gap: 6px; color: var(--hcx-accent); font-size: 14px; font-weight: 500; min-height: 30px; overflow-wrap: anywhere; }

.hcx-calc { background: #E6EEF6; border-radius: 12px; color: #0B3A63; }
.hcx-calc summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 600; min-height: 48px; }
.hcx-calc summary::-webkit-details-marker { display: none; }
.hcx-calc summary span { flex: 1; }
.hcx-calc[open] summary { border-bottom: 1px solid rgba(10,74,127,.15); }
.hcx-calc__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; color: var(--hcx-ink); }
.hcx-calc label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; margin: 0; }
.hcx-calc__val { font-weight: 400; color: var(--hcx-muted); }
.hcx-calc input[type="range"] { width: 100%; accent-color: var(--hcx-accent); }
.hcx .hcx-calc select { font: inherit; min-height: 44px; padding: 6px 10px; border: 1px solid #C9CED4; border-radius: 10px; background: #fff; width: 100%; }
.hcx-calc__note { font-size: 12px; margin: 0; }

.hcx-cfg {
  margin-top: 40px; background: var(--hcx-ink); color: #fff; border-radius: 20px; padding: 32px 36px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
}
.hcx-cfg__text { flex: 1 1 420px; min-width: 0; }
.hcx .hcx-cfg__title { color: #fff; font-size: 26px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; }
.hcx-cfg p { color: #C9CED4; font-size: 17px; margin: 0; }
.hcx .hcx-btn--light { background: #fff; border-color: #fff; color: var(--hcx-ink); }
.hcx .hcx-btn--light:hover { background: #E9EBEE; border-color: #E9EBEE; color: var(--hcx-ink); }
.hcx-stickybar { display: none; }
.hcx-detail__mprice { display: none; }

@media (max-width: 767px) {
  .hcx-controls { padding: 14px; }
  .hcx-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 4px; scrollbar-width: none; }
  .hcx-chips::-webkit-scrollbar { display: none; }
  .hcx .hcx-chip { flex: none; }
  .hcx-range__body { flex-basis: 100%; max-width: none; }
  .hcx-toolbar { flex-wrap: nowrap; }
  .hcx .hcx-sort > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hcx-grid { gap: 16px; }
  .hcx-card__body { padding: 16px; }
  .hcx-gallery__stage { aspect-ratio: 4 / 3; border-radius: 12px; }
  .hcx-gallery__nav { display: none !important; }
  .hcx-gallery__thumbs { display: none; }
  .hcx-detail__side { position: static; }
  .hcx-empty { padding: 36px 20px; }
  .hcx-empty__actions .hcx-btn { width: 100%; }
  .hcx-cfg { padding: 24px 20px; margin-top: 28px; }
  .hcx-cfg .hcx-btn { width: 100%; }
  .hcx .hcx-cfg__title { font-size: 22px; }
  .hcx-stickybar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; gap: 10px; align-items: center;
    background: #fff; border-top: 1px solid var(--hcx-line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(20,24,29,.08); transform: translateY(110%); transition: transform .25s ease;
  }
  .hcx-stickybar.is-visible { transform: none; }
  .hcx-stickybar__price { flex: 1; font-weight: 800; font-size: 18px; white-space: nowrap; }
  .hcx-stickybar .hcx-btn { min-height: 46px; padding: 0 16px; }
  .hcx-detail { padding-bottom: 72px; }
  .hcx .hcx-detail__title { margin-bottom: 8px; }
  .hcx-detail__mprice { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hcx .hcx-card, .hcx-stickybar, .hcx-gallery__track { transition: none; scroll-behavior: auto; }
}

/* Kapea kortti (esim. kolme saraketta pienellä näytöllä): tiedot 2 × 2 */
@container (max-width: 360px) {
  .hcx .hcx-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .hcx .hcx-card__title { font-size: 19px; }
  .hcx .hcx-card .hcx-price { font-size: 23px; }
}
