/* Product Description Styling */
.description-content {
    line-height: 1.6;
    color: #2c3e50;
}
.description-content p {
    margin: 0.5em 0;
}
.description-content strong {
    color: #2c3e50;
    font-weight: 600;
}
.description-content ul,
.description-content ol {
    padding-right: 1.5em;
    margin: 0.5em 0;
}
.description-content li {
    margin: 0.3em 0;
}
.description-content figure {
    margin: 1em 0;
    text-align: center;
}
.description-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.description-content blockquote {
    border-right: 4px solid #e9ecef;
    padding: 0.5em 1em;
    margin: 1em 0;
    background: #f8f9fa;
    border-radius: 4px;
}
/* Fix spacing issues */
.description-content p:empty,
.description-content p:blank,
.description-content p:has(br):only-child {
    display: none;
}

/* Product Variants Styling */
.product-variants {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.variant-group {
    margin-bottom: 1rem;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-label {
    background: #fff;
    border: 2px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.variant-option:checked + .variant-label {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.variant-label:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.variant-option:checked + .variant-label:hover {
    background: #0056b3;
}

.price-modifier {
    font-size: 0.85em;
    opacity: 0.8;
}

.variant-option {
    display: none;
}

/* Color Variant Styling */
.color-variant {
    padding: 0;
    min-width: auto;
    border: none !important;
    background: transparent !important;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    cursor: pointer;
}

.variant-option:checked + .color-variant .color-circle {
    border-color: #fff;
    box-shadow: 0 0 0 2px #007bff, 0 2px 4px rgba(0,0,0,0.2);
}

.color-variant:hover .color-circle {
    border-color: #007bff;
    transform: scale(1.1);
}

.color-name {
    display: none;
}

.color-options {
    gap: 0.75rem;
}

/* Special handling for white color */
.color-circle[style*="ffffff"], 
.color-circle[style*="white"] {
    border-color: #ccc !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .variant-group {
        margin-bottom: 1.5rem;
    }
    
    .variant-options {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .variant-label {
        flex: 0 0 auto;
        min-width: 60px;
        max-width: 120px;
        text-align: center;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-height: 40px;
        display: flex;
        align-items: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .color-variant {
        justify-content: center;
        padding: 0.25rem;
        min-height: 40px;
        flex: 0 0 auto;
    }
    
    .color-circle {
        width: 32px;
        height: 32px;
    }
    
    .color-options {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .variant-group h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .variant-options {
        gap: 0.4rem;
        justify-content: flex-start;
    }
    
    .variant-label {
        min-width: 50px;
        max-width: 100px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
    
    .color-circle {
        width: 28px;
        height: 28px;
    }
    
    .color-options {
        gap: 0.4rem;
    }
    
    .color-variant {
        padding: 0.2rem;
        min-height: 36px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet styles */
    .variant-options {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .variant-label {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 120px;
    }
    
    .color-options {
        justify-content: flex-start;
        gap: 1rem;
    }
}

/* Product Image Gallery Styling */
.product-image-gallery {
    width: 100%;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.thumbnail-item:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .main-image-container {
        height: 400px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .thumbnail-gallery {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .main-image-container {
        height: 400px;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
    
    .thumbnail-gallery {
        gap: 6px;
    }
}
