/* Styles pour la boutique Livewire */

/* Notification toast */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 20px;
    background-color: var(--alert-green-bg);
    border: 1px solid var(--alert-green-border);
    color: var(--alert-green-text);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeInOut 3s ease-in-out;
    max-width: 90%;
    font-size: 14px;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Filtres et recherche */
.shop-filters {
    background-color: #fff;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
}

.search-box {
    position: relative;
}

/* Styles communs pour tous les champs de formulaire */
.form-control,
.form-select {
    box-sizing: border-box;
    height: 38px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.25s ease;
    background-color: #fff;
    color: #555;
    box-shadow: none;
    line-height: normal;
    padding: 0 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(73, 167, 96, 0.1);
    outline: none;
    color: #333;
}

/* Champ de recherche */
.search-box input {
    padding-left: 35px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 14px;
}

.search-box i {
    display: none; /* Masquer l'icône car nous utilisons une icône en background */
}

/* Sélecteurs */
.category-filter select,
.sort-by select,
.per-page-selector select {
    background-position: right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px;
    padding-right: 35px;
}

/* Les styles pour les boutons de changement de mode ont été supprimés */

.active-filters {
    background-color: #f5f8fa;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #e0e6ed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.active-filters .filters-label {
    font-size: 0.85rem;
    color: #444;
    margin-right: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.active-filters .badge {
    background-color: #e8f0fe;
    color: #2c5282;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    border-radius: 30px;
    margin-right: 8px;
    margin-bottom: 5px;
    border: 1px solid #d0e1fd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.active-filters .badge i {
    font-size: 0.8rem;
    margin-left: 8px;
    opacity: 0.8;
    cursor: pointer;
    color: #4a5568;
}

.active-filters .badge i:hover {
    opacity: 1;
}

.active-filters .filter-badges {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
}

.active-filters .reset-btn {
    font-size: 0.85rem;
    padding: 6px 14px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e0;
    color: #4a5568;
    border-radius: 30px;
    margin-left: auto;
    transition: all 0.2s ease;
    font-weight: 500;
}

.active-filters .reset-btn i {
    margin-right: 5px;
}

.active-filters .reset-btn:hover {
    background-color: #e53e3e;
    color: white;
    border-color: #e53e3e;
}

/* Produits en grille */
.product-card {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

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

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* Ratio 4:3 pour les images */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-actions {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    background-color: rgba(73, 167, 96, 0.85);
    padding: 8px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.btn-add-to-cart {
    background: transparent;
    border: none;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.btn-add-to-cart i {
    margin-right: 6px;
    font-size: 12px;
}

.btn-add-to-cart:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.product-categories {
    margin-bottom: 8px;
}

.product-categories .badge {
    font-weight: normal;
    font-size: 0.7rem;
    padding: 3px 6px;
    background-color: #f0f0f0;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 3px;
    margin-right: 4px;
    margin-bottom: 4px;
    display: inline-block;
}

.product-categories .badge:hover {
    background-color: var(--color-primary);
    color: white;
}

.product-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.3;
    flex-grow: 1;
}

.product-title a {
    color: var(--color-heading);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--color-primary);
}

.product-price {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: auto;
}

/* Les styles pour la vue en liste ont été supprimés car nous n'utilisons plus que le mode grille */

/* État vide */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    color: #ccc;
    margin-bottom: 15px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #555;
    font-size: 1.2rem;
}

.empty-state p {
    color: #777;
    max-width: 400px;
    margin: 0 auto 15px;
    font-size: 0.9rem;
}

.empty-state .btn {
    padding: 6px 15px;
    font-size: 14px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 4px;
}

.page-item:first-child .page-link {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.page-item:last-child .page-link {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.4rem 0.65rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--color-primary);
    background-color: #fff;
    border: 1px solid #dee2e6;
    font-size: 14px;
}

.page-link:hover {
    z-index: 2;
    color: var(--color-primary);
    text-decoration: none;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.15rem rgba(73, 167, 96, 0.15);
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Résultats et pagination par page */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    padding: 0 2px;
}

.results-count {
    margin-bottom: 0;
    color: #777;
    font-size: 0.75rem;
    font-weight: 500;
}

.per-page-selector {
    display: flex;
    align-items: center;
}

.per-page-selector select {
    width: auto;
    height: 32px;
    font-size: 0.75rem;
    border-color: #ddd;
    background-color: #fff;
    color: #666;
    border-radius: 4px;
    padding: 0 30px 0 10px;
}

/* Responsive */
@media (max-width: 991.98px) {
    /* Les styles pour la vue en liste ont été supprimés */
}

@media (max-width: 767.98px) {
    .shop-filters {
        padding: 12px;
    }

    .product-card .product-title {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .btn-add-to-cart span {
        display: none;
    }

    .btn-add-to-cart i {
        margin-right: 0;
    }

    /* Les styles pour les boutons de changement de mode ont été supprimés */

    .col-xl-3.col-lg-4.col-md-6 {
        padding-left: 8px;
        padding-right: 8px;
    }

    .products-grid .row {
        margin-left: -8px;
        margin-right: -8px;
    }
}

@media (max-width: 575.98px) {
    .product-card {
        margin-bottom: 15px;
    }

    .product-actions {
        position: static;
        background-color: var(--color-primary);
    }

    .product-card:hover .product-image img {
        transform: none;
    }

    .product-card:hover {
        transform: none;
    }

    .shop-filters .row > div {
        margin-bottom: 10px;
    }

    .active-filters {
        padding: 10px 12px;
        margin-top: 12px;
    }

    .active-filters .badge {
        margin-bottom: 6px;
        font-size: 0.75rem;
        padding: 5px 10px;
        border-radius: 20px;
    }

    .active-filters .filters-label {
        font-size: 0.8rem;
        margin-bottom: 6px;
        display: block;
        margin-right: 0;
    }

    .active-filters .reset-btn {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-top: 6px;
        display: inline-block;
        margin-left: 0;
    }

    .active-filters .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .active-filters .d-flex .badge {
        margin-right: 5px;
        display: inline-flex;
    }

    .active-filters .filter-badges {
        width: 100%;
        margin-bottom: 5px;
    }

    .results-info {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .per-page-selector {
        margin-top: 6px;
    }

    .results-count {
        font-size: 0.7rem;
    }

    .product-info {
        padding: 10px;
    }

    .product-categories .badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .pagination .page-link {
        padding: 0.3rem 0.5rem;
        font-size: 13px;
    }
}
