/* WP Packs - front */
.wppack { max-width: 760px; margin: 0 auto; }
.wppack__title { margin-bottom: .5rem; }
.wppack__intro { color: #6c757d; margin-bottom: 1rem; }

.wppack__items { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.wppack__item {
    display: flex; align-items: center; gap: 1rem;
    padding: .75rem 0; border-bottom: 1px solid #eee;
}
.wppack__item-img img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; }
.wppack__item-info { display: flex; flex-direction: column; }
.wppack__item-name { font-weight: 600; text-decoration: none; }
.wppack__qty { color: #e8520a; font-weight: 700; }
.wppack__item-ref { font-size: .8rem; color: #adb5bd; }
.wppack__item-price { font-size: .9rem; color: #495057; }

.wppack__pricing {
    background: #f8f9fa; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.wppack__base { color: #6c757d; }
.wppack__base-value { text-decoration: line-through; }
.wppack__price { font-size: 1.4rem; font-weight: 700; margin-top: .25rem; }
.wppack__price-value { color: #e8520a; }
.wppack__savings {
    display: inline-block; margin-top: .5rem; padding: .2rem .6rem;
    background: #e8520a; color: #fff; border-radius: 4px; font-size: .85rem; font-weight: 600;
}

.wppack__add { display: inline-flex; align-items: center; gap: .4rem; }

/* bloc "disponible en pack" sur la fiche produit */
.wppack-related { margin: 1rem 0; padding: .75rem 1rem; background: #fff6f1; border-radius: 6px; }
.wppack-related__title { font-weight: 600; margin-bottom: .35rem; }
.wppack-related__list { margin: 0; padding-left: 1.1rem; }

/* ---- Grille de packs (page liste + bloc home) ---- */
.wppack-home { margin: 2.5rem 0; }
.wppack-home__title { text-align: center; margin-bottom: 1.5rem; }
.wppack-home__more { text-align: center; margin-top: 1.5rem; }

.wppack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.wppack-card {
    border: 1px solid #eee; border-radius: 8px; overflow: hidden;
    background: #fff; display: flex; flex-direction: column;
    transition: box-shadow .15s ease;
}
.wppack-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.wppack-card__img { position: relative; display: block; aspect-ratio: 1 / 1; background: #f8f9fa; }
.wppack-card__img img { width: 100%; height: 100%; object-fit: cover; }
.wppack-card__flag {
    position: absolute; top: 8px; left: 8px;
    background: #e8520a; color: #fff; font-size: .8rem; font-weight: 700;
    padding: .15rem .5rem; border-radius: 4px;
}

.wppack-card__body { padding: .85rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.wppack-card__name { font-weight: 600; text-decoration: none; color: #212529; line-height: 1.3; }
.wppack-card__count { font-size: .8rem; color: #adb5bd; }
.wppack-card__prices { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; }
.wppack-card__base { text-decoration: line-through; color: #adb5bd; font-size: .9rem; }
.wppack-card__price { color: #e8520a; font-weight: 700; font-size: 1.15rem; }
.wppack-card__btn { margin-top: .5rem; width: 100%; }

/* ================================================================
   Boutons aux couleurs Wellputt (#e8520a) - override du thème
   ================================================================ */
.wppack__add,
.wppack-card__btn {
    background-color: #e8520a !important;
    border: 1px solid #e8520a !important;
    color: #fff !important;
    transition: background-color .15s ease, border-color .15s ease;
}
.wppack__add:hover,
.wppack__add:focus,
.wppack-card__btn:hover,
.wppack-card__btn:focus {
    background-color: #c8450a !important;
    border-color: #c8450a !important;
    color: #fff !important;
}

/* bouton secondaire "voir tous les packs" : orange en contour */
.wppack-home__more-btn {
    background-color: transparent !important;
    border: 2px solid #e8520a !important;
    color: #e8520a !important;
}
.wppack-home__more-btn:hover,
.wppack-home__more-btn:focus {
    background-color: #e8520a !important;
    color: #fff !important;
}

/* icône panier SVG */
.wppack__cart-icon { vertical-align: middle; margin-right: .35rem; }

/* ---- Image de couverture + description sur la page pack ---- */
.wppack__cover { margin-bottom: 1.25rem; text-align: center; }
.wppack__cover img { max-width: 100%; height: auto; border-radius: 8px; }
.wppack__description { color: #495057; line-height: 1.6; margin-bottom: 1.5rem; }

/* ---- Bloc packs sur page categorie ---- */
.wppack-category { margin: 1.5rem 0 2rem; }
.wppack-category__title { margin-bottom: 1rem; font-size: 1.4rem; }
.wppack-category .wppack-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ================================================================
   v1.4.0 — layout page pack 2 colonnes, grille centree, etiquette
   ================================================================ */

/* --- Grille de cartes : centree (corrige l'alignement a gauche) --- */
.wppack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
}
.wppack-card {
    width: 240px;
    max-width: 100%;
    flex: 0 1 240px;
}
.wppack-category .wppack-grid { justify-content: center; }

/* --- Etiquette d'economie : sous le prix, plus sur l'image --- */
.wppack-card__save {
    align-self: flex-start;
    display: inline-block;
    background: #e8520a;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    padding: .12rem .5rem;
    border-radius: 4px;
    margin-top: .1rem;
}

/* --- Page pack facon fiche produit : image gauche / infos droite --- */
/* pleine largeur : on retire le bridage 760px du .wppack de base,
   le bloc occupe le conteneur de contenu du theme (comme une fiche produit) */
.wppack.wppack--product {
    max-width: none;
    margin: 0;
}
/* specificite renforcee + !important pour passer devant le theme */
.wppack.wppack--product .wppack__main {
    display: flex !important;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}
/* colonnes 50 / 50 */
.wppack.wppack--product .wppack__media,
.wppack.wppack--product .wppack__info {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    box-sizing: border-box;
}
.wppack__hero {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.wppack.wppack--product .wppack__title { margin-top: 0; }
.wppack__included { margin-top: 1.5rem; clear: both; }

/* produits inclus : en ligne (cards cote a cote) dans la colonne droite */
.wppack--product .wppack__items {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 0;
    margin: 0;
}
.wppack--product .wppack__item {
    flex: 1 1 180px;
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: .5rem .6rem;
    margin: 0;
}
.wppack--product .wppack__item-img img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
}
.wppack--product .wppack__item-name { font-size: .9rem; }
.wppack--product .wppack__item-price { font-size: .85rem; }

@media (max-width: 767px) {
    .wppack.wppack--product .wppack__media,
    .wppack.wppack--product .wppack__info {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
