/**
 * Custom WooCommerce Styles
 */

/* Archive Sub Header */


/* General container */
.tea-woo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* Header */
.tea-woo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tea-woo-title {
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
}

.tea-woo-search {
    position: relative;
    width: 350px;
}
form.tea-search-form>svg {
    position: absolute;
    left: 5px;
}
.tea-search-form {
    display: flex;
    align-items: center;
}

#tea-search-input {
    width: 100%;
    padding: 8px 40px 8px 36px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

button.search-submit {
    padding: 0px !important;background: none !important;
    border: none !important;
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-42%);
}
button.search-submit:hover{
    padding: 0px !important;
    border: none !important;
    background: none !important;
}
button.tea-category-btn {
    border-radius: 500px;
}
.tea-woo-categories>button,.tea-woo-categories>div>button{
    background: unset !important;
    border: 2px solid #347724;
    color: #347724 !important;
}
button.tea-category-btn.active {
    background: #347724 !important;
    color: #fff !important;
}
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Categories */
.tea-woo-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
    position: relative;
}

.tea-category-btn {
    padding: 3px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tea-category-btn.active {
    background-color: #417505;
    color: white;
    border-color: #417505;
}

.tea-category-btn:hover {
    background-color: #e9e9e9;
}

.tea-category-btn.active:hover {
    background-color: #345e04;
}

.tea-dropdown-icon {
    margin-left: 6px;
    font-size: 10px;
}



.tea-subcategory-menu {
    position: absolute;
    top: 10;
    left: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    width: 100%;
    display: none;
    flex-direction: column;
}

.tea-category-dropdown:hover .tea-subcategory-menu {
    display: flex;
}

.tea-subcategory-menu>button ,.tea-sort-dropdown>button{
    background: #fff !important;
    border: none !important;
    color: #245219;
    padding: 5px;
}
.tea-subcategory-menu,.tea-sort-dropdown{
    border-radius: 12px;
}
.tea-subcategory-menu button:hover,.tea-sort-dropdown button:hover {
    background: #ECECEC!important;
}
.tea-sort-container {
    margin-left: auto;
    position: relative;
}

.tea-sort-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding:3px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tea-sort-icon {
    font-size: 16px;
}
button#tea-sort-toggle {
    border-radius: 500px;
}
button#tea-sort-toggle svg {
    height: 20px;
}
.tea-sort-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    min-width: 180px;
    display: none;
    flex-direction: column;
}

.tea-sort-container:hover .tea-sort-dropdown {
    display: flex;
}

.tea-sort-option {
    padding: 8px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.tea-sort-option:hover {
    background-color: #f5f5f5;
}

/* Active Filters */
.tea-active-filters {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tea-active-filters-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-grow: 1;
}

.tea-active-filterm,.tea-active-filter {
    display: inline-flex;
    align-items: center;
    background-color: #f0f8eb;
    border: 1px solid #417505;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 13px;
}

.tea-active-filter-label {
    margin-right: 8px;
}
button.tea-active-filter-remove svg {
    height: 15px;
    width: 15px;
}
.tea-active-filter-remove,.tea-active-filter button {
    background: none;
    border: none!important;
    color: #417505;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tea-active-filter-remove:hover {
    color: #e63946;
}

.tea-clear-filters {
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tea-clear-filters:hover {
    background-color: #c1121f;
	color:#fff
}

/* Products Wrapper */
.tea-woo-products-wrapper {
    position: relative;
}

/* Fix WooCommerce pseudo-elements that break grid */
.woocommerce .products ul::after, 
.woocommerce .products ul::before, 
.woocommerce ul.products::after, 
.woocommerce ul.products::before {
    display: none !important;
}

/* Fix WooCommerce grid styles */
.woocommerce .products.columns-4,
.tea-woo-products.products.columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 0 30px 0;
    width: 100%;
    list-style: none;
    padding: 0;
}

.woocommerce .products li.product,
.tea-woo-products li.product {
    width: 100%;
    float: none;
    margin: 0;
}

@media (max-width: 768px) {
	button.tea-subcategory-btn {
    padding: 5px 10px;
}
	button.tea-subcategory-btn{
		text-align:left!important
	}
	.supplier-card-logo{
		height:unset!important;
		margin-top:10px
	}
	.supplier-card-title {
    font-size: 14px!important;
    justify-content: center!important;
}
	.suppler-card-main-image-inner,.video-responsive{
		height: 200px!important;
	}
	.supplier-card-content{
		grid-template-columns:1fr!important
	}
	.supplier-card-learn-more{
		margin-bottom:10px;
		position:unset!important
	}.supplier-card-logo {
    border-right: unset!important;
}
	.supplier-archive-search form{
		width:100%!important
	}
	a.tea-product-image{
		height: 150px!important;
	}
	.tea-product-title,.tea-product-price{
		font-size:13px !important
	}.tea-product-actions a, .tea-product-actions button {
    font-size: 12px !important;
}
    .woocommerce .products.columns-4,
    .tea-woo-products.products.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .woocommerce .products.columns-4,
    .tea-woo-products.products.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Custom product styles that don't interfere with WooCommerce layout */
.tea-product {
    border: 2px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tea-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tea-product-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tea-product-image {
    display: block;
   
    overflow: hidden;
}

.tea-product-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.tea-product:hover .tea-product-image img {
    transform: scale(1.05);
}

.tea-product-details {
    padding: 15px;
    display: flex
;
    flex-direction: column;
    flex-grow: 1;
    /* background-color: #f9f9f9; */
    align-items: center;
}

.tea-product-title {
    font-size: 16px;
    font-weight: 500;
	text-align:center
  
}

.tea-product-title a {
    color: #333;
    text-decoration: none;
}

.tea-product-price {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.tea-product-actions {
    margin-top: auto;
}
.tea-product-actions button ,.tea-product-actions a{
    border: 2px solid #333 !important;
    border-radius: 500px !important;
    background: unset !important;
}
.tea-product-actions button:hover,.tea-product-actions a:hover {
    color:#fff!important;
    border: 2px solid #347724 !important;
    border-radius: 500px !important;
    background: #347724 !important;
}
button#tea-load-more {
    border-radius: 500px;
    border: 2px solid #347724;
    background: unset;
    color: #83aa76;
}
button.tea-active-filter-remove:hover {
    background: unset !important;
}

.tea-add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background-color: #417505;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.tea-add-to-cart-btn:hover {
    background-color: #345e04;
}

/* Ajax add to cart button styles */
.tea-add-to-cart-btn.loading {
    opacity: 0.8;
    cursor: wait;
    background-color: #999;
    position: relative;
}

.tea-add-to-cart-btn.loading:after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    margin-top: -8px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* View Product Button */
.tea-view-product-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background-color: #83aa76;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.tea-view-product-btn:hover {
    background-color: #6c8e62;
    color: white;
}

/* Load More */
.tea-load-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    clear: both;
    width: 100%;
}

.tea-load-more-btn {
    padding: 15px 40px;
    background-color: #417505;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.tea-load-more-btn:hover {
    background-color: #345e04;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tea-load-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tea-load-more-btn:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.tea-load-more-btn:hover:before {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .tea-woo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .tea-woo-search {
        width: 100%;
    }
    
    .tea-load-more-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .tea-category-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .tea-load-more-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* Hide default WooCommerce elements */
.woocommerce-notices-wrapper,
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-pagination {
    display: none !important;
}

/* Custom loading indicator */
.tea-loading {
    text-align: center;
    padding: 20px;
    display: none;
}

.tea-loading span {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #417505;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 
a.tea-product-image img {
    height: 100%;
    width: 100%;
        object-fit: contain;
    background: #fff;
}
a.tea-product-image {
    height: 250px;
    display: block;
}

/* --- START: Nested Category Styles --- */
.tea-subcategory-item {
    position: relative; /* Needed for absolute positioning of nested menus */
    width: 100%;
}
button.tea-subcategory-btn {
    border: none !important;
    background: unset !important;
    width: 100% !important;
}
.tea-nested-subcategory-menu {
    display: none;
    position: absolute;
    left: 100%; /* Position to the right of the parent */
    top: -1px; /* Align top edges */
    min-width: 160px;
  
    z-index: 20; /* Ensure it's above other elements */
   
}

/* Show nested menu on hover */
.tea-subcategory-item:hover > .tea-nested-subcategory-menu {
    display: block;
}

/* Style nested buttons (same as direct subcategory buttons) */
.tea-nested-subcategory-menu .tea-subcategory-btn {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
   
  
    cursor: pointer;
    white-space: nowrap;
}

.tea-nested-subcategory-menu .tea-subcategory-btn:hover {
    background: #ECECEC !important;
}

/* Ensure dropdown icon is present */
.tea-subcategory-btn .tea-dropdown-icon {
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.2s ease-in-out;
}

/* Rotate icon slightly on hover (optional visual feedback) */
.tea-subcategory-item:hover > .tea-subcategory-btn > .tea-dropdown-icon {
    transform: translateX(2px);
}

/* --- END: Nested Category Styles --- */

@media (max-width: 768px) {
	.tea-subcategory-menu button {
    font-size: 14px;
}
    .woocommerce .products.columns-4,
    .tea-woo-products.products.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- START: Mobile Nested Category Styles --- */
    .tea-nested-subcategory-menu {
        position: static; /* Stack below parent */
        left: auto;
        top: auto;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding-left: 15px; /* Indent nested items */
        background-color: transparent;
        display: block; /* Always visible when parent is open */
        width: 100%;
        border-top: 1px dashed #eee; /* Separator */
      
       
    }

    .tea-subcategory-item:hover > .tea-nested-subcategory-menu {
         /* Already handled by display: block */
    }

    .tea-nested-subcategory-menu .tea-subcategory-btn {
         padding: 5px 10px; /* Adjust padding */
    }
     /* --- END: Mobile Nested Category Styles --- */
}
@media (min-width:768px){
	.tea-nested-subcategory-menu {
    background: #fff;
    border-radius: 12px;
}
	.tea-category-dropdown{
		position:relative
	}
}
@media (max-width: 480px) {
    .woocommerce .products.columns-4,
    .tea-woo-products.products.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}