/* ATAD Product Gallery – namespaced from raw-product-gallery-carousel */

/* Container */
.atad-product-gallery.product-gallery.space-y-4 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Stage wrapper */
.atad-product-gallery .gallery-stage-wrapper {
    position: relative;
    width: 100%;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.atad-product-gallery .gallery-stage {
    position: relative;
    width: 100%;
}

/* One slide visible at a time */
.atad-product-gallery .gallery-slide {
    display: none;
}

.atad-product-gallery .gallery-slide.is-active {
    display: block;
}

.atad-product-gallery .gallery-slide.aspect-4-3 {
    aspect-ratio: 4 / 3;
    background-color: #ececf0;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.dark .atad-product-gallery .gallery-slide.aspect-4-3 {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

.atad-product-gallery .gallery-slide-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Video and embed fill slide */
.atad-product-gallery .gallery-slide-video,
.atad-product-gallery .gallery-slide-embed {
    width: 100%;
    height: 100%;
    display: block;
}

.atad-product-gallery .gallery-slide-video {
    object-fit: contain;
}

.atad-product-gallery .gallery-slide-embed {
    position: relative;
}

.atad-product-gallery .gallery-slide-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Nav buttons */
.atad-product-gallery .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 9999px;
    padding: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

.atad-product-gallery .gallery-nav:hover {
    background: #fff;
}

.atad-product-gallery .gallery-nav svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #003B7A;
}

.atad-product-gallery .gallery-prev {
    left: 0.5rem;
}

.atad-product-gallery .gallery-next {
    right: 0.5rem;
}

.dark .atad-product-gallery .gallery-nav {
    background: #fff;
    border-color: #fff;
}

.dark .atad-product-gallery .gallery-nav:hover {
    background: rgba(255, 255, 255, 0.9);
}

.dark .atad-product-gallery .gallery-nav svg {
    color: #003B7A;
}

/* Counter */
.atad-product-gallery .gallery-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.dark .atad-product-gallery .gallery-counter {
    background: rgba(0, 0, 0, 0.8);
}

/* Badge */
.atad-product-gallery .gallery-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: transparent;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: #003B7A;
    color: #fff;
}

.dark .atad-product-gallery .gallery-badge {
    background: #fff;
    color: #003B7A;
}

/* Description block */
.atad-product-gallery .gallery-description {
    background: rgba(236, 236, 240, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e5e7eb;
}

.dark .atad-product-gallery .gallery-description {
    background: rgba(42, 42, 42, 0.5);
    border-color: #3a3a3a;
}

.atad-product-gallery .gallery-description-text {
    font-size: 0.875rem;
    margin: 0;
}

.atad-product-gallery .gallery-description-label {
    font-weight: 500;
    color: #003B7A;
}

.dark .atad-product-gallery .gallery-description-label {
    color: #fff;
}

.atad-product-gallery .gallery-description-value {
    color: #717182;
}

.dark .atad-product-gallery .gallery-description-value {
    color: #b8b8b8;
}

/* Thumbnail strip */
.atad-product-gallery .gallery-thumbs {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.atad-product-gallery .gallery-thumbs-inner {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.atad-product-gallery .gallery-thumb {
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    padding: 0;
    background: none;
}

.atad-product-gallery .gallery-thumb:hover {
    border-color: #d1d5db;
}

.atad-product-gallery .gallery-thumb.is-active {
    border-color: #003B7A;
    box-shadow: 0 0 0 2px rgba(0, 59, 122, 0.2);
}

.atad-product-gallery .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
