/* ============================================
   MINI-PANIER FLOTTANT — PENSEZ SAUVAGE KRAFT
   z-index 350 : au-dessus du liseron (201),
   en dessous du bloc recherche (400)
   ============================================ */

.ps-minipanier {
    position: sticky;
    top: 80px;
    width: 335px;
    flex-shrink: 0;
    align-self: flex-start;
    z-index: 400;
    font-family: 'OldNewspaperTypesALM', Georgia, serif;
    /* Rebond leger quand le mini-panier arrive sur le footer */
    transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    isolation: isolate;
}

/* Cadre : porte le fond kraft + border-image + ombre. */
.ps-minipanier-cadre {
    background: url('../images/kraft-long.jpg') #DCB78F;
    background-size: 4%;
    background-attachment: scroll;
    border: 3px solid #4C351C;
    border-image: url('../images/border.png') 30 30 / 20px 20px / 0.2rem stretch;
    box-shadow: 2px 3px 6px rgba(40, 15, 0, 0.8), 4px 8px 20px rgba(60, 20, 0, 0.5);
    padding: 26px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Inner : voile tres leger + contenu. Pas de fond propre (cadre s'en charge). */
.ps-minipanier-inner {
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 8px 10px 12px;
}

/* Voile tres discret sur la zone de contenu */
.ps-minipanier-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.09);
    pointer-events: none;
    z-index: 0;
}

/* Contenu au-dessus du voile */
.ps-minipanier-titre,
.ps-minipanier-sep,
.ps-minipanier-produits,
.ps-minipanier-recap,
.ps-minipanier-empty,
.ps-minipanier-btn {
    position: relative;
    z-index: 1;
}

/* --- Titre MON PANIER --- */
.ps-minipanier-titre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ps-minipanier-titre-texte {
    font-family: 'OldNewspaperTypesALM', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: #4f3821;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin-left: -4px;
    margin-top: -3px;
}

.ps-minipanier-icone-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    margin-left: 10px;
}

.ps-minipanier-icone {
    width: 54px;
    height: 54px;
    display: block;
    opacity: 0.82;
}

.ps-minipanier-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #D4600A;
    color: #fff;
    font-size: 0.82rem;
    font-family: Georgia, serif;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* --- Separateur artisanal ---
   Tranche superieure de border.png utilisee en border-image sur une
   ligne de hauteur zero. Rend la texture dessinee du cadre. */
.ps-minipanier-sep {
    display: block;
    height: 0;
    border: 0;
    border-top: 3px solid transparent;
    border-image: url('../images/border.png') 24 / 3px round;
    margin: 0 0 12px;
}

/* --- Liste produits --- */
.ps-minipanier-produits {
    list-style: none;
    margin: 0 0 10px;
    padding: 0 8px 0 0;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 53, 28, 0.3) transparent;
}

.ps-minipanier-produit {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    color: #2C1810;
    line-height: 1.3;
    padding-left: 0;   /* vignette flush a gauche */
}

.ps-minipanier-vignette {
    width: 54px;
    height: 54px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(76, 53, 28, 0.3);
    margin-top: 1px;
}

.ps-minipanier-produit-nom {
    font-size: 1.05rem;
    color: #2C1810;
    flex: 1;
    line-height: 1.35;
}

/* --- Recap --- */
.ps-minipanier-recap {
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: #2C1810;
}

.ps-minipanier-ligne {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    gap: 6px;
}

.ps-minipanier-port-valeur {
    font-size: 1.05rem;
    color: #2C1810;
    text-align: right;
    flex: 1;
}

.ps-minipanier-offert {
    font-size: 0.98rem;
    color: #2C1810;
    font-style: italic;
    margin: 5px 0;
    text-align: center;
}

.ps-minipanier-total {
    font-size: 1.18rem;
    font-weight: bold;
    color: #2C1810;
}

/* --- Bouton artisanal border-image --- */
.ps-minipanier-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: rgba(200, 168, 130, 0.3);
    color: #2C1810 !important;
    font-family: 'OldNewspaperTypesALM', Georgia, serif;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
    padding: 8px 10px;
    text-decoration: none;
    box-sizing: border-box;
    border: 3px solid #4C351C;
    border-image: url('../images/border.png') 24 24 / 12px 12px / 0 round;
    margin-top: 10px;
    transition: background 0.2s ease;
}

.ps-minipanier-btn:hover {
    background: rgba(212, 96, 10, 0.18);
    color: #2C1810 !important;
}

/* Panier vide */
.ps-minipanier-empty {
    font-size: 1.05rem;
    color: rgba(44, 24, 16, 0.6);
    font-style: italic;
    text-align: center;
    margin: 10px 0;
}

/* Bloc cadeau état vide */
.ps-minipanier-cadeau-vide {
    margin: 12px 4px 16px;
    padding: 12px 14px;
    background: rgba(212, 96, 10, 0.30);
    border: 1px solid rgba(125, 43, 11, 0.55);
    border-radius: 6px;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.25);
    color: #4f3821;
    font-family: 'OldNewspaperTypesALM', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.35;
    text-align: center;
}

/* ============================================
   RESPONSIVE MINI-PANIER
   Visible à partir de 1389px. Seuil = "cadre 4 vignettes (996px) + gap 26
   + minipanier 335 + padding wrapper 32 = 1389". Sous ce seuil il n'y a
   pas la place pour minipanier + au moins 4 vignettes côte à côte sans
   débordement horizontal. Sera remplacé par une icône panier dans le
   header lors du chantier responsive global.
   ============================================ */

@media (max-width: 1388px) {
    .ps-minipanier { display: none !important; }
}

/* ============================================
   HALO CADEAU — mini-panier illuminé
   ============================================ */

.ps-minipanier--cadeau .ps-minipanier-cadre {
    box-shadow:
        0 0 0 3px #D4600A,
        0 0 18px 6px rgba(212, 96, 10, 0.55),
        2px 3px 6px rgba(40, 15, 0, 0.8);
    animation: ps-halo-pulse 2.5s ease-in-out infinite;
}

@keyframes ps-halo-pulse {
    0%   { box-shadow:
        0 0 0 2px #D4600A,
        0 0 8px 2px rgba(212, 96, 10, 0.3),
        2px 3px 6px rgba(40, 15, 0, 0.8); }
    50%  { box-shadow:
        0 0 0 4px #D4600A,
        0 0 35px 14px rgba(212, 96, 10, 0.75),
        2px 3px 6px rgba(40, 15, 0, 0.8); }
    100% { box-shadow:
        0 0 0 2px #D4600A,
        0 0 8px 2px rgba(212, 96, 10, 0.3),
        2px 3px 6px rgba(40, 15, 0, 0.8); }
}

.ps-cadeau-bandeau {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 12px;
}

.ps-cadeau-bandeau img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Vignette cliquable */
.ps-minipanier-vignette-lien {
    flex-shrink: 0;
    display: block;
    line-height: 0;
}

.ps-minipanier-vignette-lien:hover .ps-minipanier-vignette {
    opacity: 0.8;
}

/* Nom produit cliquable */
a.ps-minipanier-produit-nom {
    color: #2C1810;
    text-decoration: none;
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.35;
}

a.ps-minipanier-produit-nom:hover {
    color: #D4600A;
    text-decoration: underline;
}

/* Bouton supprimer */
.ps-minipanier-supprimer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: rgba(44, 24, 16, 0.4);
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    align-self: center;
}

.ps-minipanier-supprimer:hover {
    color: #7D2B0B;
    background: rgba(212, 96, 10, 0.15);
}

.ps-cadeau-bandeau span {
    display: block;
    width: 100%;
    background: rgba(212, 96, 10, 0.22);
    border: 2px solid rgba(212, 96, 10, 0.7);
    color: #7D2B0B;
    font-family: 'OldNewspaperTypesALM', Georgia, serif;
    font-size: 1.45rem;
    font-weight: bold;
    text-align: center;
    padding: 10px 12px;
    border-radius: 3px;
    letter-spacing: 0.01em;
    box-sizing: border-box;
}


/* Ligne code promo dans le mini-panier */
.ps-minipanier-promo {
    margin-top: 2px;
}
