/* =========================================================
   07. POPUP PANIER ASTRA — GECKO 3D / VERSION LÉGÈRE
   Remplace intégralement l'ancienne section 07.
   CSS uniquement — en-tête ordinateur.
   Fond blanc, séparateurs fins, texte bleu nuit, action orange.
   ========================================================= */


#ast-desktop-header .ast-header-woo-cart,
#ast-desktop-header .ast-site-header-cart {
    position: relative !important;
    overflow: visible !important;
}

#ast-desktop-header .ast-primary-header-bar,
#ast-desktop-header .site-primary-header-wrap,
#ast-desktop-header .ast-builder-grid-row,
#ast-desktop-header .site-header-section {
    overflow: visible !important;
}

#ast-desktop-header
.ast-site-header-cart
> .ast-site-header-cart-data {
    position: absolute !important;
    z-index: 999999 !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    display: block !important;
    width: 420px !important;
    max-width: calc(100vw - 24px) !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

#ast-desktop-header
.ast-site-header-cart:hover
> .ast-site-header-cart-data,

#ast-desktop-header
.ast-site-header-cart:focus-within
> .ast-site-header-cart-data {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) !important;
    width: 420px !important;
}

#ast-desktop-header
.ast-site-header-cart
> .ast-site-header-cart-data::before {
    content: "";
    position: absolute;
    top: -14px;
    right: 0;
    left: 0;
    height: 14px;
    background: transparent !important;
    pointer-events: auto;
}

#ast-desktop-header
.ast-site-header-cart
.widget_shopping_cart {
    --gecko-orange: #FD9800;
    --gecko-dark: #171B2F;
    position: relative;
    isolation: isolate;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e7e8ee !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(23,27,47,.10) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #242840;
}

#ast-desktop-header
.ast-site-header-cart
.widget_shopping_cart::before {
    content: none !important;
    display: none !important;
}

#ast-desktop-header
.ast-site-header-cart
.widget_shopping_cart::after {
    content: none !important;
    display: none !important;
}

#ast-desktop-header
.ast-site-header-cart
.widget_shopping_cart_content {
    position: relative;
    z-index: 2;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
}

#ast-desktop-header
.ast-site-header-cart
.widget_shopping_cart,

#ast-desktop-header
.ast-site-header-cart
.widget_shopping_cart * {
    box-sizing: border-box;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart-item::before,

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__total::before,

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__total::after,

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__buttons::before,

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__buttons::after {
    content: none !important;
    display: none !important;
}

#ast-desktop-header
.ast-site-header-cart
ul.woocommerce-mini-cart {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    max-height: min(430px, max(100px, calc(100dvh - 280px))) !important;
    margin: 0 0 12px !important;
    padding: 0 6px 0 0 !important;
    list-style: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #c7cad4 transparent;
}

#ast-desktop-header
.ast-site-header-cart
ul.woocommerce-mini-cart::-webkit-scrollbar {
    width: 5px;
}

#ast-desktop-header
.ast-site-header-cart
ul.woocommerce-mini-cart::-webkit-scrollbar-track {
    background: transparent !important;
}

#ast-desktop-header
.ast-site-header-cart
ul.woocommerce-mini-cart::-webkit-scrollbar-thumb {
    background: #c7cad4 !important;
    border-radius: 999px;
}

#ast-desktop-header
.ast-site-header-cart
ul.woocommerce-mini-cart::-webkit-scrollbar-thumb:hover {
    background: #a1a6b5 !important;
}

#ast-desktop-header
.ast-site-header-cart
li.woocommerce-mini-cart-item {
    position: relative !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: auto 38px !important;
    align-items: center !important;
    gap: 8px 10px !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    float: none !important;
    clear: none !important;
    width: 100% !important;
    min-height: 124px !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 12px 2px !important;
    overflow: hidden !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    border-bottom: 1px solid #eeeff3 !important;
}

#ast-desktop-header
.ast-site-header-cart
li.woocommerce-mini-cart-item::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#ast-desktop-header
.ast-site-header-cart
li.woocommerce-mini-cart-item
> a:not(.remove) {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 30px 0 0 !important;
    color: var(--gecko-dark) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

#ast-desktop-header
.ast-site-header-cart
li.woocommerce-mini-cart-item
> a:not(.remove):hover {
    color: #935900 !important;
}

#ast-desktop-header
.ast-site-header-cart
li.woocommerce-mini-cart-item
> a:not(.remove)
> img {
    display: block !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    flex: 0 0 64px !important;
    align-self: center !important;
    float: none !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
    transform: none !important;
    background: #ffffff !important;
    border: 1px solid #eeeef3;
    border-radius: 8px;
    box-shadow: none !important;
}

#ast-desktop-header
.ast-site-header-cart
.ast-product-image {
    display: flex !important;
    align-items: center !important;
    position: static !important;
    flex: 1 1 auto !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

#ast-desktop-header
.ast-site-header-cart
.ast-product-name {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

#ast-desktop-header
.ast-site-header-cart
.remove_from_cart_button {
    position: absolute !important;
    z-index: 5;
    top: 11px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    float: none !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #646a7d !important;
    background: #f3f4f7 !important;
    border: 1px solid #e4e6ed !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

#ast-desktop-header
.ast-site-header-cart
.remove_from_cart_button:hover {
    color: #a12b2b !important;
    background: #fff0ef !important;
    transform: none;
}

#ast-desktop-header
.ast-site-header-cart
.remove_from_cart_button svg {
    width: 13px !important;
    height: 13px !important;
}

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added::before,

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added {
    position: relative;
    z-index: 2;
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f5f6f9 !important;
    border: 1px solid #dfe2ea !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added
.minus,

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added
.plus {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 29px !important;
    position: static !important;
    float: none !important;
    width: 29px !important;
    min-width: 29px !important;
    max-width: 29px !important;
    height: 29px !important;
    min-height: 29px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--gecko-dark) !important;
    text-align: center !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added
.minus:hover,

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added
.plus:hover {
    color: #885000 !important;
    background: #fff0d6 !important;
}

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added
.qty {
    display: block !important;
    flex: 0 0 32px !important;
    position: static !important;
    float: none !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--gecko-dark) !important;
    text-align: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 29px !important;
    appearance: textfield;
    -moz-appearance: textfield;
}

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added
.qty::-webkit-inner-spin-button,

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added
.qty::-webkit-outer-spin-button {
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#ast-desktop-header
.ast-site-header-cart
.quantity.buttons_added:focus-within {
    border-color: #b56b00 !important;
    box-shadow: 0 0 0 2px rgba(181,107,0,.18) !important;
}

#ast-desktop-header
.ast-site-header-cart
.ast-mini-cart-price-wrap {
    position: relative;
    z-index: 2;
    grid-column: 3 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

#ast-desktop-header
.ast-site-header-cart
.ast-mini-cart-price-wrap
.amount {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--gecko-dark) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__total {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 11px !important;
    width: 100% !important;
    margin: 0 0 4px !important;
    padding: 14px 2px !important;
    color: #242840 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-top: 0 !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__total strong {
    margin: 0 !important;
    color: #686d7d !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__total
.amount {
    margin: 0 !important;
    color: #242840 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__buttons {
    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__buttons
.button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    clear: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    color: #242840 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: normal !important;
    background: transparent !important;
    border: 1px solid #dfe2e9 !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    transition: background .18s ease, border-color .18s ease;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__buttons
.button:hover {
    transform: none;
    box-shadow: none !important;
    background: #f5f6f9 !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__buttons
.checkout {
    color: #171b2f !important;
    background: #fdab28 !important;
    border-color: #fdab28 !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__buttons
.checkout:hover {
    color: #171b2f !important;
    box-shadow: none !important;
    background: #fd9800 !important;
    border-color: #fd9800 !important;
}

#ast-desktop-header
.ast-site-header-cart
.woocommerce-mini-cart__empty-message {
    width: 100% !important;
    margin: 0 !important;
    padding: 30px 18px !important;
    color: #686d7d !important;
    text-align: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 650 !important;
}



/* Focus clavier visible sur les liens et les commandes. */
#ast-desktop-header .ast-site-header-cart .widget_shopping_cart :is(a, button, input):focus-visible {
    outline: 2px solid #b56b00 !important;
    outline-offset: 2px !important;
}

#ast-desktop-header .ast-site-header-cart .woocommerce-mini-cart__buttons .button:focus-visible {
    outline-color: #b56b00 !important;
}

/* Les attributs de variation conservent une ligne dédiée. */
#ast-desktop-header .ast-site-header-cart li.woocommerce-mini-cart-item > dl.variation {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #62687a !important;
    font-size: 12px !important;
}

@media (prefers-reduced-motion: reduce) {
    #ast-desktop-header .ast-site-header-cart > .ast-site-header-cart-data,
    #ast-desktop-header .ast-site-header-cart .widget_shopping_cart * {
        transition: none !important;
        animation: none !important;
}
}

/* =========================================================
   CHARGEMENT AJAX — VOILE CLAIR ET INDICATEUR DISCRET
   ========================================================= */

#ast-desktop-header .ast-site-header-cart
.widget_shopping_cart .blockUI.blockOverlay {
    background: #fff !important;
    opacity: .72 !important;
    border-radius: 10px !important;
    cursor: progress !important;
}

#ast-desktop-header .ast-site-header-cart
.widget_shopping_cart .blockUI.blockOverlay::before {
    content: "" !important;
    position: absolute !important;
    display: block !important;
    top: 50% !important;
    left: 50% !important;
    width: 22px !important;
    height: 22px !important;
    margin: -11px 0 0 -11px !important;
    box-sizing: border-box !important;
    background: none !important;
    border: 2px solid #e6e8ee !important;
    border-top-color: #fd9800 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    animation: gecko-cart-spin .7s linear infinite !important;
}

#ast-desktop-header .ast-site-header-cart
.widget_shopping_cart .blockUI.blockOverlay::after {
    content: none !important;
}

@keyframes gecko-cart-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #ast-desktop-header .ast-site-header-cart
    .widget_shopping_cart .blockUI.blockOverlay::before {
        animation: none !important;
    }
}