﻿:root {
    --primary: #177f4c;
    --primary-hover: #146e41;
    --navy: #1f315a;
    --gold: #ffc107;
    --surface: #fff;
    --radius: 0.5rem;
    --light: #f6fff9;
}

/* Main gallery box */
.product-gallery {
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: 0 4px 18px rgba(31,49,90,0.07);
    padding: 1.2rem 0.7rem;
    text-align: center;
}

/* Fix and center the main image box */
.main-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 380px;
    height: 380px;
    max-width: 100%;
    margin: 0 auto 16px auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(31,49,90,.07);
    overflow: hidden;
    position: relative;
}

#mainImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: none;
    display: block;
}

#openFullBtn {
    z-index: 2;
}

/* Thumbnails scroll with visual cues */
.thumbnails {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 8px;
    margin: 0 auto;
    max-width: 420px;
}

.thumb-btn {
    border-radius: var(--radius);
    padding: 0;
    outline: none;
    border: 2px solid transparent;
    background: transparent;
    min-width: 54px;
    min-height: 54px;
}

.thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    transition: border .13s;
}

.thumb-btn.active .thumb,
.thumb-btn:focus .thumb {
    border: 2px solid var(--primary);
    box-shadow: 0 2px 6px rgba(31,49,90,0.10);
}

/* Fullscreen image modal: always centered, never cropped */
.modal-fullscreen .modal-content {
    background: rgba(0,0,0,.87) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.modal-fullscreen .modal-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#modalImage {
    max-width: 85vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 32px rgba(31,49,90,.18);
}

/* Responsive */
@media (max-width: 991.98px) {
    .main-image-wrapper {
        width: 90vw;
        height: 320px;
    }
}

@media (max-width: 767.98px) {
    .main-image-wrapper {
        height: 280px;
    }

    .thumbnails {
        max-width: 94vw;
        gap: 0.375rem;
    }

    .thumb-btn {
        min-width: 48px;
        min-height: 48px;
    }

    .thumb {
        width: 48px;
        height: 48px;
    }

    .product-gallery {
        border-radius: 0;
        box-shadow: none;
        margin: 0 -0.75rem;
        padding: 0.75rem;
    }
}
:root {
    --primary: #177f4c;
    --primary-hover: #146e41;
    --navy: #1f315a;
    --gold: #ffc107;
    --surface: #fff;
    --radius: 0.5rem;
    --light: #f6fff9;
}

/* Container tweaks */
.product-detail {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Main gallery box */
.product-gallery {
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: 0 4px 18px rgba(31,49,90,0.07);
    padding: 1.2rem 0.7rem;
    text-align: center;
}

/* Fix and center the main image box */
.main-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 420px;
    max-width: 540px;
    margin: 0 auto 16px auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(31,49,90,.07);
    overflow: hidden;
    position: relative;
}

#mainImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: none;
    display: block;
}

#openFullBtn {
    z-index: 2;
}

/* Thumbnails scroll with visual cues */
.thumbnails {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 8px;
    margin: 0 auto;
    max-width: 100%;
}

.thumb-btn {
    border-radius: var(--radius);
    padding: 0;
    outline: none;
    border: 2px solid transparent;
    background: transparent;
    min-width: 54px;
    min-height: 54px;
}

.thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    transition: border .13s, transform .13s;
}

.thumb-btn.active .thumb, .thumb-btn:focus .thumb {
    border: 2px solid var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(31,49,90,0.10);
}

/* Fullscreen image modal: always centered, never cropped */
.modal-fullscreen .modal-content {
    background: rgba(0,0,0,.87) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.modal-fullscreen .modal-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#modalImage {
    max-width: 85vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 32px rgba(31,49,90,.18);
}

/* Variant styles */
.variant-option {
    cursor: pointer;
    transition: box-shadow .12s, transform .08s;
}

    .variant-option.active {
        box-shadow: 0 4px 20px rgba(23,127,76,0.08);
        border-color: rgba(23,127,76,0.15);
        transform: translateY(-2px);
        background-color: var(--primary-hover);
    }

        .variant-option.active .text-muted .text-primary {
            color: white !important;
            font-style: oblique
        }

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
    }

/* Responsive */
@@media (max-width: 991.98px) {
    .main-image-wrapper {
        height: 320px;
    }
}

@@media (max-width: 767.98px) {
    .main-image-wrapper {
        height: 210px;
    }

    .thumbnails {
        max-width: 94vw;
    }

    .product-title {
        font-size: 1.05rem;
    }
}

#modalImage {
    touch-action: none;
    cursor: grab;
    user-select: none;
}
.bi-arrows-fullscreen {
    color: #6c757d !important;
    transition: color 0.18s;
}

    .bi-arrows-fullscreen:hover,
    .bi-arrows-fullscreen:focus {
        color: #343a40 !important;
    }
