/**
 * WPC Listing Color Swatches Stylesheet
 */
.wpc-listing-image-container {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.wpc-listing-image-inner {
    position: relative !important;
    width: 100% !important;
    height: 90% !important;
    margin: 0 auto !important;
}

.wpc-listing-base-image,
.wpc-listing-overlay-image,
.wpc-listing-logo-image {
    position: absolute !important;
    display: block !important;
    max-width: none !important;
    object-fit: contain !important;
    pointer-events: none !important; /* Allows hover events to pass through to listing links */
}

.wpc-listing-swatches-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 12px 0;
    position: relative;
    box-sizing: border-box;
}

.wpc-listing-swatches-wrapper {
    overflow: hidden;
    width: 150px; /* Fallback default: (22px * 5) + (8px * 4) + 8px padding */
    position: relative;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

/* When carousel is active (more items than visible), align to start so first item is shown at translateX(0) */
.wpc-listing-swatches-carousel.carousel-active .wpc-listing-swatches-wrapper {
    justify-content: flex-start !important;
}

.wpc-listing-swatches {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 6px 4px !important;
    width: max-content !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box;
}

.wpc-listing-swatch {
    display: inline-block;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    padding: 2px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Arrow styling */
.wpc-swatches-arrow {
    background: none !important;
    border: none !important;
    color: #475569 !important;
    font-size: 24px !important;
    line-height: 1 !important;
    width: 20px !important;
    height: 28px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 4px !important;
    transition: color 0.2s ease, opacity 0.2s ease !important;
    outline: none !important;
    user-select: none !important;
}

.wpc-swatches-arrow:hover:not(:disabled) {
    color: #0f172a !important;
}

.wpc-swatches-arrow:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.wpc-listing-swatch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Hover effect */
.wpc-listing-swatch:hover {
    transform: scale(1.15);
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Selected state style */
.wpc-listing-swatch.active {
    border-color: #3b82f6; /* Modern Blue indicator */
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    transform: scale(1.08);
}
