/* Product Detail Page Styles */

/* Flash Sale Product Badge and Pricing */
.flash-sale-product-badge {
    margin-bottom: 10px;
}

.flash-sale-discount-badge {
    background: #e31650;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-top: 6px;
}

.product-price-heading.flash-sale-active {
    color: #e31650 !important;
    font-weight: bold;
}

.product-price-heading.flash-sale-active .product-offer-del {
    color: #999;
    font-weight: normal;
}

/* Fix row display and add margin between rows */
.radio-group.variationPickerContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Show 4 variants per row and add top margin for subsequent rows */
.variationPickerRow {
    flex: 0 0 calc(25% - 10px);
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* Add margin to create a gap between rows */
.variationPickerRow:nth-child(n+5) {
    margin-top: 40px;
}

/* Ensure proper alignment of elements */
.variationInputTitle {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Make the icons consistent */
.variationInputTitle i.icon {
    margin-left: 5px;
    font-size: 16px;
}

/* Icon colors for different flags */
.icon-atomizer {
    color: #2196f3;
}

.icon-tester {
    color: #ffa500;
}

.icon-set {
    color: #4caf50;
}

.icon-damaged {
    color: #f44336;
}

/* Selected variant flags display */
.selected-variant-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.flag-badge,
.delivery-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: #f1f3f4;
    color: #555;
    font-size: 12px;
    font-weight: 500;
    gap: 5px;
    transition: all 0.2s ease;
}

.flag-badge:hover,
.delivery-badge:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.flag-badge i,
.delivery-badge i {
    font-size: 13px;
}

.flag-tester i {
    color: #f39c12;
}

.flag-set i {
    color: #27ae60;
}

.flag-atomizer i {
    color: #3498db;
}

.flag-damaged i {
    color: #e74c3c;
}

.delivery-badge {
    background: #e8f4fd;
}

.delivery-badge i {
    color: #6c757d;
}


/* Desktop Thumbnail Styles */
#thumbnail-list-desktop li.selectedThumb {
    position: relative;
}

#thumbnail-list-desktop li.selectedThumb::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: #4a90e2;
    border-radius: 3px;
}

#thumbnail-list-desktop li {
    margin-bottom: 15px;
}

#thumbnail-list-desktop li:last-child {
    margin-bottom: 0;
}

/* Mobile Thumbnail List Styles */
#thumbnail-list-mobile {
    list-style: none !important;
    padding: 16px !important;
    margin: 15px 0 0 0 !important;
    display: flex !important;
    overflow-x: auto !important;
    scroll-behavior: smooth;
    gap: 12px;
    height: auto !important;
    
    /* Minimal scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

#thumbnail-list-mobile::-webkit-scrollbar {
    height: 2px;
}

#thumbnail-list-mobile::-webkit-scrollbar-track {
    background: transparent;
}

#thumbnail-list-mobile::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 1px;
    transition: background 0.2s ease;
}

#thumbnail-list-mobile::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

#thumbnail-list-mobile li {
    flex-shrink: 0;
    width: 80px !important;
    height: 80px !important;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: none !important;
}

#thumbnail-list-mobile li:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

#thumbnail-list-mobile li.selectedThumb {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#thumbnail-list-mobile li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease;
    border: none !important;
    outline: none !important;
    display: block;
}

#thumbnail-list-mobile li:hover img {
    opacity: 0.95;
}

#thumbnail-list-mobile li.selectedThumb img {
    opacity: 1;
}

/* Variation Descriptions Styles */
.variation-descriptions {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
}

.description-section {
    margin-bottom: 25px;
}

.description-section:last-child {
    margin-bottom: 0;
}

.description-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.description-section p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #555;
}

.shades-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.shade-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.color-swatch {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.variation-params-list,
.variation-set-list,
.variation-venture-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.variation-params-list li,
.variation-set-list li,
.variation-venture-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
}

.variation-params-list li:last-child,
.variation-set-list li:last-child,
.variation-venture-list li:last-child {
    margin-bottom: 0;
}

.variation-params-list strong,
.variation-set-list strong,
.variation-venture-list strong {
    color: #333;
    margin-right: 8px;
}

/* Gallery Transition Styles */
#mainImage {
    transition: opacity 0.3s ease-in-out;
}

.thumbnails li img {
    transition: opacity 0.2s ease-in-out;
}

.image-loading-container {
    position: relative;
}

.image-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #4a90e2;
    animation: spin 0.8s linear infinite;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.image-loading-active #mainImage {
    opacity: 0.4;
}

.image-loading-active .image-loading-spinner {
    opacity: 1;
    visibility: visible;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.thumbnails li.selectedThumb {
    position: relative;
    transform: translateY(-2px);
}

.thumbnails li.selectedThumb::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: #4a90e2;
    border-radius: 3px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .variationPickerRow {
        flex: 0 0 calc(33.33% - 10px);
    }
    
    .variationPickerRow:nth-child(n+4) {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .variationPickerRow {
        flex: 0 0 calc(50% - 10px);
    }
    
    .variationPickerRow:nth-child(n+3) {
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .variationPickerRow {
        flex: 0 0 100%;
    }
    
    .variationPickerRow:nth-child(n+2) {
        margin-top: 20px;
    }
    
    #thumbnail-list-mobile {
        padding: 12px !important;
        gap: 8px;
    }

    #thumbnail-list-mobile li {
        width: 70px !important;
        height: 70px !important;
    }
}

/* Stock Urgency Badge */
.stock-urgency-badge {
    background: #fff;
    color: #000;
    padding: 6px 12px;
    margin-top: 8px;
    border: 1px solid #000;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.stock-urgency-badge span {
    display: block;
}

/* Remove hover effect from product title */
.wsus__pro_details_text .title:hover {
    color: inherit !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .stock-urgency-badge {
        font-size: 11px;
        padding: 5px 10px;
        margin-top: 6px;
    }
}