/* Existing styles */
#product-filters {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-evenly;
}

.restricted-product {
    opacity: 0.5;
    position: relative;
}
.back-to-shop-link{
	color:#fff;
	text-decoration:underline;
}
.back-to-shop-link:hover{
	color:#fff !important;
}
.level-banner {
    position: absolute;
    top: 99px;
    left: 0;
    background-color: #ff0000;
    color: white;
    padding: 15px 10px;
    z-index: 10;
    font-size: 18px;
    border-radius: 11px;
    line-height: normal;
}

.filter-button {
    margin-right: 10px;
    background-color: #1e1e1c;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
}

/* Search Bar Styles */
#product-search-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
}

#product-search {
    padding: 8px 20px;
    font-size: 16px;
    border: 2px solid #3b1e26;
    border-radius: 22px;
    width: 300px;
    outline: none;
    font-family: "Amatic SC", sans-serif;
    font-size: 18px;
}

#product-search:focus {
    border-color: #000;
    box-shadow: 0 0 5px rgba(59, 30, 38, 0.3);
}

#search-button,
#clear-search {
    background-color: #3b1e26;
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 8px 20px;
    font-family: "Amatic SC", sans-serif;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-button:hover {
    background-color: #fff;
	color: #000;
    /*transform: translateY(-2px);*/
}

#clear-search {
    background-color: #666;
}

#clear-search:hover {
    background-color: #333;
	color: #fff;
}

/* Categories and Subcategories */
#product-categories,
#product-tags,
#subcategories-list {
    margin-bottom: 20px;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
	gap:1rem;
    justify-content: space-around;
    transition: all 0.3s ease;
}

#product-subcategories {
    background-color: rgba(59, 30, 38, 0.1);
    padding: 20px 10px;
    border-radius: 15px;
    border: 2px solid #3b1e26;
	text-align:center;
}


#product-categories a,
#product-tags a,
.subcategory-btn,
.back-to-main {
    margin-right: 10px;
    text-decoration: none;
    background-color: #3b1e26;
    color: #fff;
    border: none;
    border-radius: 0;
    font-family: "Amatic SC";
    padding: 5px 20px;
    font-weight: 900;
   	/*min-width: 200px;*/
    font-size: 20px;
    border-radius: 22px;
    text-align: center;
    text-transform: lowercase;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}
.back-to-main{
	padding: 8px 20px 5px 20px !important;
}
.subcategory-btn {
    width: auto;
    min-width: 150px;
    margin: 5px;
}

#product-categories a.has-children {
    position: relative;
    padding-right: 40px;
}

#product-categories a .dropdown-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    transition: transform 0.3s ease;
}

#product-categories a.has-children:hover .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

#product-categories a.active,
#product-tags a.active,
.subcategory-btn.active {
    background-color: #B190A1;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#product-categories a:hover,
#product-tags a:hover,
.subcategory-btn:hover,
.back-to-main:hover{
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	color: #000;
}

/* Carousel container */
#product-carousel {
    width: 1100px;
    margin: 80px auto 0 auto;
}

/* Mobile: vertical layout (no carousel) */
@media (max-width: 767px) {
    #product-carousel {
        width: 100%;
        max-width: 100vw;
        margin: 40px auto 0 auto;
        padding: 0 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    #product-carousel .item {
        width: 100% !important;
        max-width: 100%;
        margin: 0 !important;
    }
    
    #product-carousel .product {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
		text-align:center;
    }
}

/* Product styles */
.owl-carousel .owl-stage {
    display: flex;
    justify-content: space-between;
}

.owl-carousel .owl-item {
    flex: 0 0 auto;
}

/* Desktop/Tablet: carousel styles */
@media (min-width: 768px) {
    .owl-carousel .owl-item {
        width: 220px !important;
        margin-right: 20px;
    }
}

.owl-carousel .item {
    width: 100%;
}

.owl-carousel .product {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.product h3 {
    font-weight: 700;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    min-height: 115px;
    text-transform: lowercase;
}

.product .button.product_type_simple, 
.product .button.product_type_subscription {
    background-image: url(https://ladamavini.it/wineclub/wp-content/uploads/2025/06/button_white1.png) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-color: transparent !important;
    font-family: "Dancing Script", Sans-serif !important;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 10px 20px;
    color: #3b1e26;
    display: block;
}

.product h3 span {
    display: block;
    font-size: 1rem;
    margin: 5px 0 10px 0;
    font-weight: 400;
}

.owl-carousel .product-image {
    width: 100%;
    height: 0;
    padding-bottom: 130%;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    background: radial-gradient(closest-side at 50% 50%, #acacac82, #000000);
    display: inline-block;
    position: relative;
}

.owl-carousel .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.owl-carousel .product-link {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.owl-carousel .product-details {
    margin-top: auto;
}

/* Navigation arrows */
.fa-chevron-left:before, .fa-chevron-right:before {
    font-size: 1.5rem !important;
}

.owl-prev, .owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.owl-prev {
    left: -50px;
}

.owl-next {
    right: -50px;
}

.owl-prev:hover, .owl-next:hover {
    color: #ff6600;
}

.product-price {
    margin-bottom: 20px;
    font-weight: 600;
}

.restricted-product .button {
    display: none;
}

/* Loading indicator */
#loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.spinner {
    border: 5px solid #3b1e26;
    border-top: 5px solid #828282;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No products found message */
.no-products-found {
    text-align: center;
    padding: 40px;
    font-family: "Amatic SC", sans-serif;
    font-size: 24px;
    color: #666;
    background-color: rgba(59, 30, 38, 0.1);
    border-radius: 15px;
    margin: 20px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #product-carousel {
        width: 95%;
    }
}

@media (max-width: 768px) {
    #product-categories, 
    #product-tags,
    #product-subcategories,
    #subcategories-list {
        flex-wrap: wrap;
        gap:5px;
		display:flex;
    }
	#product-categories a, #product-tags a, .subcategory-btn, .back-to-main {
    margin-right: 0 !important;
	}
    
    #product-categories a,
    #product-tags a,
    .subcategory-btn {
        width: auto;
        min-width: 150px;
        margin: 5px;
    }
    
    /* Navigation arrows hidden on mobile (no carousel) */
    .owl-prev,
    .owl-next {
        display: none !important;
    }
    
    .owl-carousel .product .add_to_cart_button {
        font-size: 1.1rem !important;
		padding:unset !important;
    }
    
    #product-search-container {
        gap:5px;
    }
    
    #product-search {
        width: 250px;
    }
    
    #search-button,
    #clear-search {
        padding: 0.8rem 1.5rem;
        font-size: 16px;
    }
	.product-image{
		text-align:center;
	}
	.product-image img{
		width:200px;
	}
	.product h3{
		min-height: auto !important;
	}
}

@media (max-width: 480px) {
    
    #product-search {
        width: 150px;
        padding: 0.8rem 1.5rem;
        font-size: 16px;
    }
    
    #product-categories a,
    #product-tags a,
    .subcategory-btn {
        font-size: 18px;
        padding: 8px;
        min-width: auto;
		margin: 10px 0;
    }
}