/**
 * AutoTrader Carousels Styles
 */

/* Base Styles */
.atc-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 40px 0;
    padding: 40px 20px;
    overflow: hidden;
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.atc-carousel-wrapper.atc-initialized {
    opacity: 1;
    visibility: visible;
}

.atc-carousel-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.atc-carousel-header {
    margin-bottom: 30px;
    text-align: center;
}

.atc-carousel-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: inherit;
}

.atc-brands-list {
    margin-top: 20px;
}

.atc-brands-intro {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.atc-brands-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.atc-brand-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--atc-brand-pill-bg, rgba(255, 255, 255, 0.2));
    color: var(--atc-brand-pill-text, inherit);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Carousel */
.atc-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.atc-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    padding: 10px 0;
    min-width: 0;
    max-width: 100%;
}

/* Hide overflow until initialized */
.atc-carousel-wrapper:not(.atc-initialized) .atc-carousel-track {
    overflow: hidden;
}

.atc-carousel-track::-webkit-scrollbar {
    display: none;
}

/* Navigation Arrows */
.atc-carousel-nav {
    position: relative;
    width: 50px;
    height: 50px;
    border: none;
    background: var(--atc-arrow-bg, rgba(255, 255, 255, 0.9));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
}

.atc-carousel-nav:hover {
    background: var(--atc-arrow-bg-hover, var(--atc-arrow-bg, rgba(255, 255, 255, 1)));
    opacity: 1;
    transform: scale(1.1);
}

.atc-carousel-nav:active {
    transform: scale(0.95);
}

.atc-carousel-nav.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.atc-carousel-nav.disabled:hover {
    transform: none;
    background: var(--atc-arrow-bg, rgba(255, 255, 255, 0.9));
}

.atc-carousel-nav svg {
    width: 24px;
    height: 24px;
    color: var(--atc-arrow-icon, #333);
    stroke: var(--atc-arrow-icon, #333);
    display: block;
    flex-shrink: 0;
}

/* Arrow Sizes */
.atc-carousel-nav.arrow-small {
    width: 40px;
    height: 40px;
}

.atc-carousel-nav.arrow-small svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.atc-carousel-nav.arrow-medium {
    width: 50px;
    height: 50px;
}

.atc-carousel-nav.arrow-medium svg {
    stroke-width: 3;
}

.atc-carousel-nav.arrow-large {
    width: 60px;
    height: 60px;
}

.atc-carousel-nav.arrow-large svg {
    width: 28px;
    height: 28px;
    stroke-width: 3.5;
}

/* Arrow Shapes */
.atc-carousel-nav.shape-circle {
    border-radius: 50%;
}

.atc-carousel-nav.shape-square {
    border-radius: 8px;
}

/* Bike Card */
.atc-bike-card {
    flex: 0 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.atc-bike-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.atc-bike-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.atc-bike-link:hover {
    text-decoration: none;
    color: inherit;
}

.atc-bike-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.atc-bike-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.atc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.atc-badge-new {
    background: var(--atc-badge-new-bg, #10b981);
    color: var(--atc-badge-new-text, #fff);
}

.atc-badge-used {
    background: var(--atc-badge-used-bg, #f59e0b);
    color: var(--atc-badge-used-text, #fff);
}

.atc-town-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 18px 0 8px;
    position: relative;
    z-index: 5;
}

.atc-town-filter {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #fff;
    color: #111;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.atc-town-filter:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.4);
}

.atc-town-filter.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.atc-bike-card.atc-town-hidden {
    display: none !important;
}

.atc-shop-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    z-index: 3;
    pointer-events: none;
}

.atc-bike-origin {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 6px;
}

.atc-bike-details {
    padding: 20px;
}

.atc-bike-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1f2937;
}

.atc-bike-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.atc-spec {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.atc-bike-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}

.atc-view-more {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: var(--atc-view-more-bg, #1f2937);
    color: var(--atc-view-more-text, #fff);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
    box-sizing: border-box;
}

.atc-bike-link:hover .atc-view-more {
    background: var(--atc-view-more-hover-bg, var(--atc-view-more-bg, #374151));
    transform: translateY(-2px);
}

.atc-bike-link:active .atc-view-more {
    transform: translateY(0);
}

/* View All button */
.atc-view-all-wrap {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.atc-view-all-btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease, opacity 0.2s ease, border-color 0.25s ease, color 0.25s ease;
    background: var(--atc-view-all-bg, var(--atc-view-more-bg, #1f2937)) !important;
    border-color: var(--atc-view-all-bg, var(--atc-view-more-bg, #1f2937)) !important;
    color: var(--atc-view-all-text, var(--atc-view-more-text, #fff)) !important;
}

.atc-view-all-btn:hover,
.atc-view-all-btn:focus {
    background: var(--atc-view-all-hover-bg, var(--atc-view-more-hover-bg, #374151)) !important;
    border-color: var(--atc-view-all-hover-bg, var(--atc-view-more-hover-bg, #374151)) !important;
    color: var(--atc-view-all-text, var(--atc-view-more-text, #fff)) !important;
    text-decoration: none;
}

.atc-view-all-btn:active {
    transform: translateY(0);
}

/* Background Animations */
.atc-carousel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    background: transparent;
}

/* Suzuki Carousel Background */
.atc-suzuki-carousel .atc-carousel-background {
    background: transparent;
}

/* Used Carousel Background */
.atc-used-carousel .atc-carousel-background {
    background: transparent;
}

/* Mixed Carousel Background */
.atc-mixed-carousel .atc-carousel-background {
    background: transparent;
}


/* Responsive Design */
@media (max-width: 768px) {
    .atc-carousel-wrapper {
        padding: 20px 5px;
    }
    
    .atc-carousel-container {
        padding: 0;
    }
    
    .atc-carousel-title {
        font-size: 1.5rem;
    }
    
    .atc-carousel {
        gap: 0;
        position: relative;
    }
    
    .atc-carousel-nav {
        position: absolute;
        width: 35px;
        height: 35px;
        z-index: 10;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .atc-carousel-nav.atc-carousel-prev {
        left: 5px;
    }
    
    .atc-carousel-nav.atc-carousel-next {
        right: 5px;
    }
    
    .atc-carousel-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .atc-carousel-track {
        gap: 10px;
        padding: 5px 0;
        width: 100%;
    }
    
    .atc-bike-card {
        /* Width will be set dynamically by JavaScript */
        width: 100% !important;
    }
    
    .atc-brands-tags {
        gap: 8px;
    }
    
    .atc-brand-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .atc-carousel-wrapper {
        padding: 15px 0;
    }
    
    .atc-carousel-container {
        padding: 0;
    }
    
    .atc-carousel-title {
        font-size: 1.25rem;
    }
    
    .atc-carousel {
        gap: 0;
        position: relative;
    }
    
    .atc-carousel-nav {
        position: absolute;
        width: 30px;
        height: 30px;
        z-index: 10;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .atc-carousel-nav.atc-carousel-prev {
        left: 3px;
    }
    
    .atc-carousel-nav.atc-carousel-next {
        right: 3px;
    }
    
    .atc-carousel-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .atc-carousel-track {
        gap: 10px;
        padding: 5px 0;
        width: 100%;
    }
    
    .atc-bike-card {
        /* Width will be set dynamically by JavaScript */
        width: 100% !important;
    }
}

/* Theme Color Inheritance */
.atc-carousel-wrapper.use-theme-colors {
    /* These will be overridden by JavaScript based on theme colors */
}

.atc-carousel-wrapper.use-theme-colors .atc-carousel-nav {
    background: var(--atc-arrow-bg, var(--atc-button-bg, rgba(255, 255, 255, 0.9)));
    color: var(--atc-arrow-icon, var(--atc-button-color, #333));
}

.atc-carousel-wrapper.use-theme-colors .atc-carousel-nav:hover {
    background: var(--atc-arrow-bg-hover, var(--atc-button-hover-bg, rgba(255, 255, 255, 1)));
}

.atc-carousel-wrapper.use-theme-colors .atc-carousel-nav svg {
    color: var(--atc-arrow-icon, var(--atc-button-color, #333));
    stroke: var(--atc-arrow-icon, var(--atc-button-color, #333));
}

.atc-carousel-wrapper.use-theme-colors .atc-brand-tag {
    background: var(--atc-brand-pill-bg, var(--atc-accent-bg, rgba(255, 255, 255, 0.2)));
    border-color: var(--atc-accent-border, rgba(255, 255, 255, 0.3));
    color: var(--atc-brand-pill-text, var(--atc-accent-color, inherit));
}

.atc-carousel-wrapper.use-theme-colors .atc-bike-price {
    color: var(--atc-price-color, #1f2937);
}

/* Error and No Results Messages */
.atc-error,
.atc-no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
}

.atc-error {
    color: #ef4444;
    background: #fee2e2;
    border-radius: 8px;
}

