/* ==========================================================================
   Zuki Custom CSS - Single Product Page (single-product)
   This CSS file will ONLY load on WooCommerce Single Product pages
   ========================================================================== */

.zuki-main-product-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 40px !important;
    padding: 130px 5% 40px !important; /* Offset 90px fixed header + 40px content padding */
    width: 100% !important;
    box-sizing: border-box !important;
}
.zuki-product-left-col {
    flex: 0 0 55% !important;
    width: 55% !important;
    max-width: 55% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}
.zuki-product-info-section {
    flex: 0 0 40% !important;
    width: 40% !important;
    max-width: 40% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}
.zuki-product-left-col .woocommerce-product-gallery {
    opacity: 1 !important;
    width: 100% !important;
}
.zuki-product-left-col .woocommerce-product-gallery__wrapper {
    display: grid !important;
    grid-template-columns: 38fr 62fr !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 380px !important;
    object-fit: cover !important;
    display: block !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image:nth-child(3n) {
    grid-column: 1 / -1 !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image:nth-child(3n) img {
    height: 480px !important;
}
@media (max-width: 768px) {
    .zuki-main-product-container {
        flex-direction: column !important;
        padding-top: 170px !important; /* Offset mobile header (approx 130px) + 40px padding */
    }
    .zuki-product-left-col {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    .zuki-product-info-section {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Custom Gallery System */
.zuki-custom-gallery-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.zuki-custom-gallery-main {
    position: relative;
    width: 100%;
    /* Aspect ratio 1920x2645 */
    aspect-ratio: 1920 / 2645;
    background: #FAFAFA;
    overflow: hidden;
    border-radius: 4px;
}

.zuki-custom-gallery-main-viewport {
    position: relative;
    width: 100%;
    height: 100%;
}

.zuki-custom-gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow: hidden;
    z-index: 1;
}

.zuki-custom-gallery-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.zuki-custom-gallery-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.15s ease-out;
    transform-origin: center center;
}

/* Main Gallery Navigation Arrows (80% bottom height) */
.zuki-custom-gallery-arrow {
    position: absolute;
    bottom: 15%; /* Located at bottom section of image (~ 80% bottom height) */
    z-index: 10;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    width: 56px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.25s ease;
}

.zuki-custom-gallery-arrow:hover,
.zuki-custom-gallery-arrow:focus,
.zuki-custom-gallery-arrow:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.zuki-custom-gallery-arrow svg {
    width: 44px !important;
    height: 44px !important;
    stroke: #222222 !important;
    stroke-width: 1px !important; /* Elegant thin stroke for large icons */
    fill: none !important;
    display: block !important;
    transition: all 0.25s ease;
}

.zuki-custom-gallery-arrow:hover svg {
    stroke: #6A52A2 !important; /* Zuki theme purple */
    transform: scale(1.1);
}

.zuki-custom-gallery-arrow.prev-arrow {
    left: 20px !important;
}

.zuki-custom-gallery-arrow.next-arrow {
    right: 20px !important;
}

/* Thumbnails row */
.zuki-custom-gallery-thumbs-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    width: 100%;
}

.zuki-custom-gallery-thumbs-scroll {
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    cursor: grab;
    user-select: none;
}

.zuki-custom-gallery-thumbs-scroll::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.zuki-custom-gallery-thumbs-scroll.active-dragging {
    cursor: grabbing;
}

.zuki-custom-gallery-thumbs-track {
    display: flex;
    gap: 10px;
    transition: transform 0.2s ease;
}

.zuki-custom-gallery-thumb {
    flex: 0 0 calc(20% - 8px); /* Show 5 thumbnails by default */
    aspect-ratio: 1920 / 2645;
    background: #FAFAFA;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.zuki-custom-gallery-thumb.active,
.zuki-custom-gallery-thumb:hover {
    opacity: 1;
    border-color: #6A52A2;
}

.zuki-custom-gallery-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Thumbnails Navigation Arrows */
.zuki-custom-thumbs-arrow {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    width: 54px !important;
    height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.zuki-custom-thumbs-arrow:hover,
.zuki-custom-thumbs-arrow:focus,
.zuki-custom-thumbs-arrow:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.zuki-custom-thumbs-arrow svg {
    width: 36px !important;
    height: 36px !important;
    stroke: #222222 !important;
    stroke-width: 1.5px !important;
    fill: none !important;
    display: block !important;
    transition: all 0.2s ease;
}

.zuki-custom-thumbs-arrow:hover svg {
    stroke: #6A52A2 !important;
    transform: scale(1.15);
}

/* Ensure the WooCommerce template styles don't conflict or show the old images layout inside the column */
.zuki-product-left-col .woocommerce-product-gallery {
    opacity: 1 !important;
    display: block !important;
}

.zuki-product-left-col .woocommerce-product-gallery__wrapper,
.zuki-product-left-col .flex-control-nav,
.zuki-product-left-col .flex-direction-nav {
    display: none !important; /* Hide old WooCommerce slider wrappers/bullets if any */
}

/* Mobile responsive style */
@media (max-width: 768px) {
    .zuki-custom-gallery-thumb {
        flex: 0 0 calc(25% - 8px); /* Show 4 thumbnails on mobile */
    }
    .zuki-custom-gallery-arrow {
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        width: 50px !important;
        height: 50px !important;
    }
    .zuki-custom-gallery-arrow svg {
        width: 36px !important;
        height: 36px !important;
    }
    .zuki-custom-gallery-arrow.prev-arrow {
        left: 10px !important;
    }
    .zuki-custom-gallery-arrow.next-arrow {
        right: 10px !important;
    }
}

/* ==========================================================================
   Out of Stock Custom Styles
   ========================================================================== */
.zuki-single-stock-status.out-of-stock {
    font-family: 'General Sans', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 1.5px !important;
    color: #C93B3B !important;
    text-transform: uppercase !important;
    margin-top: -10px !important;
    margin-bottom: 25px !important;
    display: inline-block !important;
}

.btn-out-of-stock {
    grid-column: span 2 !important;
    background: #EAEAEA !important;
    color: #808285 !important;
    border: 1px solid #EAEAEA !important;
    cursor: not-allowed !important;
    font-family: 'General Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1.5px !important;
    height: 52px !important;
    width: 100% !important;
    text-transform: uppercase !important;
}

/* Loop card styling when rendered inside single product related grids */
.zuki-out-of-stock-card .zuki-product-image-container img {
    filter: grayscale(20%) opacity(0.85) !important;
}
.zuki-loop-out-of-stock-badge {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 12 !important;
    font-family: 'General Sans', sans-serif !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    padding: 10px 18px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #222222 !important;
    border: 1px solid #EAEAEA !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}


