/*
Theme Name:   Vineta Child Theme
Description:  Write here a brief description about your child-theme
Author:       Themesflat
Author URL:   https://themesflat.co/fashion-vineta/
Template:     vineta
Version:      1.0.0
Tested up to: 5.8.1
Requires PHP: 5.6
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  vineta-child-theme
*/

/* Navigation menu bar: blue background (so carousel image doesn't need a blue strip) */
.header-absolute #header .header-bottom {
	background-color: #005b97 !important;
}

/* Keep mobile header (white bar + logo + hamburger) from 0 up to 1199px; desktop two-row header only from 1200px */
@media (max-width: 1199px) {
	/* Hide the blue nav bar so it doesn’t appear at top in the 1024–1199px range */
	#header .header-bottom {
		display: none !important;
	}
	/* Keep the white top bar visible and white (hamburger, logo, icons) */
	#header .header-top {
		display: block !important;
		background-color: #ffffff !important;
		background: #ffffff !important;
	}
	/* On homepage with header over hero: keep header top white, not transparent */
	.header-absolute #header .header-top {
		background-color: #ffffff !important;
		background: #ffffff !important;
	}
	.header-absolute #header:not(.header-bg) .header-top {
		background-color: #ffffff !important;
		background: #ffffff !important;
	}
	/* Hide "Shop All" link on intermediary sizes; hamburger menu is enough */
	#header .header-top a[href*="shop"] {
		display: none !important;
	}
	/* Hide Elementor "Shop All" button in header (.wrap-tf-btn with href="#") */
	#header .header-top .wrap-tf-btn,
	#header .header-top .elementor-widget-container .wrap-tf-btn {
		display: none !important;
	}
	/* Hide only the Shop All button, never the whole widget (widget may wrap logo/hamburger on category pages) */
	#header .elementor-element-acbec33 .wrap-tf-btn,
	#header .wrap-tf-btn {
		display: none !important;
	}
}

/* Mobile header always has white background, so icons use default dark color (no white override needed) */

/* Fix duplicate Filter button on mobile: hide the second one when offcanvas filter is already present */
.tf-group-filter .tf-btn-filter + .offcanvas + .tf-btn-filter {
	display: none !important;
}

/* Gradient overlay on homepage category grid images (Jumpsuits, Sets, Jackets) */
.grid-cls .s-cls .image {
	position: relative;
}
.grid-cls .s-cls .image::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to top right, rgba(0, 51, 85, 0.70) 0%, rgba(0, 51, 85, 0.35) 30%, rgba(0, 91, 151, 0) 60%);
	pointer-events: none;
	z-index: 1;
}
/* Ensure text sits above the overlay */
.grid-cls .s-cls .content {
	z-index: 2;
}

/* Hide hover overlay icons on product cards (cart, wishlist, quickview, compare) */
.card-product .list-product-btn {
	display: none !important;
}

/* Hide "In Stock" badge on product cards; only show "Out of Stock" */
.card-product .on-sale-wrap .on-sale-item.in-stock {
	display: none !important;
}

/* Fix mobile spacing and disable zoom on single product pages */
@media (max-width: 767px) {
    /* Remove gap between product images and product info on mobile */
    .tf-main-product .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .tf-main-product .row {
        gap: 0 !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        -webkit-margin-before: 0 !important;
        -webkit-margin-after: 0 !important;
        --bs-gutter-x: 0 !important;
        --bs-gutter-y: 0 !important;
    }
    
    /* Remove all spacing from Bootstrap columns */
    .tf-main-product .row > [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .tf-main-product .left-col {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        -webkit-margin-before: 0 !important;
        -webkit-margin-after: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }
    
    .tf-main-product .right-col {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        -webkit-margin-before: 0 !important;
        -webkit-margin-after: 0 !important;
        position: relative !important;
    }
    
    /* Ensure no gap between left and right columns on mobile */
    .tf-main-product .left-col + .right-col {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Remove sticky positioning and spacing from zoom element on mobile */
    .tf-main-product .tf-zoom-main {
        position: static !important;
        top: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        display: none !important;
        visibility: hidden !important;
        overflow: hidden !important;
    }
    
    /* Remove margin-top from product info wrap on mobile - override theme default of 40px */
    .tf-main-product .tf-product-info-wrap {
        margin-top: 0 !important;
        padding-top: 15px !important;
        -webkit-margin-before: 0 !important;
    }
    
    /* Add spacing between miniatures and product title */
    .tf-main-product .product-info-name {
        margin-top: 40px !important;
        padding-top: 0 !important;
    }
    
    /* Remove any spacing from the product gallery wrapper */
    .tf-main-product .woocommerce-product-gallery,
    .tf-main-product .woocommerce-product-gallery__wrapper {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        -webkit-margin-after: 0 !important;
    }
    
    /* Remove spacing from sticky-top elements on mobile */
    .tf-main-product .sticky-top {
        position: static !important;
        top: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-margin-before: 0 !important;
        -webkit-margin-after: 0 !important;
    }
    
    /* Remove spacing from product image containers */
    .tf-main-product .woocommerce-product-gallery__image {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        -webkit-margin-after: 0 !important;
    }
    
    /* Fix spacing in product gallery thumbnails - override -webkit-fill-available that causes the gap */
    .tf-main-product .tf-product-media-thumbs,
    .tf-product-media-thumbs {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        -webkit-margin-before: 0 !important;
        -webkit-margin-after: 0 !important;
        height: auto !important; /* Override -webkit-fill-available that causes the gap */
        min-height: 0 !important;
        max-height: none !important;
    }
    
    .flat-wrap-media-product {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        -webkit-margin-before: 0 !important;
        -webkit-margin-after: 0 !important;
    }
    
    /* Target the section itself */
    .tf-main-product.section-image-zoom {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Remove any spacing from wrapper elements */
    .tf-main-product .wrapper-gallery,
    .tf-main-product .wrapper-gallery-scroll {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Remove spacing from swiper containers */
    .tf-main-product .swiper,
    .tf-main-product .swiper-wrapper {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Remove spacing from swiper slides */
    .tf-main-product .swiper-slide {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Ensure the last element in left-col has no bottom spacing */
    .tf-main-product .left-col > *:last-child,
    .tf-main-product .left-col .sticky-top > *:last-child,
    .tf-main-product .left-col .woocommerce-product-gallery > *:last-child {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Remove any spacing from the tf-swiper-wrapper-mobile */
    .tf-main-product .tf-swiper-wrapper-mobile {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* iOS Safari specific fixes - these only apply on actual iOS devices */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 767px) {
        .tf-main-product .left-col {
            margin-bottom: -2px !important; /* Negative margin to counteract iOS spacing */
            padding-bottom: 0 !important;
        }
        
        .tf-main-product .right-col {
            margin-top: -2px !important; /* Negative margin to counteract iOS spacing */
            padding-top: 0 !important;
        }
        
        /* Force remove any iOS Safari default spacing */
        .tf-main-product .tf-product-info-wrap {
            -webkit-margin-collapse: separate !important;
            margin-top: 0 !important;
            padding-top: 15px !important;
        }
        
        /* Remove any potential iOS Safari sticky positioning artifacts */
        .tf-main-product .sticky-top {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
            margin-bottom: 0 !important;
            padding-bottom: 0 !important;
        }
        
        /* Remove iOS spacing from gallery elements */
        .tf-main-product .woocommerce-product-gallery,
        .tf-main-product .woocommerce-product-gallery__wrapper,
        .tf-main-product .flat-wrap-media-product {
            margin-bottom: -1px !important;
            padding-bottom: 0 !important;
        }
    }
}

/* Disable zoom functionality on mobile - allow scrolling but prevent zoom */
@media (max-width: 767px) {
    .section-image-zoom .woocommerce-product-gallery__image,
    .section-image-zoom .woocommerce-product-gallery__wrapper,
    .section-image-zoom .woocommerce-product-gallery__image img,
    .section-image-zoom .tf-product-media-thumbs,
    .section-image-zoom .tf-product-media-thumbs img,
    .section-image-zoom .flat-wrap-media-product,
    .section-image-zoom .flat-wrap-media-product img {
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    /* Disable drift zoom on mobile */
    .section-image-zoom .drift-zoom-pane,
    .section-image-zoom .drift-bounding-box {
        display: none !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    /* Ensure images allow scrolling but prevent zoom */
    .section-image-zoom img {
        pointer-events: auto !important;
        -webkit-user-drag: none !important;
        user-drag: none !important;
    }

    /* Prevent zoom container from interfering with scrolling */
    .section-image-zoom {
        touch-action: pan-y !important;
    }
}
