/*
Theme Name: Astra Child - ShopNFood Final
Template: astra
Description: Theme ShopNFood avec design Crazy Food et Lucide Icons
Version: 4.0.0
Author: ShopNFood
*/

/* Global resets for Astra compatibility */
.site-content {
    padding: 0 !important;
}

.ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

form #order_review,
.woocommerce-page.woocommerce-checkout form #order_review_heading {
    width: 100% !important;
    float: none !important;
    /* margin-right: 0; */
    /* clear: right; */
}

/** =============================================================================
   Styles généraux pour les filtres
    Ces styles sont appliqués à tous les types de filtres (catégories, attributs, nouveautés, etc.)
   ============================================================================= */
.ast-collapse-filter .ast-filter-wrap {
    max-height: 64vh !important;
}


/** Crazy Food Product List Styles **/
body.snf-crazyfood-style ul.products li.product .ast-woo-product-category {
    display: block;
    margin: 0 0 12px;
    color: #00a8d8;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.snf-crazyfood-style ul.products li.product .woocommerce-loop-product__title {
    display: block;
    margin: 0 0 14px;
    color: #1f2a44;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
    text-transform: uppercase;
}

body.snf-crazyfood-style ul.products li.product .snf-product-category {
    display: none !important;
}


/* =====================================================
   SHOPNFOOD — Filtres actifs WooCommerce Blocks
   Chips compactes avec croix à droite
   ===================================================== */

.woocommerce .wc-block-product-filter-removable-chips__items,
.wc-block-product-filter-removable-chips__items {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce .wc-block-product-filter-removable-chips__item,
.wc-block-product-filter-removable-chips__item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row !important;
    gap: 8px !important;

    width: auto !important;
    max-width: 100% !important;

    padding: 7px 7px 7px 12px !important;
    border: 0 !important;
    border-radius: 999px !important;

    background-color: #f7f7f7 !important;
    color: #0072bc !important;

    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;

    box-shadow: none !important;
    cursor: pointer !important;
}

.woocommerce .wc-block-product-filter-removable-chips__item:hover,
.wc-block-product-filter-removable-chips__item:hover {
    background-color: #ebebeb !important;
}

.woocommerce .wc-block-product-filter-removable-chips__item span,
.wc-block-product-filter-removable-chips__item span {
    color: #0072bc !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 200px !important;
}

/* Croix — icône SVG à droite */
.woocommerce .wc-block-product-filter-removable-chips__item svg,
.wc-block-product-filter-removable-chips__item svg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    padding: 4px !important;

    border-radius: 50% !important;
    background-color: #0ba3d9 !important;
    color: #ffffff !important;
    fill: #ffffff !important;

    flex: 0 0 auto !important;
    order: 2 !important;
}

/* =====================================================
   RESPONSIVE — Mobile
   ===================================================== */

@media (max-width: 768px) {

    .woocommerce .wc-block-product-filter-removable-chips__items,
    .wc-block-product-filter-removable-chips__items {
        gap: 8px !important;
    }

    .woocommerce .wc-block-product-filter-removable-chips__item,
    .wc-block-product-filter-removable-chips__item {
        max-width: 100% !important;
        padding: 6px 6px 6px 10px !important;
        font-size: 13px !important;
    }

    .woocommerce .wc-block-product-filter-removable-chips__item span,
    .wc-block-product-filter-removable-chips__item span {
        font-size: 13px !important;
        max-width: 160px !important;
    }

    .woocommerce .wc-block-product-filter-removable-chips__item svg,
    .wc-block-product-filter-removable-chips__item svg {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        padding: 3px !important;
    }
}

/* =====================================================
    Last Chance — Badges, prix et remise
    ===================================================== */

/* Badge "Expire le..." sur les cards boutique */
.snf-lc-expire-badge {
    font-size: 0.72rem;
    color: #e0004d;
    font-weight: 600;
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

/* Badge "-X%" sur les cards boutique (remplace le "Promo !" WooCommerce) */
.onsale.snf-lc-sale-badge {
    background: linear-gradient(135deg, #FF4FA0 0%, #e0004d 100%);
    border-radius: 4px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    min-width: auto;
    min-height: auto;
    padding: 4px 10px;
    line-height: 1.3;
}

/* Prix barré dans les cards boutique en mode Last Chance promo */
.woocommerce ul.products li.product .price del,
.woocommerce-page ul.products li.product .price del {
    opacity: 0.6;
}

/* Prix soldé Last Chance mis en avant */
.woocommerce ul.products li.product .price ins,
.woocommerce-page ul.products li.product .price ins {
    font-weight: 700;
    color: #e0004d;
    text-decoration: none;
}

/* body.woocommerce-cart  */
.snf-item-qty .quantity {
    border: 0 !important;
}

.snf-item-qty .quantity>a.minus,
.snf-item-qty .quantity>a.plus {
    display: none !important;
}

.shopnfood-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shopnfood-info-badges {
    display: inline-flex;
    align-items: center;
}

.badge-product-info {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    font-family: var(--snf-font) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: var(--snf-radius-xs) !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    color: #212529 !important;
    background: linear-gradient(135deg, var(--snf-primary) 0%, #008bee 100%) !important;

    &.new {
        background: linear-gradient(135deg, var(--snf-primary) 0%, #008bee 100%) !important;
        color: #ffffff !important;
    }

    &.out {
        background: #acacac !important;
    }

    &.soon {
        background: #ffc107 !important;
    }
}

@media (max-width: 380px) {
    .shopnfood-info-title {
        align-items: flex-start;
    }

    .badge-product-info {
        padding: 4px 9px !important;
        font-size: 0.42rem !important;
    }
}

.woocommerce .widget_layered_nav_filters,
.woocommerce-page .widget_layered_nav_filters {
    display: none !important;
}

#primary {
    margin: 2em 0;
}
