/*
Theme Name: Astra Child
Theme URI: https://www.3k-ebusiness.com/
Description: Thème enfant pour Astra.
Author: Pascal Kataka
Author URI: https://www.3k-ebusiness.com/
Template: astra
Version: 1.0.0
*/



/* ======= STYLE GLOBAL DU POPUP ======= */
#promo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, visibility 0.4s;
}

#promo-popup.show {
    visibility: visible;
    opacity: 1;
}

/* ======= CONTENU DU POPUP (CARRÉ) ======= */
.popup-content {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    height: 500px;
    max-height: 90vh;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ======= BOUTON FERMER ======= */
.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    color: red;
    cursor: pointer;
}

/* ======= SLIDER DES PRODUITS ======= */
.promo-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.promo-products {
    display: flex;
    gap: 10px;
    padding: 10px;
    scroll-behavior: smooth;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
    scrollbar-width: none;
}

/* Masquer la scrollbar */
.promo-products::-webkit-scrollbar {
    display: none;
}

/* ======= PRODUIT BOX (CARRÉ) ======= */
.promo-item {
    flex: 0 0 calc(50% - 10px);
    background: #f8f8f8;
    padding: 10px;
    border-radius: 8px;
    min-width: 140px;
    max-width: 200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.promo-item:hover {
    transform: scale(1.05);
}

/* ======= IMAGE CARRÉE ======= */
.promo-img-container {
    width: 100px;
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* ======= TITRE ======= */
.promo-title {
    font-size: 14px;
    font-weight: bold;
    margin: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

/* ======= PRIX ======= */
.promo-prices {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.old-price {
    text-decoration: line-through;
    color: grey;
}

.new-price {
    color: red;
    font-weight: bold;
}

/* ======= BOUTON COMMANDER ======= */
.btn-order {
    background: #ff5a5f;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
    display: inline-block;
    transition: background 0.3s;
}

.btn-order:hover {
    background: #e0484e;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
    .popup-content {
        width: 90%;
        height: auto;
        max-height: 90vh;
    }

    .promo-item {
        flex: 0 0 100%;
    }
}
