/* Custom Product Carousel Styles */
.product-carousels-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}
 
.carousel-section {
    margin-bottom: 60px;
}
 
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}
 
.section-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #333;
}
 
.carousel-nav {
    display: flex;
    gap: 10px;
}
 
.carousel-prev,
.carousel-next {
    width: 40px;
    height: 40px;
    border: 2px solid #333;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}
 
.carousel-prev:hover:not(:disabled),
.carousel-next:hover:not(:disabled) {
    background: #333;
    color: white;
}
 
.carousel-prev:disabled,
.carousel-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
 
.carousel-container {
    overflow: hidden;
    position: relative;
}
 
.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
}
 
/* Fixed carousel item styling */
.carousel-item {
    flex: 0 0 calc(25% - 15px);
    min-width: 250px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
 
.carousel-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
 
/* Make the link wrap only image and text */
.carousel-item-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
 
.carousel-item-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
 
.carousel-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

.carousel-item-image img[data-loaded="loading"] {
    opacity: 0.5;
}

.carousel-item-image img[data-loaded="true"] {
    opacity: 1;
}
 
.carousel-item-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 10px 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
 line-height: 1.3;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    display: block;}
 
.carousel-item-price {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    display: block;
}
 
.carousel-item-price del {
    color: #999;
    font-size: 16px;
    font-weight: 400;
    margin-right: 8px;
}
 
.carousel-item-price ins {
    text-decoration: none;
}
 .carousel-item-media{
margin:0 !important;
}
.carousel-item-actions .button,
.carousel-item-actions .add_to_cart_button,
.carousel-item-actions .product_type_simple,
.carousel-item-actions .product_type_variable,
.carousel-item-actions .product_type_external {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}
 
.carousel-item-actions .button:hover,
.carousel-item-actions .add_to_cart_button:hover,
.carousel-item-actions .product_type_simple:hover,
.carousel-item-actions .product_type_variable:hover,
.carousel-item-actions .product_type_external:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
 
.carousel-item-actions .button.loading,
.carousel-item-actions .add_to_cart_button.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}
 
.carousel-item-actions .button.added,
.carousel-item-actions .add_to_cart_button.added {
    background: #27ae60;
}
 
.carousel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    font-size: 16px;
    color: #666;
}
 
.carousel-loading span {
    position: relative;
    padding-left: 30px;
}
 
.carousel-loading span:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
 
@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}
 
.carousel-error,
.no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}
 
/* Responsive Design */
@media (max-width: 1200px) {
    .carousel-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}
 
@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 200px;
    }
    .carousel-item-image {
        height: 220px;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .section-header h2 {
        font-size: 22px;
    }
    .carousel-nav {
        align-self: flex-end;
    }
}
 
@media (max-width: 480px) {
    .product-carousels-wrapper {
        padding: 10px;
    }
    .carousel-section {
        margin-bottom: 40px;
    }
    .carousel-item {
        flex: 0 0 calc(100% - 20px);
        min-width: auto;
    }
    .carousel-item-image {
        height: 300px;
    }
    .section-header {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    .carousel-nav {
        display: flex !important;
        gap: 8px;
        align-self: auto;
    }
    .carousel-prev,
    .carousel-next {
        width: 36px;
        height: 36px;
        font-size: 20px;
        display: flex !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        z-index: 10;
    }
}