/* ==========================================================================
   Vertical Product Gallery Snippet - Responsive Stylesheet
   Version: 1.1.0
   Author: Angie (Mobile Responsive Fixed)
   ========================================================================== */

/* ===============================
   Gallery Container (Desktop Default)
================================= */
.custom-vertical-gallery-container_bca4a3c5 {
    display: flex;
    width: 100%;
    max-width: 540px;
    height: 373px;
    gap: 12px;
    flex-shrink: 0;
    align-items: flex-start;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* ===============================
   Left Thumbnail Column
================================= */
.custom-gallery-thumbnails-col_bca4a3c5 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 75px !important;
    height: 100%;
    flex-shrink: 0;
    max-height: 373px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    box-sizing: border-box;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.custom-gallery-thumb-item_bca4a3c5 {
    width: 65px;
    height: 74px !important;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.25s ease;
    border: 1px solid #ECECEC;
    flex-shrink: 0;
}

.custom-gallery-thumb-item_bca4a3c5 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.custom-gallery-thumb-item_bca4a3c5:hover {
    border-color: #2C46D3;
}

.custom-gallery-thumb-item_bca4a3c5.active_bca4a3c5 {
    border: 2px solid #2C46D3;
    box-shadow: 0 4px 12px rgba(44, 70, 211, 0.15);
}

/* ===============================
   Main Active Image
================================= */
.custom-gallery-main-col_bca4a3c5 {
    flex: 1;
    width: 463px;
    height: 373px;
    border-radius: 6px;
    border: 1px solid #ECECEC;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}

.custom-gallery-main-wrapper_bca4a3c5 {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0;
}

#custom-gallery-main-image_bca4a3c5 {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: contain;
    transition: opacity 0.25s ease;
}

/* ===============================
   WooCommerce Layout Overrides (Desktop)
================================= */
.single-product div.product {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px;
}

.woocommerce div.product div.images {
    width: 540px !important;
    max-width: 540px;
    flex: 0 0 540px;
}

.single-product div.product > .custom-vertical-gallery-container_bca4a3c5 {
    width: 540px;
    flex: 0 0 540px;
}

.woocommerce div.product div.summary {
    width: calc(100% - 580px) !important;
}

.single-product div.product > .summary.entry-summary {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    float: none !important;
}

.single-product div.product > .woocommerce-tabs {
    width: 100%;
    flex: 0 0 100%;
    margin-top: 60px;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE FIXES (Screens 768px and below)
   ========================================================================== */
@media screen and (max-width: 768px) {

    /* Stack gallery container vertically: Main Image on Top, Horizontal Thumbnails Below */
    .custom-vertical-gallery-container_bca4a3c5 {
        flex-direction: column-reverse;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        gap: 12px;
        margin-bottom: 20px;
    }

    /* Convert thumbnail column into a smooth horizontal scrolling bar */
    .custom-gallery-thumbnails-col_bca4a3c5 {
        flex-direction: row;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding-right: 0;
        padding-bottom: 6px;
        gap: 10px;
        /* Enable smooth horizontal drag/swipe on touch devices */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .custom-gallery-thumb-item_bca4a3c5 {
        width: 65px;
        height: 70px !important;
        flex-shrink: 0;
    }

    /* Main image takes full width on mobile */
    .custom-gallery-main-col_bca4a3c5 {
        width: 100% !important;
        height: 320px !important;
        max-height: 75vw !important;
        flex: none;
    }

    .custom-gallery-main-wrapper_bca4a3c5 {
        width: 100% !important;
        height: 100% !important;
    }

    /* WooCommerce Single Product Wrapper adjustments on mobile */
    .single-product div.product {
        flex-direction: column;
        gap: 24px;
    }

    .woocommerce div.product div.images,
    .single-product div.product > .custom-vertical-gallery-container_bca4a3c5 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .woocommerce div.product div.summary,
    .single-product div.product > .summary.entry-summary {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-top: 0 !important;
    }

    .single-product div.product > .woocommerce-tabs {
        margin-top: 30px;
    }
}
