/* ==========================================================
   PAGE CATÉGORIE (css/pages/_category.css)
   Dépend uniquement de _shop-common.css.
========================================================== */

/* ==========================================================
   FIL D'ARIANE
========================================================== */
.cp-breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid var(--cp-line);
}

.cp-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 14px;
    font-size: 15px;
}

.cp-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    color: var(--cp-ink);
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.cp-back:hover {
    background: var(--cp-green);
    border-color: var(--cp-green);
    color: #fff;
}

.cp-crumb {
    color: var(--cp-green);
    font-weight: 500;
    text-decoration: none;
}

.cp-crumb:hover { text-decoration: underline; }

.cp-sep { color: var(--cp-muted); }

.cp-current {
    padding: 8px 16px;
    background: #e8f3ec;
    border: 1px solid #cfe5d7;
    border-radius: 999px;
    font-weight: 500;
}

.cp-meta {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.cp-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: 999px;
    color: var(--cp-muted);
    font-size: 13.5px;
    font-weight: 500;
}

.cp-pill i { color: var(--cp-green); }

/* ==========================================================
   BANNIÈRE
========================================================== */
.cp-hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cp-green-dark), var(--cp-green));
    color: #fff;
    text-align: center;
}

.cp-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(8, 95, 57, .84) 0%,
        rgba(11, 122, 72, .64) 55%,
        rgba(26, 150, 96, .5) 100%);
}

.cp-hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    padding: 48px 24px;
}

.cp-hero-content::before {
    content: "";
    display: block;
    width: min(260px, 60%);
    height: 2px;
    margin: 0 auto 18px;
    background: rgba(255, 255, 255, .55);
}

.cp-hero h1 {
    margin: 0 0 12px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(34px, 6vw, 62px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}

.cp-hero p {
    margin: 0 auto;
    max-width: 600px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(16px, 1.8vw, 21px);
    font-style: italic;
    line-height: 1.45;
    color: rgba(255, 255, 255, .95);
}

/* ==========================================================
   BANDEAU DES CATÉGORIES
========================================================== */
.cp-strip {
    margin-block: 28px 32px;
    padding: 12px 0 16px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 40, 25, .07);
}

.cp-strip-track {
    position: relative;
    display: flex;
    gap: 18px;
    padding: 20px 24px 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.cp-strip-track::-webkit-scrollbar { display: none; }

.cp-strip-card {
    position: relative;
    flex: 0 0 clamp(160px, 16vw, 210px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 16px;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    color: var(--cp-ink);
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform .2s, box-shadow .2s;
}

.cp-strip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .1);
}

.cp-strip-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 3px solid transparent;
    border-radius: 12px;
}

.cp-strip-all {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    color: var(--cp-gold);
    font-size: 38px;
}

.cp-strip-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.cp-strip-count {
    color: var(--cp-muted);
    font-size: 12.5px;
}

.cp-strip-badge {
    position: absolute;
    top: -9px;
    right: -7px;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    background: var(--cp-count);
    border: 2px solid #fff;
    border-radius: 13px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.cp-strip-card.is-active {
    background: var(--cp-green);
    border-color: var(--cp-green-dark);
    color: #fff;
}

.cp-strip-card.is-active img { border-color: #fff; }
.cp-strip-card.is-active .cp-strip-count { color: rgba(255, 255, 255, .88); }

.cp-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 6px;
}

.cp-dots[hidden] { display: none; }

.cp-dot {
    position: relative;
    width: 12px;
    height: 12px;
    padding: 0;
    background: #d3dad6;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
}

/* zone de clic élargie */
.cp-dot::after {
    content: "";
    position: absolute;
    inset: -9px;
}

.cp-dot.is-active { background: var(--cp-green-dark); }

/* ==========================================================
   SECTION PRODUITS
========================================================== */
.cp-products {
    padding: 48px 0 80px;
    background: linear-gradient(180deg, #f7f2ef 0%, #fbeeed 100%);
}

.cp-products-head {
    margin-bottom: 36px;
    text-align: center;
}

.cp-products-head h2 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.cp-products-head p {
    margin: 0;
    color: var(--cp-muted);
    font-size: 17px;
}

/* ---------- Grille ---------- */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 22px;
}

/* ---------- Carte produit ---------- */
.catalogue-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: var(--cp-radius);
    box-shadow: 0 4px 18px rgba(30, 30, 30, .07);
    transition: box-shadow .25s, transform .25s;
}

.catalogue-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(30, 30, 30, .12);
}

.product-link { display: block; }

.product-image-box {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f6f5;
}

.product-image-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.catalogue-product-card:hover .product-image-box img { transform: scale(1.04); }

.product-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.product-status-badge.stock { background: var(--cp-ok); }
.product-status-badge.out   { background: var(--cp-danger); }

.product-info {
    padding: 18px 18px 4px;
    text-align: center;
}

.product-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
}

.product-info h3 a {
    color: inherit;
    text-decoration: none;
}

.product-info h3 a:hover { color: var(--cp-green); }

.product-price {
    margin: 0;
    color: var(--cp-green);
    font-size: 21px;
    font-weight: 700;
}

.product-action {
    margin-top: auto;
    padding: 14px 18px 18px;
}

.product-btn-add,
.product-btn-reserve {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .2s, transform .1s;
}

.product-btn-add {
    background: var(--cp-green);
    color: #fff;
}

.product-btn-add:hover { filter: brightness(1.1); }
.product-btn-add:active { transform: scale(.98); }

.product-btn-reserve {
    background: var(--cp-warn);
    color: #2b2100;
}

/* "Réserver" n'a pas encore d'action : on garde l'aspect, curseur explicite */
.product-btn-reserve:disabled {
    opacity: 1;
    cursor: not-allowed;
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 1200px) {
    .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .cp-hero { min-height: 250px; }
    .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .cp-meta { width: 100%; margin-left: 0; }
}

@media (max-width: 600px) {
    /* --- CORRECTION DU FIL D'ARIANE MOBILE SUR UNE SEULE LIGNE --- */
    .cp-breadcrumb {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 6px;
        padding-block: 12px;
        font-size: 14px;
    }
    
    .cp-back {
        padding: 8px 12px;
        flex-shrink: 0; /* Empêche le bouton retour de rétrécir */
    }

    .cp-back span {
        display: none; /* On cache le texte "Retour" pour gagner de la place */
    }

    .cp-crumb {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .cp-sep {
        display: none; /* On cache les séparateurs pour gagner de la place */
    }

    .cp-current {
        padding: 8px 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* Coupe le texte long avec "..." */
    }

    .cp-meta {
        margin-left: auto; /* Pousse les badges (produits + horloge) à droite */
        margin-top: 0;
        width: auto;
        flex-shrink: 0; /* Empêche les badges de s'écraser */
        gap: 6px;
    }

    .cp-pill {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* On masque le compteur de produits sur mobile pour laisser de la place à l'horloge */
    .cp-pill:not(:last-child) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalogue-product-card:hover,
    .cp-strip-card:hover { transform: none; }
}