/* v0.3 — CAREX China uses the existing CarexKorea catalogue layout on archive.
   Scoped overrides ONLY; do not modify theme styles or Korea API components. */
.cc-carex-page .cc { background: transparent; color: inherit; padding: 0; margin: 0; min-height: 0; overflow: visible; }
.cc-carex-page .cc-container { width: 100%; max-width: none; margin: 0; }
.cc-carex-page .cc--archive .catalog { width: 100%; }
.cc-carex-page .cc--archive .catalog-header .page-title { font-size: inherit; line-height: inherit; letter-spacing: normal; }
.cc-carex-page .cc--archive .catalog-header { margin-bottom: 28px; }
.cc-carex-page .cc--archive .cc-china-catalog-intro { margin: -15px 0 28px; max-width: 1000px; font-size: 16px; line-height: 1.5; }
.cc-carex-page .cc--archive .cc-china-tags { margin-bottom: 24px; }
.cc-carex-page .cc--archive .cc-china-brand-tag { cursor: pointer; font: inherit; }
.cc-carex-page .cc--archive .cc-china-brand-tag.is-active { border-color: #ff5721; background-color: #fff7f3; }
.cc-carex-page .cc--archive .cc-china-brand-tag .quik-filter-icon { height: 42px; display: flex; align-items: center; justify-content: center; }
.cc-carex-page .cc--archive .cc-china-brand-tag .quik-filter-icon img { width: 100%; height: 40px; object-fit: contain; }
.cc-carex-page .cc--archive .cc-china-brand-letter { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; border-radius: 9px; background: #f2f2f2; font-size: 18px; font-weight: 600; }
.cc-carex-page .cc--archive .cc-china-quick-links { display:flex; flex-wrap:wrap; gap:8px; margin: 16px 0 25px; }
.cc-carex-page .cc--archive .cc-china-quick-links a { font-size:13px; border: 1px solid #e3e3e3; border-radius: 12px; padding:8px 12px; }
.cc-carex-page .cc--archive .cc-china-quick-links a:hover { color:#ff5721; border-color:#ff5721; }
.cc-carex-page .cc--archive .cc-china-filter { margin: 20px 0 30px; }
.cc-carex-page .cc--archive .cc-china-filter .cc-china-filter-label { display:block; margin:0 0 7px; font-size:13px; font-weight:500; color:#35393e; }
.cc-carex-page .cc--archive .cc-china-filter .col-api-4 { min-width:0; }
.cc-carex-page .cc--archive .cc-china-filter .api-filter-select { min-width:0; }
.cc-carex-page .cc--archive .cc-china-filter .api-dropdown { display:block; width:100%; height:57px; font-size:14px; color:#35393e; padding:0 17px; }
.cc-carex-page .cc--archive .cc-china-filter input.api-dropdown { background-image:none; }
.cc-carex-page .cc--archive .cc-china-year-pair { gap:12px; }
.cc-carex-page .cc--archive .cc-china-filter-actions { border-top:1px solid #e4e4e4; padding-top:20px; }
.cc-carex-page .cc--archive .cc-china-filter-actions button { width:100%; min-height:53px; font-size:15px; border-radius:10px; cursor:pointer; }
.cc-carex-page .cc--archive .sort-line { margin-bottom:17px; }
.cc-carex-page .cc--archive .cc-china-sort-label { display:flex; align-items:center; gap:8px; font-size:13px; margin-left:10px; }
.cc-carex-page .cc--archive .cc-china-sort-label .sort-select { margin-bottom:0; color:#333; }
.cc-carex-page .cc--archive .api-catalog-item { overflow: hidden; }
.cc-carex-page .cc--archive .api-catalog-item-img { border-radius:16px 16px 0 0; }
.cc-carex-page .cc--archive .auto-item-img { background:#f7f7f7; }
.cc-carex-page .cc--archive .auto-item-img img { object-fit: contain; }
/* Optional native ACF card gallery: same photo area as the Korea cards. */
.cc-carex-page .cc--archive .cc-china-card-slide[hidden] { display:none!important; }
.cc-carex-page .cc--archive .cc-china-card-prev,
.cc-carex-page .cc--archive .cc-china-card-next { position:absolute; top:50%; transform:translateY(-50%); z-index:3; width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,.94); border:1px solid #dedede; font-size:24px; line-height:1; cursor:pointer; }
.cc-carex-page .cc--archive .cc-china-card-prev { left:9px; }
.cc-carex-page .cc--archive .cc-china-card-next { right:9px; }
.cc-carex-page .cc--archive .cc-china-card-counter { position:absolute; bottom:8px; left:50%; transform:translateX(-50%); z-index:2; background:rgba(255,255,255,.92); padding:3px 10px; border-radius:20px; font-size:11px; }
.cc-carex-page .cc--archive .api-catalog-item-title { font-size:21px; font-weight:500; line-height:1.3; }
.cc-carex-page .cc--archive .api-catalog-item-options p { display:flex; align-items:center; gap:5px; margin: 0 0 7px; }
.cc-carex-page .cc--archive .api-catalog-item-options p img { flex-shrink:0; width:18px; height:18px; object-fit:contain; margin-right:4px; }
.cc-carex-page .cc--archive .api-catalog-item-options p b { flex-shrink:0; }
.cc-carex-page .cc--archive .api-catalog-item-price { font-size: 21px; line-height:1.2; white-space:normal; }
.cc-carex-page .cc--archive .api-catalog-item-bottom { align-items:flex-end; }
.cc-carex-page .cc--archive .api-catalog-item-link { min-width:120px; }
.cc-carex-page .cc--archive .cc-china-draft { font-size:12px; color:#97712b; }
.cc-carex-page .cc--archive .cc-china-empty { padding:28px 0; }
.cc-carex-page .cc--archive .cc-china-result[hidden] { display:none!important; }
.cc-carex-page .cc--archive .cc-china-result:focus-within { outline:2px solid #ff5721; outline-offset:3px; }
/* Single model stays with the new ACF configurator, but inherits the site's existing
   background, page width, Yoast breadcrumbs and shared SEO/FAQ/consult sections. */
.cc-carex-page .cc--model .cc-product { margin:0; }
/* Ensure the model/logo and entire left product pane remain visible on desktop.
   JS measures any fixed site header and sizes the gallery to the actual viewport. */
@media (min-width: 851px) {
  .cc-carex-page .cc--model .cc-product__visual {
    top: var(--cc-sticky-top, 20px);
  }
  .cc-carex-page .cc--model .cc-product__visual.cc-sticky-off {
    position: static;
  }
  .cc-carex-page .cc--model .cc-gallery__main {
    height: clamp(145px, calc(100dvh - var(--cc-sticky-top, 20px) - 340px), 372px);
  }
}
@media(max-width: 850px) {
  .cc-carex-page .cc--archive .cc-china-filter .col-api-4 { flex-basis:calc(50% - 7px); }
  .cc-carex-page .cc--archive .api-catalog-item { width:calc(50% - 20px); }
}
@media(max-width: 640px) {
  .cc-carex-page .cc--archive .cc-china-filter .col-api-4 { flex-basis:100%; }
  .cc-carex-page .cc--archive .cc-china-year-pair .api-filter-select { flex:1; }
  .cc-carex-page .cc--archive .api-catalog-item { width:calc(100% - 20px); margin-bottom:20px; }
  .cc-carex-page .cc--archive .cc-china-filter-actions .col-api-4 { width:100%; }
  .cc-carex-page .cc--archive .api-catalog-item-bottom { flex-wrap:wrap; }
  .cc-carex-page .cc--archive .cc-china-sort-label { margin-top:10px; }
  .cc-carex-page .cc--archive .cc-china-brand-tag .quik-filter-icon { margin-right:8px; }
}

/* v0.6.3 – model options: selected ring + badge, understated values and real prices. */
.cc-carex-page .cc--model .cc-model-head p { color:#171717; font-weight:400; }
.cc-carex-page .cc--model .cc-config-title { column-gap:12px; }
.cc-carex-page .cc--model .cc-config-title h2 { color:#111; font-weight:600; }
.cc-carex-page .cc--model .cc-config-title > div:not(.cc-config-choice) { background:#343b40; }
.cc-carex-page .cc--model .cc-config-title .cc-config-choice {
  display:flex; align-items:baseline; justify-content:flex-end; gap:10px;
  flex:0 1 auto; width:auto; height:auto; background:transparent;
  min-width:0; max-width:68%; color:#151515;
}
.cc-carex-page .cc--model .cc-config-title .cc-config-choice__name,
.cc-carex-page .cc--model .cc-config-title .cc-config-choice__price,
.cc-carex-page .cc--model .cc-config-title #cc-trim-price {
  color:#151515; font-size:14px; font-weight:400; line-height:1.35;
  letter-spacing:0;
}
.cc-carex-page .cc--model .cc-config-title .cc-config-choice__name {
  min-width:0; white-space:normal; text-align:right; overflow-wrap:anywhere;
}
.cc-carex-page .cc--model .cc-config-title .cc-config-choice__price {
  flex:none; white-space:nowrap; font-variant-numeric:tabular-nums;
}
.cc-carex-page .cc--model .cc-swatch {
  width:40px; height:40px; padding:0; border:1px solid #a9abad;
  background:var(--cc-swatch,#d5dddf); box-shadow:none;
  transition:box-shadow .15s ease, border-color .15s ease;
}
.cc-carex-page .cc--model .cc-swatch.is-active {
  border:2px solid var(--cc-orange);
  box-shadow:0 0 0 2px #fff, 0 3px 9px rgba(255,90,42,.22);
}
.cc-carex-page .cc--model .cc-wheel {
  width:64px; height:64px; padding:2px; border:1px solid #c8d0d2;
  background:#fff; box-shadow:none;
  transition:box-shadow .15s ease, border-color .15s ease;
}
.cc-carex-page .cc--model .cc-wheel img {
  display:block; width:100%; height:100%; border-radius:50%; object-fit:cover;
}
.cc-carex-page .cc--model .cc-wheel.is-active {
  border:2px solid var(--cc-orange);
  box-shadow:0 0 0 2px #fff, 0 3px 9px rgba(255,90,42,.22);
}
.cc-carex-page .cc--model .cc-swatch.is-active::after,
.cc-carex-page .cc--model .cc-wheel.is-active::after {
  right:-6px; top:-7px; width:18px; height:18px; box-sizing:border-box;
  background:var(--cc-orange); border:2px solid #fff; color:#fff;
  font-size:11px; font-weight:700; line-height:1; box-shadow:none;
}
.cc-carex-page .cc--model .cc-swatches { gap:12px; }
.cc-carex-page .cc--model .cc-wheels { gap:14px; }
.cc-carex-page .cc--model .cc-pricing__row,
.cc-carex-page .cc--model .cc-pricing__row--muted,
.cc-carex-page .cc--model .cc-pricing__row span,
.cc-carex-page .cc--model .cc-pricing__row strong,
.cc-carex-page .cc--model .cc-pricing__row--muted strong {
  color:#161616; font-weight:400;
}
.cc-carex-page .cc--model .cc-pricing__row strong { font-variant-numeric:tabular-nums; }
@media (max-width: 640px) {
  .cc-carex-page .cc--model .cc-config-title { flex-wrap:wrap; row-gap:7px; }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice {
    flex-basis:100%; max-width:100%; justify-content:flex-start;
  }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__name { text-align:left; }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__name,
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__price,
  .cc-carex-page .cc--model .cc-config-title #cc-trim-price { font-size:13px; }
}

/* v0.6.4 — single China model only: natural headline/logo alignment and one
   uninterrupted image surface (the original demo images contain rounded corners). */
.cc-carex-page .cc--model .cc-model-head { display:block; }
.cc-carex-page .cc--model .cc-model-head__title-row {
  display:flex; align-items:center; gap:16px; min-width:0;
}
.cc-carex-page .cc--model .cc-model-head__title-row h1 {
  margin:0; min-width:0; flex:1;
}
.cc-carex-page .cc--model .cc-model-head__logo,
.cc-carex-page .cc--model .cc-model-head__mark { flex:0 0 42px; width:42px; height:42px; object-fit:contain; }
.cc-carex-page .cc--model .cc-model-head #cc-current-trim {
  margin:7px 0 0; padding-left:58px;
}
.cc-carex-page .cc--model .cc-gallery__main {
  isolation:isolate;
}
.cc-carex-page .cc--model .cc-gallery__main > #cc-gallery-image {
  position:absolute; inset:0;
  display:block; width:100%; height:100%; max-width:none;
  object-fit:cover; object-position:center center;
  border:0; border-radius:0; margin:0;
}
@media (max-width:580px) {
  .cc-carex-page .cc--model .cc-model-head__title-row { gap:12px; }
  .cc-carex-page .cc--model .cc-model-head__logo,
  .cc-carex-page .cc--model .cc-model-head__mark { flex-basis:34px; width:34px; height:34px; }
  .cc-carex-page .cc--model .cc-model-head #cc-current-trim { padding-left:46px; }
}

/* v0.6.8 — fix mobile image without a separate inset/letterboxed image.
   Matched ratio follows the exterior demo photo so its embedded rounded corners
   are concealed by the main gallery frame; gallery controls remain at the sides.
   Interior/wheel photos still use the JS-selected contain rule. */
@media (max-width: 580px) {
  .cc-carex-page .cc--model .cc-gallery__main {
    height:auto; aspect-ratio:483 / 325; min-height:0;
    background:#eff4f5; overflow:hidden; border-radius:15px;
  }
  .cc-carex-page .cc--model .cc-gallery__main > #cc-gallery-image {
    position:absolute; inset:0; width:100%; height:100%;
    max-width:none; border:0; border-radius:0; object-position:center;
    /* No inset/contain!important: these created the four white lines. */
  }
  .cc-carex-page .cc--model .cc-gallery__main .gallery-top-prev,
  .cc-carex-page .cc--model .cc-gallery__main .gallery-top-next { z-index:3; }
}
/* Keep circular wheel thumbnails from v0.6.7; not the mobile gallery/breadcrumb overrides. */
.cc-carex-page .cc--model .cc-wheel {
  display:inline-flex; align-items:center; justify-content:center;
  padding:2px; border-radius:50%; overflow:visible; box-sizing:border-box;
}
.cc-carex-page .cc--model .cc-wheel__media {
  display:block; position:relative; width:100%; height:100%;
  border-radius:50%; overflow:hidden; background:#f3f4f5;
}
.cc-carex-page .cc--model .cc-wheel__media img {
  display:block; width:100%; height:100%; max-width:none;
  border-radius:0; object-fit:cover; object-position:50% 50%;
  transform:scale(1.14); transform-origin:center;
}
.cc-carex-page .cc--model .cc-wheel__media .cc-wheel__placeholder {
  display:block; width:100%; height:100%; border-radius:50%;
}


/* v0.6.24 — phone-only model typography and compact quote/route layout.
   Keep desktop and the native theme/archive untouched. */
@media (max-width:580px) {
  .cc-carex-page .cc--model { font-size:18px; }
  .cc-carex-page .cc--model .cc-model-head h1 { font-size:32px; }
  .cc-carex-page .cc--model .cc-model-head #cc-current-trim { font-size:15px; }
  .cc-carex-page .cc--model .cc-model-head__mark { font-size:24px; }
  .cc-carex-page .cc--model .cc-left-price > div { max-width:100%; }
  .cc-carex-page .cc--model .cc-left-price span { font-size:17px; }
  .cc-carex-page .cc--model .cc-left-price strong { font-size:34px; overflow-wrap:normal; }
  .cc-carex-page .cc--model .cc-left-price small { font-size:14px; }
  .cc-carex-page .cc--model .cc-btn { font-size:18px; }
  #cc-model-page .cc-product__tabs .cc-product__tab,
  #cc-model-page #cc-order-toggle { font-size:14px; }
  #cc-model-page .cc-compare-toggle { margin-left:auto; }
  .cc-carex-page .cc--model .cc-config-title h2 { font-size:18px; }
  .cc-carex-page .cc--model .cc-config-title span { font-size:13px; }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__name,
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__price,
  .cc-carex-page .cc--model .cc-config-title #cc-trim-price { font-size:15px; }
  .cc-carex-page .cc--model .cc-variant { font-size:18px; }
  .cc-carex-page .cc--model .cc-variant.is-active::after { font-size:11px; }
  #cc-model-page .cc-trim-price-badge:not([hidden]) { font-size:15px; }
  .cc-carex-page .cc--model .cc-spec small { font-size:13px; }
  .cc-carex-page .cc--model .cc-spec strong { font-size:17px; }
  .cc-carex-page .cc--model .cc-swatch.is-active::after,
  .cc-carex-page .cc--model .cc-wheel.is-active::after { font-size:13px; }
  .cc-carex-page .cc--model .cc-shipping > strong { font-size:17px; }
  .cc-carex-page .cc--model .cc-shipping__line {
    display:grid;
    grid-template-columns:max-content minmax(8px,1fr) min-content minmax(8px,1fr) max-content;
    align-items:center; column-gap:7px; row-gap:0; font-size:13px;
  }
  .cc-carex-page .cc--model .cc-shipping__stop { gap:3px; min-width:0; }
  .cc-carex-page .cc--model .cc-shipping__stop:not(.cc-shipping__stop--customs) { white-space:nowrap; }
  .cc-carex-page .cc--model .cc-shipping__stop--customs { min-width:min-content; }
  .cc-carex-page .cc--model .cc-shipping__stop--customs span { white-space:normal; overflow-wrap:normal; }
  .cc-carex-page .cc--model .cc-shipping__stop img { width:18px; height:18px; }
  .cc-carex-page .cc--model .cc-shipping__line .cc-shipping__track { width:100%; min-width:8px; margin:0; }
  /* Markers stay INSIDE their own track; never overlap country labels. */
  .cc-carex-page .cc--model .cc-shipping__track--arrow::before { left:0; }
  .cc-carex-page .cc--model .cc-shipping__track--arrow::after { right:1px; box-sizing:border-box; }
  .cc-carex-page .cc--model .cc-shipping__track--finish::after { right:0; }
  .cc-carex-page .cc--model .cc-pricing__row {
    display:grid; grid-template-columns:minmax(0,1fr) max-content;
    align-items:center; column-gap:10px; font-size:14px;
  }
  .cc-carex-page .cc--model .cc-pricing__row > span { min-width:0; overflow-wrap:anywhere; font-size:inherit; }
  .cc-carex-page .cc--model .cc-pricing__row > strong { white-space:nowrap; font-size:inherit; text-align:right; }
  #cc-model-page .cc-compare-heading h2 { font-size:24px; }
  #cc-model-page .cc-compare-model { font-size:18px; }
  #cc-model-page .cc-compare-controls button { font-size:16px; }
  #cc-model-page .cc-compare--view th,
  #cc-model-page .cc-compare--view td { font-size:14px; }
  #cc-model-page .cc-compare-note { font-size:14px; }
}
@media (max-width:360px) {
  .cc-carex-page .cc--model .cc-shipping__line { font-size:12px; column-gap:5px; }
  .cc-carex-page .cc--model .cc-shipping__stop img { width:16px; height:16px; }
  .cc-carex-page .cc--model .cc-shipping__stop { gap:3px; }
  .cc-carex-page .cc--model .cc-shipping__track--arrow::before,
  .cc-carex-page .cc--model .cc-shipping__track--finish::after { width:5px; height:5px; }
}


/* v0.6.25 — phone-only model typography and inline option choices.
   Preserve the desktop layout, archive, and all other theme wrappers. */
@media (max-width:580px) {
  .cc-carex-page > .wrapper.cc-model-wrapper {
    box-sizing:border-box; width:100%; max-width:100%; padding:0; margin-inline:0;
  }
  .cc-carex-page .cc--model .cc-model-head h1 { font-size:30px; }
  .cc-carex-page .cc--model .cc-model-head #cc-current-trim { font-size:18px; font-weight:500; }
  .cc-carex-page .cc--model .cc-config-title h2 { font-size:22px; }
  .cc-carex-page .cc--model .cc-config-title #cc-trim-price { font-size:22px; white-space:nowrap; margin-left:auto; }
  .cc-carex-page .cc--model .cc-config-title {
    flex-wrap:wrap; column-gap:10px; row-gap:4px;
  }
  .cc-carex-page .cc--model .cc-config-title > h2 { flex:none; }
  .cc-carex-page .cc--model .cc-config-title > div:not(.cc-config-choice) { flex:1 0 12px; min-width:12px; }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice {
    flex:0 0 auto; width:max-content; max-width:100%;
    justify-content:flex-start; gap:8px; flex-wrap:wrap; row-gap:2px;
  }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__name,
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__price {
    font-size:22px; font-weight:400; line-height:1.25; color:#151515;
  }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__name {
    text-align:left; max-width:100%; overflow-wrap:anywhere;
  }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__price { white-space:nowrap; }
}

/* v0.6.26 — larger desktop/tablet model typography; mobile and theme widths unchanged. */
@media (min-width:581px) {
  .cc-carex-page .cc--model { font-size:18px; }
  /* The existing desktop H1 (up to 49px) and main price (39px) are already larger than on phones. */
  .cc-carex-page .cc--model .cc-model-head #cc-current-trim { font-size:18px; font-weight:500; }
  .cc-carex-page .cc--model .cc-config-title h2 { font-size:22px; }
  .cc-carex-page .cc--model .cc-config-title #cc-trim-price { font-size:22px; white-space:nowrap; margin-left:auto; }
  .cc-carex-page .cc--model .cc-config-title { flex-wrap:wrap; column-gap:12px; row-gap:4px; }
  .cc-carex-page .cc--model .cc-config-title > h2 { flex:none; }
  .cc-carex-page .cc--model .cc-config-title > div:not(.cc-config-choice) { flex:1 0 12px; min-width:12px; }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice {
    flex:0 0 auto; width:max-content; max-width:100%; justify-content:flex-end;
    margin-left:auto; gap:10px; flex-wrap:wrap; row-gap:2px;
  }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__name,
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__price {
    font-size:22px; font-weight:400; line-height:1.25; color:#151515;
  }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__name { max-width:100%; overflow-wrap:anywhere; text-align:right; }
  .cc-carex-page .cc--model .cc-config-title .cc-config-choice__price { white-space:nowrap; }
  .cc-carex-page .cc--model .cc-variant { font-size:18px; }
  .cc-carex-page .cc--model .cc-spec small { font-size:13px; }
  .cc-carex-page .cc--model .cc-spec strong { font-size:17px; }
  #cc-model-page .cc-product__tabs .cc-product__tab,
  #cc-model-page #cc-order-toggle { font-size:16px; }
  #cc-model-page .cc-trim-price-badge:not([hidden]) { font-size:15px; }
  .cc-carex-page .cc--model .cc-left-price small { font-size:15px; }
  .cc-carex-page .cc--model .cc-shipping > strong { font-size:17px; }
  .cc-carex-page .cc--model .cc-shipping__line { font-size:16px; }
  .cc-carex-page .cc--model .cc-pricing__row { font-size:16px; }
  .cc-carex-page .cc--model .cc-pricing__row > span { min-width:0; overflow-wrap:anywhere; font-size:inherit; }
  .cc-carex-page .cc--model .cc-pricing__row > strong { flex:none; white-space:nowrap; font-size:inherit; }
  #cc-model-page .cc-compare-model { font-size:18px; }
  #cc-model-page .cc-compare-controls button { font-size:16px; }
  #cc-model-page .cc-compare--view th,
  #cc-model-page .cc-compare--view td { font-size:16px; }
  #cc-model-page .cc-compare-note { font-size:14px; }
}
@media (min-width:581px) and (max-width:1100px) {
  .cc-carex-page .cc--model .cc-shipping__line { font-size:14px; }
}
