/* Product detail imagery — the client's own product-page styles, moved here from
   the inline <style> in their product template so the page carries the same
   hover-zoom and thumbnail styling. Loaded only on product.php. */

/* Product imagery */
.product-main-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    cursor: zoom-in;
}

.product-main-image {
    /* A definite height is what lets the image cover the box. With height:auto the
       stage took each photograph's own aspect ratio, so a tall shot letterboxed and
       the whole column changed height as you clicked along the thumbnails. */
    height: 430px;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, transform-origin 0.2s ease;
    transform-origin: center center;
    display: block;
    margin: 0 auto;
}

.product-main-image.is-zoomed img {
    transform: scale(1.6);
}

.product-main-image.is-zoomed {
    cursor: zoom-out;
}

.small-img {
    display: flex;
    align-items: center;
    gap: 10px;
}

.small-img .thumb-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.small-img .thumb-nav:hover {
    background: #ff6600;
    border-color: #ff6600;
    color: #fff;
}

.small-container {
    flex: 1;
    overflow-x: auto;
    /* Only horizontal scroll (via the prev/next buttons). Without this, overflow-x
       makes overflow-y compute to `auto`, and the thumbnail's :hover scale(1.05)
       overflows the 80px height and pops an ugly vertical scrollbar on hover — a
       bug the live site has too. overflow-y:hidden + the small padding give the
       hover-scale room, and the scrollbar itself is hidden below. */
    overflow-y: hidden;
    display: flex;
    padding: 3px 0;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* old Edge/IE */
}

.small-container::-webkit-scrollbar {
    display: none;                /* Chrome / Safari */
}

#small-img-roll {
    display: flex;
    gap: 10px;
}

#small-img-roll img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

#small-img-roll img:hover {
    transform: scale(1.05);
}

#small-img-roll img.active-thumb {
    border-color: #ff6600;
}

@media (max-width: 767px) {
    .product-main-image {
        height: 320px;
    }

    .small-img {
        gap: 6px;
    }

    .small-img .thumb-nav {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    #small-img-roll img {
        width: 64px;
        height: 64px;
    }
}
