/* 
 * Category Slider Styles
 * Path: modules/categoryslider/views/css/categoryslider.css
 */

.category-slider-section {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.slider-titles {
    flex: 1;
}

.slider-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.slider-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

.view-all-link:hover {
    background-color: #fff;
    border-color: #1a1a1a;
}

.slider-wrapper {
    position: relative;
    padding: 0;
}

.products-slider {
    overflow: hidden;
    margin: 0 60px;
}

.products-track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
    will-change: transform;
}

.product-item {
    flex: 0 0 calc(20% - 12.8px);
    min-width: 200px;
    max-width: calc(20% - 12.8px);
}

.product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
}

.eco-badge {
    display: inline-block;
    background-color: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: #fafafa;
    overflow: hidden;
}

.product-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-reference {
    font-size: 11px;
    color: #999;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.4;
    flex: 1;
}

.product-name a {
    color: inherit;
    text-decoration: none;
}

.product-name a:hover {
    color: #0066cc;
}

.product-price-info {
    margin-top: auto;
}

.price-label {
    font-size: 12px;
    color: #666;
    margin: 0 0 4px 0;
}

.product-actions {
    margin: 8px 0 0 0;
}

.details-link {
    display: inline-block;
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.details-link:hover {
    text-decoration: underline;
}

/* Prix et ajout au panier */
.price-qty-add {
    margin-top: 12px;
}

.product-price-and-shipping {
    margin-bottom: 12px;
}

.regular-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.discount-percentage,
.discount-amount {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
}

/* Mini formulaire d'ajout au panier */
.mini-add-to-cart {
    margin-top: 8px;
}

.mini-cart-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qty-wrapper {
    position: relative;
    flex: 1;
}

.input-qty {
    width: 100%;
    height: 38px;
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.qty-arrows {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.btn-qty-increase,
.btn-qty-decrease {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    color: #666;
    width: 20px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-qty-increase:hover,
.btn-qty-decrease:hover {
    color: #1a1a1a;
}

.btn-qty-increase .material-icons,
.btn-qty-decrease .material-icons {
    font-size: 16px;
}

.add-to-cart-btn {
    width: 44px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0066cc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    background-color: #0052a3;
}

.add-to-cart-btn .material-icons {
    color: white;
    font-size: 20px;
}

/* Message pour utilisateurs non connectés */
.hide-price {
    padding: 12px 0;
}

.sub-price {
    font-size: 12px;
    color: #666;
    margin: 0 0 4px 0;
}

.price-connect {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.price-connect a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.price-connect a:hover {
    text-decoration: underline;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slider-nav:hover {
    background-color: #f5f5f5;
    border-color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.slider-prev {
    left: 30px;
}

.slider-next {
    right: 30px;
}

/* Responsive */
@media (max-width: 1200px) {
    .product-item {
        flex: 0 0 calc(25% - 12px);
        max-width: calc(25% - 12px);
    }
}

@media (max-width: 992px) {
    .product-item {
        flex: 0 0 calc(33.333% - 10.67px);
        max-width: calc(33.333% - 10.67px);
    }
    
    .slider-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .product-item {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
    
    .category-slider-section {
        padding: 40px 0;
    }
    
    .products-slider {
        margin: 0 45px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .slider-prev {
        left: 22px;
    }
    
    .slider-next {
        right: 22px;
    }
}

@media (max-width: 576px) {
    .product-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .slider-title {
        font-size: 20px;
    }
    
    .products-track {
        gap: 12px;
    }
    
    .products-slider {
        margin: 0 40px;
    }
    
    .slider-nav {
        width: 36px;
        height: 36px;
    }
    
    .slider-prev {
        left: 12px;
    }
    
    .slider-next {
        right: 12px;
    }
}