/**
 * Product Feature Image and Gallery Styles
 *
 * Custom styles for the adt_product_feature_image and adt_product_gallery shortcodes
 */

/* Product Feature Image */
.adt-product-feature-image {
    display: block;
    position: relative;
    overflow: hidden;
}

.adt-product-feature-image a {
    display: block;
    cursor: pointer;
}

.adt-product-feature-image img.adt-feature-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.adt-product-feature-image a:hover img.adt-feature-image {
    transform: scale(1.05);
}

/* Variation loading state — spinner overlay, image fades out, size/bg preserved */
.adt-product-feature-image.adt-loading img.adt-feature-image,
.adt-product-gallery.adt-loading .adt-gallery-image {
    opacity: 0;
    transition: opacity 0.15s;
}

.adt-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.adt-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(143, 81, 69, 0.2);
    border-top-color: #8f5145;
    border-radius: 50%;
    animation: adt-spin 0.7s linear infinite;
}

@keyframes adt-spin {
    to { transform: rotate(360deg); }
}

/* Product Gallery */
.adt-product-gallery {
    width: 100%;
}

.adt-product-gallery .adt-gallery-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: #d9d7c5;
}

.adt-product-gallery .adt-gallery-item a {
    display: block;
    cursor: pointer;
}

.adt-product-gallery img.adt-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.adt-product-gallery .adt-gallery-item a:hover img.adt-gallery-image {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .adt-product-gallery .adt-gallery-item {
        margin-bottom: 1rem;
    }
}
