.vtcar-strip {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.vtcar-track {
    width: 100%;
    box-sizing: border-box;
}

.vtcar-strip[data-layout="carousel"] .vtcar-track {
    display: flex;
    align-items: center;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.vtcar-strip[data-layout="carousel"] .vtcar-track::-webkit-scrollbar {
    display: none;
}

.vtcar-strip[data-layout="carousel"] .vtcar-track.vtcar-snap {
    scroll-snap-type: x mandatory;
}

.vtcar-strip[data-layout="grid"] .vtcar-track {
    display: grid;
    grid-template-columns: repeat(var(--vtcar-columns), minmax(0, 1fr));
    justify-items: var(--vtcar-grid-justify);
    overflow: visible;
}

.vtcar-item,
.vtcar-cta {
    flex: 0 0 auto;
}

.vtcar-snap .vtcar-item,
.vtcar-snap .vtcar-cta {
    scroll-snap-align: center;
}

.vtcar-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--vtcar-item-shadow, none);
    transition: box-shadow var(--vtcar-hover-speed, 200ms) ease;
}

.vtcar-item img {
    display: block;
    transform: scale(1) translateY(0) rotate(0deg);
    transition:
        transform var(--vtcar-hover-speed, 200ms) ease,
        box-shadow var(--vtcar-hover-speed, 200ms) ease,
        opacity var(--vtcar-hover-speed, 200ms) ease;
    transform-origin: center center;
}

.vtcar-item:hover img {
    transform: scale(var(--vtcar-hover-scale, 1.3)) translateY(var(--vtcar-hover-lift, 0px)) rotate(var(--vtcar-hover-rotate, 0deg));
    opacity: var(--vtcar-hover-opacity, 1);
    box-shadow: var(--vtcar-hover-shadow, none);
}

.vtcar-title {
    display: block;
    line-height: 1.2;
    margin-top: 6px;
}

.vtcar-cta {
    align-self: center;
    text-align: center;
}

.vtcar-cta a {
    display: inline-block;
    padding: 10px 16px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
}

.vtcar-cta-style-outline a {
    background: transparent !important;
    border-style: solid;
}

.vtcar-cta-style-link a {
    background: transparent !important;
    padding-left: 0;
    padding-right: 0;
    text-decoration: underline;
    border: none !important;
}

.vtcar-arrow {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.vtcar-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.vtcar-arrows-inside .vtcar-left {
    position: absolute;
    left: 8px;
}

.vtcar-arrows-inside .vtcar-right {
    position: absolute;
    right: 8px;
}

.vtcar-error {
    padding: 12px;
    background: #fff3f3;
    color: #9b0000;
    border: 1px solid #ffd1d1;
}

@media (max-width: 768px) {
    .vtcar-strip[data-layout="grid"] .vtcar-track {
        grid-template-columns: repeat(var(--vtcar-mobile-columns), minmax(0, 1fr));
    }

    .vtcar-item img {
        width: var(--vtcar-mobile-image-size) !important;
        height: var(--vtcar-mobile-image-size) !important;
    }

    .vtcar-arrow {
        width: 32px !important;
        height: 32px !important;
    }
}


/* Improved CTA placement support */
.vtcar-layout-grid .vtcar-cta {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
}

.vtcar-editor-grid .vtcar-editor-cta-full {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
}


/* CTA display controls */
.vtcar-cta {
    box-sizing: border-box;
}

.vtcar-cta a {
    box-sizing: border-box;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}



.vtcar-cta-subtitle {
    display: block;
    margin-top: 6px;
    line-height: 1.2;
}


/* CTA size and width controls */
.vtcar-cta a { text-align: center; }


/* Safe mobile product size repair */
@media (max-width: 768px) {
    body .vtcar-strip .vtcar-track .vtcar-item img {
        width: var(--vtcar-mobile-image-size, 70px) !important;
        height: var(--vtcar-mobile-image-size, 70px) !important;
        max-width: var(--vtcar-mobile-image-size, 70px) !important;
    }

    body .vtcar-strip[data-layout="grid"] .vtcar-track {
        grid-template-columns: repeat(var(--vtcar-mobile-columns, 2), minmax(0, 1fr)) !important;
    }
}


/* Simplified arrow behavior */
.vtcar-arrow {
    opacity: var(--vtcar-arrow-opacity, 1);
    transition: opacity 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.vtcar-arrow:hover:not(:disabled) {
    transform: scale(1.05);
}

.vtcar-no-scroll .vtcar-arrow {
    display: none !important;
}

.vtcar-arrow-disabled-fade .vtcar-arrow:disabled {
    opacity: 0.25 !important;
    cursor: default;
}

.vtcar-arrow-disabled-hide .vtcar-arrow:disabled {
    visibility: hidden;
    pointer-events: none;
}

.vtcar-arrow-disabled-none .vtcar-arrow:disabled {
    opacity: var(--vtcar-arrow-opacity, 1) !important;
}

.vtcar-arrow-visibility-hover .vtcar-arrow {
    opacity: 0;
    pointer-events: none;
}

.vtcar-arrow-visibility-hover:hover .vtcar-arrow,
.vtcar-arrow-visibility-hover:focus-within .vtcar-arrow {
    opacity: var(--vtcar-arrow-opacity, 1);
    pointer-events: auto;
}

.vtcar-arrows-inside .vtcar-left {
    left: var(--vtcar-arrow-offset, 8px);
}

.vtcar-arrows-inside .vtcar-right {
    right: var(--vtcar-arrow-offset, 8px);
}


/* Frontend-synced CTA rendering */
.vtcar-cta {
    box-sizing: border-box;
}

.vtcar-cta a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: var(--vtcar-cta-justify, center);
    gap: 0;
    transition:
        background var(--vtcar-cta-transition-speed, 180ms) ease,
        color var(--vtcar-cta-transition-speed, 180ms) ease,
        border-color var(--vtcar-cta-transition-speed, 180ms) ease,
        transform var(--vtcar-cta-transition-speed, 180ms) ease,
        box-shadow var(--vtcar-cta-transition-speed, 180ms) ease;
}

.vtcar-cta a:hover,
.vtcar-cta a:focus {
    background: var(--vtcar-cta-hover-bg, #d71920) !important;
    color: var(--vtcar-cta-hover-color, #ffffff) !important;
    border-color: var(--vtcar-cta-hover-border, var(--vtcar-cta-hover-bg, #d71920)) !important;
    box-shadow: var(--vtcar-cta-hover-shadow, none) !important;
    text-decoration: var(--vtcar-cta-hover-decoration, none) !important;
    transform: translateY(var(--vtcar-cta-hover-lift, -1px)) scale(var(--vtcar-cta-hover-scale, 1));
}

.vtcar-cta-subtitle {
    display: block;
    margin-top: 6px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .vtcar-cta a {
        width: var(--vtcar-cta-mobile-width, auto) !important;
        height: var(--vtcar-cta-mobile-height, auto) !important;
    }
}


/* CTA hover hard fallback */
.vtcar-cta-rendered > a:hover,
.vtcar-cta-rendered > a:focus,
.vtcar-cta-rendered > a.vtcar-cta-is-hovered {
    background: var(--vtcar-cta-hover-bg, #d71920) !important;
    color: var(--vtcar-cta-hover-color, #ffffff) !important;
    border-color: var(--vtcar-cta-hover-border, var(--vtcar-cta-hover-bg, #d71920)) !important;
    box-shadow: var(--vtcar-cta-hover-shadow, none) !important;
    text-decoration: var(--vtcar-cta-hover-decoration, none) !important;
    transform: translateY(var(--vtcar-cta-hover-lift, -1px)) scale(var(--vtcar-cta-hover-scale, 1)) !important;
}
