/**
 * Styles pour la page allProduct
 * Design responsive pour les filtres, produits et sidebar
 * Thème élégant et moderne pour l'Atelier de Ngoundji
 */

 :root {
    --primary-color: #222222; /* Couleur primaire d'origine */
    --secondary-color: #444444; /* Gris foncé secondaire */
    --accent-color: #333333; /* Accent gris */
    --light-bg: #f9f9f9; /* Fond légèrement gris */
    --text-color: #333333;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

/* Layout général */
.shop-page-area {
    padding: 60px 0;
    background-color: var(--light-bg);
}

/* Optimisation pour 4 colonnes */
.container {
    max-width: 1320px; /* Container plus large pour 4 produits */
}

@media (max-width: 767px) {
    .shop-page-area {
        padding: 30px 0;
    }
}
@media (min-width: 1800px) {
    .container {
        max-width: 1800px; /* Container plus large pour 4 produits */
    }
}

/* Styles pour les sidebars avec un design élégant */
.sidebar-left, .sidebar-right {
    margin-bottom: 30px;
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.sidebar-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    color: var(--accent-color);
    position: relative;
}

.sidebar-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    bottom: -2px;
    left: 0;
}

/* Styles pour les filtres avec design élégant */
.filter-widget {
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 20px;
}

.filter-widget:not(:last-child):after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, var(--secondary-color), transparent);
}

.filter-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 18px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
}

.filter-title:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 18px;
    background: var(--primary-color);
    margin-right: 10px;
    border-radius: 3px;
}

.filter-content {
    padding-bottom: 15px;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 10px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #f9f9f9;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.count {
    margin-left: 5px;
    color: #999;
    font-size: 14px;
}

/* Styles pour le slider de prix */
.price-range-slider {
    margin-top: 20px;
}

.price-slider-ui {
    height: 5px;
    background: #eee;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
}

.price-slider-ui:before {
    content: '';
    position: absolute;
    height: 5px;
    width: 50%;
    background: var(--primary-color);
    border-radius: 5px;
    left: 25%;
}

.price-values {
    display: flex;
    justify-content: space-between;
}

.price-input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Styles pour les options de couleur */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.color-option.active:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Styles pour les options de taille */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-option {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-option:hover, .size-option.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Boutons d'action pour les filtres */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.filter-actions button {
    flex: 1;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* En-tête de la section produits */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.shop-header-left {
    margin-bottom: 15px;
}

.shop-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.shop-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-view {
    display: flex;
    gap: 5px;
}

.shop-view button {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-view button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Message "Aucun produit trouvé" */
.no-products-found {
    text-align: center;
    padding: 50px 0;
}

.no-products-found i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-products-found h3 {
    margin-bottom: 10px;
    font-weight: 500;
}

.no-products-found p {
    color: #777;
}

/* Pagination avec style élégant */
.shop-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.pagination li a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
    z-index: -1;
}

.pagination li.active a:before,
.pagination li a:hover:before {
    transform: scaleX(1);
}

.pagination li.active a {
    color: var(--primary-color);
    font-weight: 700;
}

.pagination li a:hover {
    color: var(--primary-color);
}

/* Styles pour les produits en vedette (sidebar droite) avec design élégant */
.featured-product-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(139, 90, 43, 0.1);
    transition: var(--transition);
}

.featured-product-item:hover {
    transform: translateX(5px);
}

.featured-product-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.featured-product-image {
    width: 90px;
    height: 90px;
    position: relative;
    margin-right: 18px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.featured-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-product-item:hover .featured-product-image img {
    transform: scale(1.08);
}

.featured-product-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.featured-product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-product-title {
    font-size: 15px;
    margin: 0 0 8px;
    line-height: 1.4;
}

.featured-product-title a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

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

.featured-product-price {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.featured-price-now {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.featured-price-was {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
}

.featured-current-price {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
}

.featured-product-rating {
    font-size: 12px;
    color: #FFD700;
    display: flex;
    align-items: center;
}

.featured-rating-count {
    color: #999;
    margin-left: 5px;
    font-size: 11px;
}

/* Bannière promotionnelle avec design élégant */
.promo-banner {
    margin-top: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--border-radius);
    padding: 30px 25px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.promo-banner:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0,0 L100,100 M0,100 L100,0" stroke="rgba(255,255,255,0.05)" stroke-width="2"/></svg>');
    opacity: 0.3;
    animation: promo-bg-move 30s linear infinite;
}

@keyframes promo-bg-move {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.promo-banner h3 {
    margin: 0 0 15px;
    font-size: 22px;
    font-weight: 600;
    position: relative;
}

.promo-banner p {
    margin: 0 0 20px;
    opacity: 0.9;
    font-size: 15px;
    position: relative;
}

.promo-banner .btn-default {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.promo-banner .btn-default:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: var(--transition);
    z-index: -1;
}

.promo-banner .btn-default:hover:before {
    transform: translateX(0);
}

/* Styles responsive */
@media (max-width: 991px) {
    .sidebar-left {
        order: 1;
    }
    
    .col-md-8 {
        order: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .shop-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .shop-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .product-item {
        margin-bottom: 20px;
    }
    
    .filter-widget {
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        margin-bottom: 15px;
    }
    
    .filter-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }
    
    .filter-title:after {
        content: '+';
        font-size: 18px;
    }
    
    .filter-widget.open .filter-title:after {
        content: '-';
    }
    
    .filter-content {
        display: none;
    }
    
    .filter-widget.open .filter-content {
        display: block;
    }
}

/* Styles spécifiques pour les cartes produit avec design élégant */
.product-item {
    margin-bottom: 30px;
    transition: var(--transition);
    display: flex;
    height: 100%;
}

.product-card, .product-card-2 {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.product-card:hover, .product-card-2:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* Ratio 1:1 */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.9);
    transition: var(--transition);
    z-index: 2;
}

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

.product-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: var(--transition);
    cursor: pointer;
}

.product-action-btn:hover {
    background: var(--primary-color);
    color: white;
}

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

.product-category {
    font-size: 12px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-title a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

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

.product-price {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.rating-stars {
    color: #FFD700;
    font-size: 14px;
    margin-right: 5px;
}

.rating-count {
    color: #999;
    font-size: 12px;
}

/* Ajustement pour la vue liste */
.list-view-active .product-item {
    width: 100%;
}

/* Ajustement pour la vue grille */
.row {
    display: flex;
    flex-wrap: wrap;
}

.product-grid .row > [class*='col-'] {
    display: flex;
    margin-bottom: 30px;
}

.list-view-active .product-card-2 {
    display: flex;
    align-items: center;
}

.list-view-active .product-tilt-effect-2 {
    width: 200px;
    flex-shrink: 0;
    margin-right: 20px;
}

.list-view-active .product-info-2 {
    flex-grow: 1;
}

@media (max-width: 767px) {
    .list-view-active .product-card-2 {
        flex-direction: column;
    }
    
    .list-view-active .product-tilt-effect-2 {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
}
