/* ==========================================================================
   TAIBA STATIONERY — PRODUCTS.CSS
   Titres de section + Cartes produits
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SECTION PRODUITS — FOND & ESPACEMENT
   -------------------------------------------------------------------------- */
.products-tab-section {
    background: #f4f1eb !important;
    padding: 20px 0 !important;
}

.product-block {
    margin-bottom: 60px !important;
}

.product-block:last-child {
    margin-bottom: 0 !important;
}


.pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* --------------------------------------------------------------------------
   2. TITRES DE SECTION — DESIGN PRO AVEC LIGNE DÉCORATIVE
   -------------------------------------------------------------------------- */
.product-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.product-block-title {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

/* Trait supprimé */

.product-block-title h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}
 
.product-block-title.title-popular h3  { color: var(--primary-color); } 

/* Icônes titre supprimées */

/* Bouton "Voir tout" */
.btn-see-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.btn-see-all.btn-new {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}
.btn-see-all.btn-new:hover {
    background: var(--accent-color);
    color: #fff;
}

.btn-see-all.btn-promo {
    border: 2px solid #e63946;
    color: #e63946;
    background: transparent;
}
.btn-see-all.btn-promo:hover {
    background: #e63946;
    color: #fff;
}

.btn-see-all.btn-popular {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}
.btn-see-all.btn-popular:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Ligne séparatrice sous le header */
.product-block-divider {
    height: 2px;
    background: linear-gradient(to right, #e0dbd0, transparent);
    margin-bottom: 24px;
    border: none;
}


/* --------------------------------------------------------------------------
   3. CARTE PRODUIT — REDESIGN COMPLET
   -------------------------------------------------------------------------- */
.product-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #ede9e0;
    overflow: hidden;
    position: relative;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
    border-color: #d6cfc2;
}

/* Badge promo */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e63946;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
    z-index: 2;
    letter-spacing: 0.3px;
    right: 16px;
    left: auto;
}

.product-badge.out-of-stock {
    background: #6c757d;
}

/* Zone image */
.product-image-link {
    display: block;
    text-decoration: none;
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 80%;
    overflow: hidden;
    background: #f8f6f2;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform 0.38s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.07);
}

/* Informations produit */
.product-info {
    padding: 14px 15px 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 6px;
}

.product-category {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a09080;
}

.product-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-name a:hover {
    color: var(--primary-color);
}

/* Étoiles */
.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-rating .stars {
    display: flex;
    gap: 2px;
}

.product-rating .stars i {
    font-size: 0.72rem;
    color: #f5c518;
}

.product-rating .stars i.far {
    color: #d0ccc4;
}

.rating-count {
    font-size: 0.72rem;
    color: #a09080;
    font-weight: 500;
}

/* Prix */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.current-price small {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
}

.old-price {
    font-size: 0.8rem;
    color: #b0a898;
    text-decoration: line-through;
}

.old-price small {
    font-size: 0.68rem;
}

/* Bouton panier */
.product-actions {
    margin-top: 10px;
}

.btn-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 0;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-cart.add-to-cart {
    background: var(--primary-color);
    color: #fff;
}

.btn-cart.add-to-cart:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 17, 19, 0.30);
}

.btn-cart.disabled {
    background: #e9e5de;
    color: #b0a898;
    cursor: not-allowed;
}


/* --------------------------------------------------------------------------
   4. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    .products-tab-section {
        padding: 36px 0 !important;
    }

    .product-block {
        margin-bottom: 40px !important;
    }

    .product-block-title h3 {
        font-size: 1.1rem;
    }


    .btn-see-all {
        padding: 6px 13px;
        font-size: 0.78rem;
    }

    .product-image {
        padding-top: 85%;
    }

    .product-info {
        padding: 11px 12px 13px;
    }

    .product-name {
        font-size: 0.82rem;
    }

    .current-price {
        font-size: 0.98rem;
    }

    .btn-cart {
        padding: 8px 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {

    .product-block-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .product-block-title h3 {
        font-size: 1rem;
    }
}

/* Compteur dans le bouton "Voir tout" */
.see-all-count {
    font-weight: 500;
    opacity: 0.75;
    font-size: 0.78rem;
}


/* --------------------------------------------------------------------------
   GRILLE PRODUITS — 5 PAR LIGNE (custom, pas Bootstrap)
   -------------------------------------------------------------------------- */
/* ── Grille produits ─────────────────────────────────────────────────────── */
.products-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
}

.col-product {
    width: 20%;
    padding: 0 8px;
    margin-bottom: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

@media (max-width: 992px) {
    .col-product { width: 33.333%; }
}

@media (max-width: 768px) {
    .col-product { width: 50%; }
}

@media (max-width: 361px) {
    .col-product { width: 100%; }
}