/**
Theme Name: Astra Child
Author: Husky Tape
Author URI: https://huskytape.com.au
Description: Husky Tape - Astra Child Theme
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/

/* Apply overlay to the category image only */
.woocommerce ul.products li.product-category a {
    position: relative;
    display: block;
}

.woocommerce ul.products li.product-category a img {
    position: relative;
    display: block;
    z-index: 0;
}

/* Overlay only for the image area */
.woocommerce ul.products li.product-category a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 1;
    pointer-events: none;
}

/* Ensure category title remains above the overlay */
.woocommerce ul.products li.product-category h2 {
    position: relative;
    z-index: 2; /* Ensure it's above the overlay */
    margin-top: -50px;
}

/* Add border-radius to product loop */
.woocommerce ul.products li.product-category a img {
    border-radius: 18px;
    overflow: hidden;
}

.woocommerce ul.products li.product-category {
    border-radius: 18px; /* Match the radius of the image */
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.woocommerce-loop-category__title {
	border-radius: 10px;
}

.ast-shop-load-more {
	border-radius: 18px;
	line-height: 2.5em !important;
}

/* --- Add border-radius to variation buttons --- */
.ast-variation-button-group .ast-single-variation {
	border-radius: 18px;
}

/* --- Hide original image on image swap --- */
.woocommerce ul.products li.product:has(img.show-on-hover):hover img:not(.show-on-hover) {
    opacity: 0;
}

/* --- Replace Bag Icon --- */
.icon-bag::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
    background-size: contain;
}
.icon-bag svg {
    display: none; /* Hide default SVG */
}

/* --- Remove Add to Cart --- */
.single-product .single_add_to_cart_button {
    display: none !important;
}

.quantity {
    display: none !important;
}

/* --- Account menu styling --- */
.ast-account-nav-menu {
	width: 180px;
	margin-top: 15px;
	border-radius: 10px;
	overflow: hidden;
	padding-bottom: 14px;
}

.ast-header-search .ast-icon:hover {
	color: var(--ast-global-color-8) !important;
}

.ast-header-account-wrap {
	transition: transform 0.2s ease-in-out;
}

.ast-header-account-wrap:hover {
	transform: scale(1.1);
}