/* WooCommerce Product Card Styles - Fixed Version */

/* Reset default WooCommerce styles for our custom cards */
.woocommerce ul.products li.product.custom-product-card,
.woocommerce ul.products li.product.custom-product-card * {
    box-sizing: border-box;
}

/* Main product card container */
.woocommerce ul.products li.product.custom-product-card {
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #66512C; /* Secondary color background */
    text-align: left; /* Better alignment for product info */
    position: relative;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(101, 81, 44, 0.1); /* Subtle shadow with primary color */
}

/* Hover effects */
.woocommerce ul.products li.product.custom-product-card:hover {
    box-shadow: 0 8px 25px rgba(101, 81, 44, 0.15);
    transform: translateY(-2px);
    border-color: #66512C;
}

/* Product card inner container */
.woocommerce ul.products li.product.custom-product-card .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Product image container */
.woocommerce ul.products li.product.custom-product-card .product-image {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 12px 12px 0 0;
}

.woocommerce ul.products li.product.custom-product-card .product-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Image hover effect */
.woocommerce ul.products li.product.custom-product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Sale badge */
.woocommerce ul.products li.product.custom-product-card .sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #22D428; /* Green primary color */
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);

    /* Center text perfectly */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Optional subtle animation */
    transition: transform 0.2s ease;
}

.woocommerce ul.products li.product.custom-product-card .sale-badge:hover {
    transform: scale(1.1);
}


/* Out of stock styling */
.woocommerce ul.products li.product.custom-product-card.out-of-stock {
    opacity: 0.7;
}

.woocommerce ul.products li.product.custom-product-card.out-of-stock .product-image {
    filter: grayscale(50%);
}

/* Product info container */
.woocommerce ul.products li.product.custom-product-card .product-info {
    padding: 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Product category */
.woocommerce ul.products li.product.custom-product-card .product-category {
    font-size: 11px;
    color: #66512C;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.woocommerce ul.products li.product.custom-product-card .product-category a {
    color: #fff;
    opacity: 0.5;
    text-decoration: none;
}

.woocommerce ul.products li.product.custom-product-card .product-category a:hover {
    color: #4a3a20;
}

/* Product title */
.woocommerce ul.products li.product.custom-product-card .product-title {
    font-size: 12px !important;
    line-height: 1.4;
    font-weight: 600;
    color: #fff;
    width: 60%;
    margin: 0 auto; /* centers the title */
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; /* ensures the ... shows */
    /*min-height: 50px; Consistent height for alignment */
}

.woocommerce ul.products li.product.custom-product-card .product-title a{
    color: #fff;
}


.woocommerce ul.products li.product.custom-product-card .product-title:hover {
    color: #FDF6E4;
}

/* Product price */
.woocommerce ul.products li.product.custom-product-card .product-price {
    font-size: 12px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.woocommerce ul.products li.product.custom-product-card .product-price del {
    color: #fff;
    font-weight: 400;
    font-size: 16px;
    margin-right: 8px;
}

.woocommerce ul.products li.product.custom-product-card .product-price ins {
    text-decoration: none;
    color: #fff;
}

/* Add to cart button */
.woocommerce ul.products li.product.custom-product-card .add-to-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #FDF6E4;
    color: #66512C;
    border: none;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(101, 81, 44, 0.2);
    position: absolute;
    bottom: 15px;
    right: 10px;
    padding:0px;
    margin:0px;
}

.woocommerce ul.products li.product.custom-product-card .add-to-cart-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(101, 81, 44, 0.3);
}

.woocommerce ul.products li.product.custom-product-card .add-to-cart-button:active {
    transform: scale(0.95);
}

.woocommerce ul.products li.product.custom-product-card .add-to-cart-button .plus-icon {
    line-height: 1;
}

/* Disabled/Out of stock button */
.woocommerce ul.products li.product.custom-product-card .add-to-cart-button.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    width: 100%;
    padding: 10px 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: block;
    bottom: 50%;
    left: 0;
    right: 0;
    box-shadow: none;
}

/* Disable WooCommerce "added" checkmark effect */
.add_to_cart_button.added::after,
.add_to_cart_button.loading::after {
    display: none !important;
}
.add_to_cart_button.added {
    pointer-events: auto;
}


.woocommerce ul.products li.product.custom-product-card .add-to-cart-button.disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* === Responsive Tweaks for Mobile & Tablet Product Cards === */
@media (max-width: 1024px) {
    /* Reduce card height appearance */
    .woocommerce ul.products li.product.custom-product-card .product-image img {
        height: 140px !important;
    }

    /* Compact padding */
    .woocommerce ul.products li.product.custom-product-card .product-info {
        padding: 10px !important;
    }

    /* Slightly smaller title */
    .woocommerce ul.products li.product.custom-product-card .product-title {
        font-size: 14px !important;
        line-height: 1.3;
        width: 80%;
    }

    /* Smaller price text */
    .woocommerce ul.products li.product.custom-product-card .product-price {
        font-size: 14px !important;
    }

    /* Smaller add to cart button */
    .woocommerce ul.products li.product.custom-product-card .add-to-cart-button {
        width: 28px !important;
        height: 28px !important;
        bottom: 10px !important;
        right: 8px !important;
    }

    /* Optional: tighten the grid gap */
    .woocommerce ul.products {
        gap: 10px !important;
    }
}

@media (max-width: 768px) {
    /* Even smaller on mobile */
    .woocommerce ul.products li.product.custom-product-card .product-image img {
        height: 120px !important;
    }

    .woocommerce ul.products li.product.custom-product-card .product-info {
        padding: 8px !important;
    }

    .woocommerce ul.products li.product.custom-product-card .product-title {
        font-size: 11px !important;
        width: 85%;
    }

    .woocommerce ul.products li.product.custom-product-card .product-price {
        font-size: 11px !important;
    }

    .woocommerce ul.products li.product.custom-product-card .add-to-cart-button {
        width: 24px !important;
        height: 24px !important;
        bottom: 8px !important;
        right: 6px !important;
    }
}

/* Grid layout improvements */
.woocommerce ul.products {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products li.product {
    margin: 0;
    width: auto;
}

/* Additional hover state for the entire card */
.woocommerce ul.products li.product.custom-product-card:hover .product-title {
    color: #66512C;
}

/* Loading state (if needed) */
.woocommerce ul.products li.product.custom-product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}




/* Woocommerce Search Bay*/
/* Product search form styling */
.wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    background-color: #f0f0f0; /* light grey background */
    border-radius: 30px;        /* curved edges */
    padding: 5px 10px;
    max-width: 500px;           /* optional: control width */
    margin: 0 auto;             /* center the search form */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* subtle shadow */
}

/* Input styling */
.wp-block-search__input {
    border: none !important;
    background: transparent !important;
    padding: 10px 15px;
    flex: 1;                    /* take remaining space */
    border-radius: 30px;
    font-size: 16px;
    outline: none;              /* remove blue outline */
}

/* Button styling */
.wp-block-search__button {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

/* Icon styling */
.wp-block-search__button .search-icon path {
    fill: #555;                /* icon color */
    transition: fill 0.3s;
}

.wp-block-search__button:hover .search-icon path {
    fill: #000;                /* icon color on hover */
}


/* === Custom Sidebar Category List === */

.wc-block-product-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wc-block-product-categories-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 !important;
}

/* Smooth background hover animation */
.wc-block-product-categories-list-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background-color: #66512C; /* soft grey hover */
    opacity: 0.7;
    z-index: 0;
    border-radius:30px;
    transition: width 0.3s ease;
}

.wc-block-product-categories-list-item:hover::before {
    width: 100%;
}

/* Ensure content stays above hover bg */
.wc-block-product-categories-list-item a,
.wc-block-product-categories-list-item img,
.wc-block-product-categories-list-item span {
    position: relative;
    z-index: 1;
}

.wc-block-product-categories-list-item__image {
    margin: 0 .5em 0 -8px !important;
    border: none !important;
}

/* Image (small circular icon) */
.wc-block-product-categories-list-item__image img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Category name */
.wc-block-product-categories-list-item__name {
    font-size: 13px;
    font-weight: 500;
    color: #000;
    transition: color 0.3s ease;
}

/* Product count (optional smaller and grey) */
.wc-block-product-categories-list-item-count {
    font-size: 14px;
    color: #66512C;
    margin-left: auto;
    position: relative;
    z-index: 1;
}

/* Hover effects */
.wc-block-product-categories-list-item:hover .wc-block-product-categories-list-item__image img {
    transform: scale(1.05);
}

.wc-block-product-categories-list-item:hover .wc-block-product-categories-list-item__name {
    color: #333;
}

/* Responsive (mobile tweaks) */
@media (max-width: 768px) {
    .wc-block-product-categories-list-item__image img {
        width: 24px;
        height: 24px;
    }
    .wc-block-product-categories-list-item__name {
        font-size: 12px;
    }
}

.widget_shopping_cart_content ul li {
     display: flex;
     justify-content: space-between;
     align-items:center;
     padding: 4px 0 !important;
}

.woocommerce-js ul.product_list_widget li img {

	min-width:40px !important;
    width:100px !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    float: none !important;
    position: static !important;
  	top: auto !important;
  	left: auto !important;
}