.cvc-vehicle-shop-wrap {
    margin: 30px 0;
    width: var(--cvc-wrap-width, 100%);
    max-width: var(--cvc-wrap-max-width, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.cvc-vehicle-shop-wrap.cvc-vehicle-shop-empty .cvc-vshop-no-vehicles-msg {
    max-width: var(--cvc-wrap-max-width, 1160px);
    margin: 6px auto 0;
    color: #5f6368;
}

/* Elementor wrapper can shrink shortcode blocks in empty-state; force full row width */
/* Strengthened Elementor shortcode container width rules - all forced to full width so empty-state cannot collapse */
.elementor-widget-shortcode .elementor-widget-container > .elementor-shortcode {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}
.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
}
.elementor-shortcode {
    width: 100% !important;
    max-width: 100% !important;
}

/* Empty state: force full-width selector in Elementor and frontend */
#cvc-vehicle-shop.cvc-vehicle-shop-empty {
    width: 100% !important;
    max-width: var(--cvc-wrap-max-width, 1160px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}
#cvc-vehicle-shop.cvc-vehicle-shop-empty #cvc-vehicle-selector.cvc-vehicle-selector-wrap {
    display: block !important;
    width: 100% !important;
    max-width: var(--cvc-wrap-max-width, 1160px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}
#cvc-vehicle-shop.cvc-vehicle-shop-empty .cvc-vs-inner,
#cvc-vehicle-shop.cvc-vehicle-shop-empty .cvc-vs-row,
#cvc-vehicle-shop.cvc-vehicle-shop-empty .cvc-vs-fields {
    width: 100% !important;
}

/* Keep finder width aligned with vehicles/products content area */
.cvc-vehicle-selector-wrap {
    width: var(--cvc-wrap-width, 100%) !important;
    max-width: var(--cvc-wrap-max-width, 1160px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Keep "Your Vehicles" + products exactly same width as finder */
.cvc-vehicle-shop-wrap > .cvc-vshop-top-row,
.cvc-vehicle-shop-wrap > .cvc-vshop-products {
    max-width: var(--cvc-wrap-max-width, 1160px);
    margin-left: auto;
    margin-right: auto;
}

/* Ensure vehicle selector dropdowns are in a single row when embedded in vehicle shop */
/* Target both direct embedding and Elementor widget embedding */
.cvc-vehicle-shop-wrap .cvc-vs-fields,
.cvc-vehicle-shop-wrap .cvc-vs-layout-horizontal .cvc-vs-fields,
.cvc-vehicle-shop-wrap #cvc-vehicle-selector .cvc-vs-fields,
.cvc-vehicle-shop-wrap .cvc-vehicle-selector-wrap .cvc-vs-fields,
.elementor-element .cvc-vehicle-selector-wrap .cvc-vs-fields {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: var(--cvc-vs-field-gap, 12px 16px) !important;
    align-items: flex-end !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    grid-template-columns: none !important;
}
.cvc-vehicle-shop-wrap .cvc-vs-field,
.cvc-vehicle-shop-wrap #cvc-vehicle-selector .cvc-vs-field,
.cvc-vehicle-shop-wrap .cvc-vehicle-selector-wrap .cvc-vs-field,
.elementor-element .cvc-vehicle-selector-wrap .cvc-vs-field {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}
.cvc-vehicle-shop-wrap .cvc-vs-field-color-dropdown,
.cvc-vehicle-shop-wrap #cvc-vehicle-selector .cvc-vs-field-color-dropdown,
.cvc-vehicle-shop-wrap .cvc-vehicle-selector-wrap .cvc-vs-field-color-dropdown,
.elementor-element .cvc-vehicle-selector-wrap .cvc-vs-field-color-dropdown {
    display: none !important; /* Hide color dropdown field */
}
/* Ensure proper layout order */
.cvc-vehicle-shop-wrap .cvc-vs-inner,
.elementor-element .cvc-vehicle-selector-wrap .cvc-vs-inner {
    display: flex !important;
    flex-direction: column !important;
}
.cvc-vehicle-shop-wrap .cvc-vs-fields,
.elementor-element .cvc-vehicle-selector-wrap .cvc-vs-fields {
    order: 1;
}
.cvc-vehicle-shop-wrap .cvc-vs-color-swatches-row,
.elementor-element .cvc-vehicle-selector-wrap .cvc-vs-color-swatches-row {
    order: 2;
    margin-top: 16px;
}
.cvc-vehicle-shop-wrap .cvc-vs-actions,
.elementor-element .cvc-vehicle-selector-wrap .cvc-vs-actions {
    order: 3;
    margin-top: 16px;
}

/* Selected Vehicle Banner */
.cvc-vshop-selected-banner {
    background: #E63946;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.2);
}

.cvc-vshop-selected-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.cvc-vshop-selected-details {
    font-weight: 500;
}
.cvc-vshop-heading {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
}
.cvc-vshop-products-heading {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cvc-vshop-active-vehicle-name {
    font-weight: 600;
    color: #2c3e50;
}

.cvc-vshop-active-label {
    background: #E63946;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cvc-vshop-heading-separator {
    color: #999;
    margin: 0 4px;
}
.cvc-vshop-step-desc {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
}
.cvc-vshop-tab-active-label {
    font-weight: 600;
    opacity: 0.95;
}
.cvc-vshop-vehicles {
    margin-bottom: 32px;
    padding: 24px;
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-top: none;
}
.cvc-vshop-top-row {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 12px;
}
.cvc-vshop-top-row .cvc-vshop-vehicles {
    margin-bottom: 0;
}
.cvc-vshop-top-side {
    display: flex;
}
.cvc-vshop-top-side .cvc-vshop-info-box {
    margin: 0;
    width: 100%;
    justify-content: center;
}
.cvc-vshop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.cvc-vshop-tab {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    display: inline-block;
    font-weight: 500;
}
.cvc-vshop-tab:hover {
    border-color: #E63946;
    color: #E63946;
    background: #fff5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(230, 57, 70, 0.15);
}
.cvc-vshop-tab.active {
    background: #E63946;
    border-color: #E63946;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}
.cvc-vshop-tab.active:hover {
    background: #c92a2a;
    border-color: #c92a2a;
    color: #fff;
    transform: translateY(-1px);
}
.cvc-vshop-add {
    padding: 10px 16px;
    border: 2px dashed #E63946;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}
.cvc-vshop-add:hover {
    border-color: #E63946;
    color: #E63946;
    background: #fff5f5;
    border-style: solid;
    transform: translateY(-1px);
}

/* Tab wrapper with close icon */
.cvc-vshop-tab-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cvc-vshop-tab-wrapper .cvc-vshop-tab {
    padding-right: 26px; /* space for close icon */
}

.cvc-vshop-tab-close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #E63946;
    color: #E63946;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.cvc-vshop-tab-close:hover {
    background: #E63946;
    color: #fff;
}

/* Reset vehicles button – match Add Vehicle styling */
.cvc-vshop-reset {
    padding: 10px 16px;
    border: 2px dashed #adb5bd;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    margin-left: 8px;
}

.cvc-vshop-reset:hover {
    border-color: #E63946;
    color: #E63946;
    background: #fff5f5;
}
.cvc-vshop-add:hover {
    border-color: #E63946;
    color: #E63946;
    background: #fff5f5;
    border-style: solid;
    transform: translateY(-1px);
}

/* Compatibility Message Box */
.cvc-vshop-compatibility-box {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff5f5;
    border-left: 4px solid #E63946;
    border-radius: 6px;
    color: #2c3338;
    font-size: 0.9rem;
    font-weight: 500;
}
.cvc-vshop-remove-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cvc-vshop-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}
.cvc-vshop-row:hover {
    background: #f8f9fa;
}
.cvc-vshop-row.active {
    background: #fff5f5;
    border-left: 3px solid #E63946;
    padding-left: 9px;
}
.cvc-vshop-row .cvc-vshop-label { 
    flex: 1; 
    font-weight: 500;
    color: #333;
}
.cvc-vshop-row.active .cvc-vshop-label {
    font-weight: 600;
    color: #E63946;
}
.cvc-vshop-active-badge {
    background: #E63946;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: visible;
}
.cvc-vshop-remove {
    padding: 4px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.cvc-vshop-remove:hover {
    background: #e0e0e0;
}
.cvc-vshop-products {
    margin-top: 0;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
/* Product Grid Layout */
.cvc-vshop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.cvc-vshop-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    /* Transition properties moved to animations section for better control */
}

.cvc-vshop-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cvc-vshop-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.cvc-vshop-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PERFECT MATCH Badge - Oval Shape */
.cvc-vshop-perfect-match-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #E63946;
    color: #fff;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-transform: none;
    letter-spacing: 0.3px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    line-height: 1.2;
    border-radius: 20px;
}


.cvc-vshop-product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cvc-vshop-product-title {
    margin: 0 0 10px 0;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.3;
    color: #000;
}

.cvc-vshop-product-title a {
    text-decoration: none;
    color: #000;
    transition: color 0.2s;
}

.cvc-vshop-product-title a:hover {
    color: #E63946;
}

.cvc-vshop-product-price {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #E63946;
    margin-bottom: 10px;
}

.cvc-vshop-product-description {
    font-size: 0.9rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.cvc-vshop-product-description p {
    margin: 0;
}

.cvc-vshop-product-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.cvc-vshop-product-form {
    flex: 0 0 60%;
    margin: 0;
    display: flex;
}

.cvc-vshop-add-to-cart-btn {
    width: 100%;
    background: #E63946;
    color: #fff;
    border: none;
    padding: 11px 16px;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cvc-vshop-add-to-cart-btn:hover {
    background: #c92a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
}

.cvc-vshop-add-to-cart-btn:active {
    transform: translateY(0);
}

.cvc-vshop-learn-more-btn {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #E63946;
    border: 2px solid #E63946;
    padding: 11px 16px;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
    white-space: nowrap;
    min-height: 38px;
    box-sizing: border-box;
}

.cvc-vshop-learn-more-btn:hover {
    background: #E63946;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.cvc-vshop-learn-more-btn:active {
    transform: translateY(0);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .cvc-vehicle-shop-wrap {
        padding: 0 15px;
        margin: 20px 0;
    }
    .cvc-vshop-vehicles,
    .cvc-vshop-products {
        padding: 16px;
        border-radius: 8px;
    }
    .cvc-vshop-heading {
        font-size: 1.2rem;
    }
    .cvc-vshop-products-heading {
        font-size: 1.1rem;
    }
    .cvc-vshop-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    .cvc-vshop-tab {
        width: 100%;
        text-align: center;
    }
    .cvc-vshop-add {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .cvc-vshop-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .cvc-vshop-product-image {
        aspect-ratio: 1 / 1;
    }
    
    .cvc-vshop-perfect-match-badge {
        font-size: 0.65rem;
        padding: 6px 12px;
    }
    
    .cvc-vshop-product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cvc-vshop-product-form,
    .cvc-vshop-learn-more-btn {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .cvc-vshop-selected-banner {
        padding: 12px 16px;
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .cvc-vshop-top-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cvc-vshop-top-side .cvc-vshop-info-box {
        min-height: auto;
    }
    .cvc-vshop-info-box {
        padding: 12px 16px;
    }
    .cvc-vshop-info-badge,
    .cvc-vshop-info-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .cvc-vshop-badge-separator,
    .cvc-vshop-info-separator {
        display: none;
    }
}
.cvc-vshop-no-products {
    color: #666;
    font-style: italic;
}
.cvc-vshop-info-box {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #E63946;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cvc-vshop-info-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.cvc-vshop-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #E63946;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}
.cvc-vshop-badge-text {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}
.cvc-vshop-badge-separator {
    color: #adb5bd;
    font-weight: 400;
}
.cvc-vshop-info-details {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #6c757d;
}
.cvc-vshop-info-item {
    white-space: nowrap;
}
.cvc-vshop-info-separator {
    color: #dee2e6;
}

/* ============================================
   COMPACT TOP SECTION + CLEAR PRODUCT SECTIONS
   ============================================ */

/* Make finder + vehicle summary area denser and cleaner */
.cvc-vehicle-shop-wrap {
    margin: 18px 0;
}

.cvc-vehicle-shop-wrap .cvc-vehicle-selector-wrap {
    margin: 0 auto 8px !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
}

.cvc-vehicle-shop-wrap .cvc-vs-title {
    margin: 0 0 10px 0 !important;
    font-size: 1.12rem !important;
}

.cvc-vehicle-shop-wrap .cvc-vs-field label {
    margin-bottom: 3px !important;
    font-size: 0.84rem !important;
}

.cvc-vehicle-shop-wrap .cvc-vs-select {
    min-height: 38px !important;
    padding: 8px 10px !important;
    font-size: 0.93rem !important;
}

.cvc-vehicle-shop-wrap .cvc-vs-actions {
    margin-top: 10px !important;
}

.cvc-vshop-vehicles {
    margin-bottom: 10px;
    padding: 16px 18px;
    border-radius: 10px;
}

.cvc-vshop-tabs {
    margin-bottom: 8px;
    gap: 6px;
}

.cvc-vshop-tab,
.cvc-vshop-add,
.cvc-vshop-reset {
    padding: 8px 12px;
    font-size: 0.88rem;
    border-radius: 7px;
}

.cvc-vshop-products {
    margin-top: 0;
    padding: 16px 18px;
    border-radius: 10px;
}

.cvc-vshop-products-heading {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

/* Separate recommended and upsell sections with clear backgrounds */
.cvc-vshop-recommended-section {
    background: #ffffff;
    border: 1px solid #eceff3;
    border-radius: 10px;
    padding: 12px 12px 14px;
}

.cvc-vshop-upsell-section {
    margin-top: 22px;
    background: #f8fafc;
    border: 1px solid #e4e9f0;
    border-radius: 10px;
    padding: 12px 12px 14px;
}

.cvc-vshop-upsell-section .cvc-vshop-products-heading {
    margin-bottom: 8px;
}

.cvc-vshop-recommended-section .cvc-vshop-product-grid,
.cvc-vshop-upsell-section .cvc-vshop-product-grid {
    margin-top: 12px;
}

/* Desktop/tablet refinements */
@media (max-width: 992px) {
    .cvc-vehicle-shop-wrap .cvc-vehicle-selector-wrap {
        padding: 12px 12px !important;
    }

    .cvc-vshop-vehicles,
    .cvc-vshop-products {
        padding: 14px;
    }

    .cvc-vshop-product-grid {
        gap: 16px;
    }
}

/* Mobile compact layout */
@media (max-width: 768px) {
    .cvc-vehicle-shop-wrap {
        margin: 12px 0;
        padding: 0 10px;
    }

    .cvc-vehicle-shop-wrap .cvc-vehicle-selector-wrap {
        padding: 10px !important;
        margin-bottom: 6px !important;
    }

    .cvc-vehicle-shop-wrap .cvc-vs-title {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    .cvc-vshop-vehicles,
    .cvc-vshop-products {
        padding: 12px;
    }

    .cvc-vshop-products-heading {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .cvc-vshop-tab,
    .cvc-vshop-add,
    .cvc-vshop-reset {
        font-size: 0.84rem;
        padding: 8px 10px;
    }

    .cvc-vshop-upsell-section {
        margin-top: 16px;
    }    .cvc-vshop-recommended-section,
    .cvc-vshop-upsell-section {
        padding: 10px;
    }
}

/* ============================================
   PREMIUM MICRO-ANIMATIONS
   Vehicle Shop Page Only
   ============================================ */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .cvc-vehicle-shop-wrap *,
    .cvc-vehicle-shop-wrap *::before,
    .cvc-vehicle-shop-wrap *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 1. Page Fade-In Animation */
.cvc-vehicle-shop-wrap {
    animation: cvcFadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes cvcFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. Staggered Product Card Reveal */
/* Cards start hidden, JS adds class to animate them in */
.cvc-vshop-product-card {
    opacity: 0;
    transform: translateY(20px);
}

/* When JS adds animation class, cards animate in */
.cvc-vshop-product-card.cvc-animate-card {
    animation: cvcCardReveal 0.6s ease-out forwards;
}

/* Fallback: if JS doesn't load, cards become visible after a delay */
@supports (animation: none) {
    .cvc-vshop-product-card:not(.cvc-animate-card) {
        animation: cvcCardReveal 0.6s ease-out 0.5s forwards;
    }
}

@keyframes cvcCardReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. Product Hover Lift (Enhanced) */
/* Note: Base card styles are defined above, here we add transitions and performance hints */
.cvc-vshop-product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform, opacity;
}

.cvc-vshop-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.25);
    border-color: #E63946;
}

/* 4. Image Zoom on Hover */
.cvc-vshop-product-image {
    overflow: hidden;
    position: relative;
}

.cvc-vshop-product-img {
    transition: transform 0.4s ease;
    will-change: transform;
}

.cvc-vshop-product-card:hover .cvc-vshop-product-img {
    transform: scale(1.05);
}

/* 5. Button Press Animation */
.cvc-vshop-add-to-cart-btn,
.cvc-vshop-learn-more-btn {
    transition: transform 0.15s ease;
    position: relative;
}

.cvc-vshop-add-to-cart-btn:active,
.cvc-vshop-learn-more-btn:active {
    transform: scale(0.95);
}

/* Enhanced button hover */
.cvc-vshop-add-to-cart-btn {
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.cvc-vshop-add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.4);
}

.cvc-vshop-learn-more-btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.cvc-vshop-learn-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.3);
}

/* 6. Soft Badge Animation */
.cvc-vshop-perfect-match-badge {
    transition: background-color 0.3s ease, transform 0.3s ease;
    background: #E63946;
}

.cvc-vshop-product-card:hover .cvc-vshop-perfect-match-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

/* Smooth transitions for product content */
.cvc-vshop-product-content {
    transition: opacity 0.3s ease;
}

.cvc-vshop-product-title a {
    transition: color 0.2s ease;
}

.cvc-vshop-product-price {
    transition: color 0.2s ease;
}

/* Optimize performance */
.cvc-vshop-product-img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .cvc-vehicle-shop-wrap {
        animation-duration: 0.3s;
    }
    
    .cvc-vshop-product-card.cvc-animate-card {
        animation-duration: 0.4s;
    }
    
    .cvc-vshop-product-card:hover {
        transform: translateY(-3px);
    }
    
    .cvc-vshop-product-card:hover .cvc-vshop-product-img {
        transform: scale(1.02);
    }
}

/* ============================================
   AJAX MODAL FOR ADDING VEHICLES
   ============================================ */

/* ============================================
   HARD ALIGNMENT: FINDER + VEHICLE SHOP
   (separate Elementor shortcode widgets)
   ============================================ */
@media (min-width: 769px) {
    .elementor-shortcode > #cvc-vehicle-selector.cvc-vehicle-selector-wrap,
    .elementor-shortcode > #cvc-vehicle-shop.cvc-vehicle-shop-wrap {
        width: var(--cvc-wrap-width, 100%) !important;
        max-width: var(--cvc-wrap-max-width, 1160px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .elementor-shortcode > #cvc-vehicle-shop.cvc-vehicle-shop-wrap {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .elementor-shortcode > #cvc-vehicle-shop.cvc-vehicle-shop-wrap > .cvc-vshop-top-row,
    .elementor-shortcode > #cvc-vehicle-shop.cvc-vehicle-shop-wrap > .cvc-vshop-products {
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.cvc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    animation: cvcModalFadeIn 0.2s ease-out;
    /* Prevent accidental clicks from closing modal - only X button or Escape key can close */
    cursor: default;
}

@keyframes cvcModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cvc-modal-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: cvcModalSlideUp 0.3s ease-out;
    overflow: hidden;
    position: relative;
    z-index: 1;
    /* Prevent clicks from propagating to overlay */
    pointer-events: auto;
}

@keyframes cvcModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cvc-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
}

.cvc-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

.cvc-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cvc-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.cvc-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cvc-modal-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
}

.cvc-modal-content {
    /* Vehicle selector form will be inserted here */
}

/* Ensure vehicle selector in modal uses horizontal layout */
.cvc-modal-content .cvc-vehicle-selector-wrap {
    max-width: 100%;
    margin: 0;
    background: transparent;
    padding: 0;
}

.cvc-modal-content .cvc-vs-fields {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: var(--cvc-vs-field-gap, 12px 16px) !important;
}

.cvc-modal-content .cvc-vs-field {
    flex: 1 1 0 !important;
    min-width: 0 !important;
}

.cvc-modal-content .cvc-vs-field-color-dropdown {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cvc-modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .cvc-modal-header {
        padding: 16px 20px;
    }
    
    .cvc-modal-body {
        padding: 20px;
    }
    
    .cvc-modal-content .cvc-vs-fields {
        flex-direction: column !important;
    }
    
    .cvc-modal-content .cvc-vs-field {
        min-width: 100% !important;
    }
}
