.cvcs-wrap {
    position: relative;
}

.cvcs-hero-img {
    width: 100%;
    height: auto;
    display: block;
}

.cvcs-colorset {
    display: none;
    gap: 14px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-top: 16px;
}

.cvcs-colorset.is-visible {
    display: flex;
}

/* Hardened reset: theme/global "button" styles (padding, line-height, min-height,
   box-sizing) commonly fight with swatch dots and stretch them into ellipses.
   aspect-ratio + !important on every sizing property closes that gap regardless
   of theme specificity. */
.cvcs-dot {
    box-sizing: border-box !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    border: 2px solid rgba(0, 0, 0, 0.15);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    overflow: hidden;
    padding: 0 !important;
    margin: 0;
    flex: 0 0 28px !important;
    line-height: 0;
    font-size: 0;
    vertical-align: middle;
    box-shadow: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cvcs-dot:hover {
    transform: scale(1.08);
}

.cvcs-dot.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e6511b;
}

/* Standalone colors-only shortcode (car_variant_colors) - used when the
   photo and the color dots live in separate Elementor columns, e.g. a
   left text column (colors above price) + a right image column, instead
   of a stacked full-bleed hero. Left-aligned, not centered. */
.cvcs-colors-wrap .cvcs-colorset {
    justify-content: flex-start;
    padding-top: 0;
    margin-bottom: 16px;
}

/* [car_variant_hero_image style="absolute"] - matches the original
   car-configurator.php hero: image fills its wrapping container
   absolutely so overlay content (colors/name/price/CTA) placed after it
   in the SAME Elementor container sits on top in normal flow.
   .cvcs-hero (outer) and .cvcs-overlay (inner) below are plain CSS
   classes YOU add via Elementor's Advanced > CSS Classes field on the
   two Containers - positioning is handled entirely here, no need to
   hunt for a "Relative" option in Elementor's own Position control. */
.cvcs-hero {
    position: relative !important;
    width: 100%;
    min-height: 480px !important;
    overflow: hidden;
}

.cvcs-overlay {
    position: relative !important;
    z-index: 2 !important;
    max-width: 420px;
    padding: 40px;
}

.cvcs-hero-img--absolute {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    z-index: 1 !important;
}

/* Mobile override for the absolute-hero layout - mirrors the original
   car-configurator.css breakpoint exactly (position:absolute doesn't
   translate to small screens, so we drop back to normal stacked flow).
   Requires the outer Elementor Container to carry class "cvcs-hero" and
   the inner overlay Container to carry class "cvcs-overlay" (set via
   Advanced > CSS Classes in Elementor - see setup guide). !important is
   needed here to beat Elementor's own inline position:relative style. */
@media (max-width: 768px) {
    .cvcs-hero {
        position: static !important;
        min-height: auto !important;
        display: flex;
        flex-direction: column;
    }
    .cvcs-hero-img--absolute {
        position: static !important;
        width: 100% !important;
        height: 170px !important;
        object-fit: cover;
        object-position: right center;
        order: 1;
    }
    .cvcs-overlay {
        position: static !important;
        z-index: auto !important;
        max-width: 100% !important;
        padding: 16px 20px 20px;
        order: 2;
    }
    .cvcs-overlay .cvcs-colorset {
        justify-content: center;
    }
}
