/**
* CSS amends backported from the "code snippets" extension
* Clear, 2026-02-23
*/

/**
* Burger White
*/
.wp-block-group.header-accent.has-accent-background-color button:not(.components-button):not(.wc-block-components-button),
.wp-block-group.header-accent.has-accent-background-color .button {
  color: #ffffff;
}
.wp-block-group.has-transparent-header.has-accent-background-color button:not(.components-button):not(.wc-block-components-button),
.wp-block-group.has-transparent-header.has-accent-background-color .button {
  color: #ffffff;
}
.wp-block-navigation__submenu-icon,
.wp-block-navigation__submenu-icon button {
  color: inherit !important;
}

/**
* Fix broken cart styling
*/
.wp-block-woocommerce-mini-cart-contents {
	flex-direction: column;
}
.wp-block-woocommerce-mini-cart-checkout-button-block:hover,
.wp-block-woocommerce-mini-cart-cart-button-block:hover {
	.wc-block-components-button__text {
		z-index: 50;
	}
}
.wc-block-components-quantity-selector {
	min-width: 100px;	
}


div[hidden] {
	display: none !important;
}

/**
* Fix issue with removing items from basket on mobile
*/
@media screen and (max-width: 768px) {
	.woocommerce-cart-form__cart-item .product-remove {
		padding-left: 0 !important;
		a {
			padding-left: 110px;
			font-size: 50px;
			margin-top: -10px;
			position: relative;
			z-index: 500;
		}
	}
}

/**
* New products and bestelling products carousel on mobile
* 29/12/2025
*/ 
/* WooCommerce Product Blocks Mobile Carousel */
.wp-child-theme-bagberry-child {
    .product .price {
    margin: 0;
 }
/* Mobile styles - tablets and below */
@media screen and (max-width: 768px) {
    .product .related .add_to_cart_button {
        display: inline-flex;
    }

        
        /* Make the product grid scroll horizontally */
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__products,
        .wp-block-woocommerce-product-new .wc-block-grid__products,
        .product .related > .products {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            gap: 10px;
            padding: 10px 0;
            width: 100%;
        }
        
        /* Style each product item */
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__product,
        .wp-block-woocommerce-product-new .wc-block-grid__product,
        .related > .products .product {
            flex: 0 0 85%;
            scroll-snap-align: start;
            position: relative;
            overflow: visible;
            display: block;
        }
        
        /* Make product links fill properly */
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__product a,
        .wp-block-woocommerce-product-new .wc-block-grid__product a,
        .product .related > .products .product a{
            display: flex;
            flex-direction: column;
            width: 100%;
            /* height: auto; */
            height: 100%;
        }
        
        .product .related > .products .product a {
            align-items: start;
            justify-content: end;

        }
        
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__product img,
        .wp-block-woocommerce-product-new .wc-block-grid__product img,
        .product .related > .products .product img {
            width: 100%;
            height: auto;
            display: block;
        }
        
        /* Add scrollbar styling */
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__products::-webkit-scrollbar,
        .wp-block-woocommerce-product-new .wc-block-grid__products::-webkit-scrollbar,
        .product .related > .products::-webkit-scrollbar {
            height: 4px;
        }
        
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__products::-webkit-scrollbar-track,
        .wp-block-woocommerce-product-new .wc-block-grid__products::-webkit-scrollbar-track,
        .product .related > .products::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }
        
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__products::-webkit-scrollbar-thumb,
        .wp-block-woocommerce-product-new .wc-block-grid__products::-webkit-scrollbar-thumb,
        .product .related > .products::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 10px;
        }
        
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__products::-webkit-scrollbar-thumb:hover,
        .wp-block-woocommerce-product-new .wc-block-grid__products::-webkit-scrollbar-thumb:hover,
        .product .related > .products::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
    }

    /* Hide the scrollbar on touch devices */
    @media (pointer: coarse) {
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__products,
        .wp-block-woocommerce-product-new .wc-block-grid__products,
        .product .related > .products {
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__products::-webkit-scrollbar,
        .wp-block-woocommerce-product-new .wc-block-grid__products::-webkit-scrollbar.
        .product .related > .products::-webkit-scrollbar {
            display: none;
            width: 0;
            height: 0;
        }
    }

    /* Smaller mobile devices */
    @media screen and (max-width: 480px) {
        .wp-block-woocommerce-product-best-sellers .wc-block-grid__product,
        .wp-block-woocommerce-product-new .wc-block-grid__product,
        .product .related > .products .product{
            flex: 0 0 90%;
        }
    }
}

/**
* Style webkit search cancel button
* 2026/01/28
*/ 
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
}

/**
* Hide overlay on search results page.
* Temporary, broken due to WP upgrade
* 2026/01/28
*/
.search-results {
	
	.tp-image-wrapper {
		display: none !important;
	}
	
	.wc-block-product .has-overlay-content {
		flex-wrap: wrap !important;
	}
	.add_to_cart_button {
		padding: 0 !important;
	}
	
	.wc-block-product .has-overlay-content .wp-block-woocommerce-product-price {
		margin-left: 0;
	}
}

/**
* Fix broken "Customize" label overlay
* 2026/01/28
*/ 
.wc-block-grid__product-add-to-cart:not([data-block-name]) {
    /* top: 92% !important; */
    /* top: 95% !important; */
    top: 98%;
    transform: translateY(-1ch);
    font-family: var(--wp--preset--font-family--montserrat);
    font-weight: 400;
    padding-bottom: 0;
    letter-spacing: 0;
    > a {
        padding-right: 1rem !important;
    }
}

/**
* WooCommerce Product Gallery Styling Amends
*/
/* WooCommerce Product Gallery Mobile Carousel */

.wp-child-theme-bagberry-child {
    /* WooCommerce Product Gallery Mobile Carousel */

    .pswp__button {
        filter: invert(1);
    }
    .pswp__button--fs {
        filter: none;
    }

    .pswp__top-bar {
        align-items: center;
    }

    .pswp__preloader {
        display: none;
    }

    /* Mobile styles - tablets and below */
    @media screen and (max-width: 768px) {
    
        .woocommerce-product-gallery__trigger {
            margin-top: -40px;
        }
        
        /* Make the gallery wrapper scroll horizontally */
        .woocommerce-product-gallery__wrapper {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding: 10px 0;
        /* margin: 0 -15px; */
        /* padding-left: 15px; */
        /* padding-right: 15px; */
        width: 100%;
        }
        
        /* Style each gallery image container */
        .woocommerce-product-gallery__image {
        flex: 0 0 85%;
        scroll-snap-align: start;
        position: relative;
        overflow: visible;
        display: block;
        }
        
        /* Make images fill their containers properly */
        .woocommerce-product-gallery__image a {
        display: block;
        width: 100%;
        height: auto;
        }
        
        .woocommerce-product-gallery__image img:not(.zoomImg) {
        width: 100%;
        height: auto;
        display: block;
/*         border-radius: 8px; */
        }
        
        /* Optional: Add scrollbar styling */
        .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
        height: 4px;
        }
        
        .woocommerce-product-gallery__wrapper::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
        }
        
        .woocommerce-product-gallery__wrapper::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
        }
        
        .woocommerce-product-gallery__wrapper::-webkit-scrollbar-thumb:hover {
        background: #555;
        }
    }
  
    /* Hide the scrollbar on touch devices */
    @media (pointer: coarse) {
    .woocommerce-product-gallery__wrapper {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
    }
  }
  
  /* Smaller mobile devices */
  @media screen and (max-width: 480px) {
    .woocommerce-product-gallery__image {
      flex: 0 0 90%;
    }
  }
}

/**
* Global product grid styling
*/
.products {
    /**
    * Increase the hover area for the product image.
    */
    a:has(img) {
        position: relative;
        isolation: isolate;
        z-index: 50;
    }
}

/**
* Category grids - add more space between image and pricing label
*/ 
.woocommerce-loop-product__title {
    margin-top: 1rem;
    @media screen and ( min-width: 768px ) {
        margin-top: 1.25rem;
    }
}