/**
 * CarOutlet Luxury — single-vehicle reskin.
 *
 * Loaded only when <body> has `col-luxury-detail`, applied by
 * CarOutlet_Luxury_Detail (inc/luxury-detail.php) on Cerro Colorado-origin
 * vehicles (or via ?preview_luxury=1).
 *
 * Cwicly's single-vehicle template renders the page using auto-generated
 * hashed class names (`div-c…`, `paragraph-c…`, `heading-c…`, `button-c…`,
 * `taxonomyterms-c…`). The hashes are NOT stable across template re-saves,
 * so we target via attribute selectors `[class*="paragraph-"]` etc.
 *
 * Scoping: the Cwicly site header (<header.cc-sct>) and footer
 * (<footer.cc-sct>) keep their default look. Everything else inside
 * `.wp-site-blocks` gets the Luxury palette — content area only.
 *
 * Palette mirrors blocks/luxury-page/luxury-page.css:
 *   #0a0a0a — black background
 *   #141414 — card surface
 *   #f5f1ea — primary cream text
 *   #c9a86a — gold accent
 */

/* ---------- Body / page background ---------- */

body.col-luxury-detail {
    background: #0a0a0a;
}

/* The Cwicly header sits on top with a translucent/floating chrome. We leave
   it alone — only the content region below it is restyled. */
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) {
    background-color: #0a0a0a;
    color: #f5f1ea;
}

/* ---------- Typography ---------- */

body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) h1,
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) h2,
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) h3,
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) h4,
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="heading-"] {
    font-family: Georgia, "Times New Roman", serif !important;
    font-weight: 400 !important;
    color: #f5f1ea !important;
    letter-spacing: 0.01em !important;
}

body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) p,
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="paragraph-"],
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) li {
    color: rgba(245, 241, 234, 0.85) !important;
    background-color: transparent !important;
}

/* Brand badge (taxonomy term, e.g. SKODA) → gold uppercase eyebrow */
body.col-luxury-detail [class*="taxonomyterms-"] {
    color: #c9a86a !important;
    font-family: "Readex Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.22em !important;
    font-size: 11px !important;
}

/* ---------- Containers — strip white backgrounds, soften borders ---------- */

body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="div-"],
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="container-"],
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="repeater-"] {
    background-color: transparent !important;
    border-color: rgba(201, 168, 106, 0.15) !important;
}

/* Soft card surface for the right-column sidebar (price/CTA) and the
   gallery wrapper. We can't reliably identify them by hash so we fall back
   to harmless defaults — the dark body already reads luxe. */

/* ---------- Buttons ---------- */

body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) a.cc-btn,
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="button-"] {
    background: #c9a86a !important;
    color: #0a0a0a !important;
    border: 1px solid #c9a86a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) a.cc-btn:hover,
body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="button-"]:hover {
    background: #d9ba7d !important;
    border-color: #d9ba7d !important;
    color: #0a0a0a !important;
}

/* ---------- "Volver" back-link ----------
   Cwicly markup: <a class="button-c… cc-btn"> — the Volver link is the first
   .cc-btn directly inside the section's .cc-cntr (the SOLICITA TU CRÉDITO
   primary button is nested deeper inside the right-column sidebar). The
   generic [class*="button-"] rule above paints both gold; here we override
   only the Volver one back to a transparent ghost-link style. */

body.col-luxury-detail .wp-site-blocks section.cc-sct > .cc-cntr > a.cc-btn {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #c9a86a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.18em !important;
    font-size: 12px !important;
    font-family: "Readex Pro", -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 500 !important;
}

body.col-luxury-detail .wp-site-blocks section.cc-sct > .cc-cntr > a.cc-btn:hover,
body.col-luxury-detail .wp-site-blocks section.cc-sct > .cc-cntr > a.cc-btn:focus-visible {
    background: transparent !important;
    border: none !important;
    color: #d9ba7d !important;
}

body.col-luxury-detail .wp-site-blocks section.cc-sct > .cc-cntr > a.cc-btn svg path,
body.col-luxury-detail .wp-site-blocks section.cc-sct > .cc-cntr > a.cc-btn svg {
    stroke: #c9a86a !important;
    fill: #c9a86a !important;
    color: #c9a86a !important;
}

/* ---------- Vehicle metadata badges ---------- */

body.col-luxury-detail .vehicle-extra,
body.col-luxury-detail .vehicle-code,
body.col-luxury-detail .vehicle-plate {
    color: rgba(245, 241, 234, 0.55) !important;
    font-family: "Readex Pro", -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: 0.04em !important;
    background-color: transparent !important;
}

/* ---------- Sucursal pin badge (LAS CONDES) ----------
   Markup is `<div class="cc-icn"…> <p>LAS CONDES</p>`. We tint the icon SVG
   gold and apply the small uppercase eyebrow treatment to the text right
   next to it. */

body.col-luxury-detail .cc-icn svg,
body.col-luxury-detail .cc-icn svg path,
body.col-luxury-detail [class*="icon-"][class*="cc-icn"] svg,
body.col-luxury-detail [class*="icon-"][class*="cc-icn"] svg path {
    fill: #c9a86a !important;
    stroke: #c9a86a !important;
    color: #c9a86a !important;
}

/* The cc-icn rule above is broad. The floating WhatsApp button is also a
   cc-icn anchor, but its glyph must stay WhatsApp white over the green pill.
   Restore white on any cc-icn that links to WhatsApp. */
body.col-luxury-detail a.cc-icn[href*="wa.me"] svg,
body.col-luxury-detail a.cc-icn[href*="wa.me"] svg path,
body.col-luxury-detail a.cc-icn[href*="whatsapp"] svg,
body.col-luxury-detail a.cc-icn[href*="whatsapp"] svg path {
    fill: #ffffff !important;
    stroke: none !important;
    color: #ffffff !important;
}

body.col-luxury-detail .cc-icn + p,
body.col-luxury-detail [class*="icon-"][class*="cc-icn"] + p {
    color: #c9a86a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.22em !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    font-family: "Readex Pro", -apple-system, BlinkMacSystemFont, sans-serif !important;
    margin: 0 !important;
}

/* ---------- Spec row (AÑO 2023 / Gasolina / Automático / 28.707 kms) ----------
   Markup is `.div-c37bef7 > .div-c… > (img.cc-img | p)+ p`. Cwicly emits each
   item as its own flex wrapper but with inconsistent gap (2-5px) and varying
   align-items (center / normal / flex-end) and icon sizes (15-20px), which
   makes the row look misaligned. We normalize all items to a single shape:
   centered icon + uppercase tracked label, equal inner gap.
   Hashes (`.div-c37bef7`, `.div-c…`) are unstable across Cwicly template
   re-saves; if they shift, re-inspect via DevTools and update here. */

body.col-luxury-detail .div-c37bef7 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 18px !important;
    align-items: center !important;
    justify-items: start !important;
    margin: 6px 0 20px !important;
}

/* Each spec item: icon + label, centered against each other */
body.col-luxury-detail .div-c37bef7 > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}

/* Normalize spec icons. The SVGs (gas-station / manual-transmission /
   tachometer) ship without an explicit fill, so browsers render them solid
   black — invisible on the dark Luxury background. Recolor to gold via a
   filter chain. The recipe below is the sosuke-style approximation for
   target #c9a86a (https://codepen.io/sosuke/pen/Pjoqqp): brightness(0) +
   saturate(100%) flattens any input to pure black, then the rest of the
   chain pushes black → gold. */
body.col-luxury-detail .div-c37bef7 img.cc-img,
body.col-luxury-detail .div-c37bef7 [class*="image-"] {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    object-fit: contain !important;
    background: transparent !important;
    filter: brightness(0) saturate(100%) invert(78%) sepia(45%) saturate(498%) hue-rotate(353deg) brightness(86%) contrast(85%) !important;
}

body.col-luxury-detail .div-c37bef7 p {
    text-transform: uppercase !important;
    letter-spacing: 0.18em !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    font-family: "Readex Pro", -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: rgba(245, 241, 234, 0.75) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
}

/* ---------- Gallery image surround ---------- */

body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) img {
    background-color: #0a0a0a;
}

/* ---------- Equipamiento check items ---------- */

body.col-luxury-detail .wp-site-blocks > *:not(header):not(footer) [class*="div-"] {
    color: rgba(245, 241, 234, 0.85) !important;
}

/* ---------- WhatsApp floating button — dim slightly so the gold pops ---------- */

body.col-luxury-detail [href*="wa.me"] {
    /* Keep functional; just sit calmly on the dark page */
    filter: saturate(0.9);
}
