/* ============================================================
   Apis Montis – Side Cart v2
   ============================================================ */

/* ── Overlay ────────────────────────────────────────────────── */

.am-side-cart {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    font-family: inherit;
}

.am-side-cart.is-open {
    pointer-events: all;
}

.am-side-cart__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.35s ease;
    cursor: pointer;
}

.am-side-cart.is-open .am-side-cart__backdrop {
    opacity: 1;
}

/* ── Panneau ────────────────────────────────────────────────── */

.am-side-cart__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(480px, 92vw);
    background: #FFF;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
    will-change: transform;
    padding: 1.8rem;
}

.am-side-cart.is-open .am-side-cart__panel {
    transform: translateX(0);
}

/* ── En-tête ────────────────────────────────────────────────── */

.am-side-cart__header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.am-side-cart__title {
    margin: 0;
    font-family: "Julius Sans One", var(--font-heading, serif);
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
}

.am-side-cart__close {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: opacity 0.2s;
    line-height: 1;
}

.am-side-cart__close:hover {
    opacity: 0.55;
}

/* ── Barre livraison offerte ────────────────────────────────── */

.am-side-cart__bar-wrap {
    flex-shrink: 0;
    padding: 0.7rem 1.5rem 0.9rem;
    background: var(--beige-distinc, #f5efe6);
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
}

.am-side-cart__bar-wrap .am-free-shipping {
    width: 100%;
    max-width: 100%;
}

/* ── Zone scrollable ────────────────────────────────────────── */

/* Conteneur global : ne scrolle pas, distribue l'espace */
.am-side-cart__body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Wrapper AJAX : prend toute la hauteur disponible */
.am-sc-body-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* ── Articles ───────────────────────────────────────────────── */

/* Seule zone qui scrolle */
#am-sc-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

#am-sc-items .am-sc-item:nth-last-child(1) {
    border-bottom: none;
}

#am-sc-items::-webkit-scrollbar {
    width: 4px;
}

#am-sc-items::-webkit-scrollbar-track {
    background: transparent;
}

#am-sc-items::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

#am-sc-items {
    margin-bottom: 0;
}

.am-sc-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    column-gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    align-items: start;
}

/* Colonne gauche : poubelle + image */
.am-sc-item__left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.am-sc-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #777;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    line-height: 1;
}

.am-sc-remove:hover {
    color: #000;
}

.am-sc-item__thumb {
    display: block;
    flex-shrink: 0;
}

.am-sc-item__thumb img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    display: block;
}

/* Colonne droite */
.am-sc-item__right {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.am-sc-item__name {
    margin: 0;
    font-family: "Julius Sans One", var(--font-heading, serif);
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
}

.am-sc-item__name a {
    color: inherit;
    text-decoration: none;
}

.am-sc-item__name a:hover {
    text-decoration: underline;
}

.am-sc-item__variation {
    margin: 0;
    font-size: 1.3rem;
    color: #555;
}

/* Ligne basse : prix | qty | total */
.am-sc-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.4rem;
    flex-wrap: nowrap;
}

.am-sc-item__price {
    font-size: 1.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.am-sc-item__price .woocommerce-Price-amount {
    font-size: inherit !important;
}

/* Sélecteur quantité */
.am-sc-qty {
    display: flex;
    align-items: center;
    border: 1px solid #9e9e9e;
    background: #fff;
    flex-shrink: 0;
    border-radius: var(--border-radius-global, 2px);
}

.am-sc-qty__btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 26px;
    height: 26px;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: inherit;
    flex-shrink: 0;
    transition: background 0.15s;
}

.am-sc-qty__btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.am-sc-qty__input {
    width: 34px;
    height: 26px;
    border: none;
    /* border-left: 1px solid #9e9e9e;
    border-right: 1px solid #9e9e9e; */
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    font-family: "Roboto", sans-serif;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
    background: #fff;
}

.am-sc-qty__input::-webkit-outer-spin-button,
.am-sc-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.am-sc-item__total {
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
}

.am-sc-item__total .woocommerce-Price-amount {
    font-size: inherit !important;
}

/* État chargement */
#am-sc-items.is-loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.15s;
}

/* ── Panier vide ────────────────────────────────────────────── */

.am-sc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 4rem 1rem;
    text-align: center;
    color: #555;
    flex: 1;
}

.am-sc-empty svg {
    opacity: 0.5;
}

.am-sc-empty p {
    margin: 0;
    font-size: 1.4rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ── Pied de panier ─────────────────────────────────────────── */

.am-sc-footer {
    flex-shrink: 0;
    padding: 0.75rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.am-sc-coupon-link {
    display: block;
    font-size: 1.3rem;
    color: #898989;
    text-decoration: underline;
    margin: 0.25rem 0;
}

.am-sc-coupon-link:hover {
    color: #555;
}

/* Sous-total */
.am-sc-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.am-sc-subtotal__label,
.am-sc-subtotal__amount {
    font-size: 1.6rem;
    font-weight: 700;
}

.am-sc-subtotal__amount .woocommerce-Price-amount {
    font-size: inherit !important;
}

.am-sc-shipping-notice {
    margin: 0;
    font-size: 1.3rem;
    color: #555;
}

/* Boutons */
.am-sc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85em 1em;
    font-family: "Julius Sans One", var(--font-heading, serif);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--shop-border-color, #191919);
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
    box-sizing: border-box;
    text-align: center;
}

.am-sc-btn--checkout {
    background: var(--beige-btn, #dbcdb6);
    color: #000;
}

.am-sc-btn--checkout:hover {
    background: var(--beige-hover-btn, #c9b89d);
    color: #000;
}

.am-sc-btn--cart {
    background: #fff;
    color: #0f0f0f;
    border-color: #9e9e9e;
}

.am-sc-btn--cart:hover {
    background: var(--beige-btn, #dbcdb6);
    color: #000;
}

/* Paiement sécurisé */
.am-sc-payment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.am-sc-payment__label {
    margin: 0;
    font-size: 1.4rem;
    font-family: "Julius Sans One", var(--font-heading, serif);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.payment-icons-cont {
    display: flex;
    align-items: center;
    padding: 4px;
    overflow: hidden;
    justify-content: center;
}

/* ── Verrouillage du scroll body ────────────────────────────── */

/* body.am-cart-open { overflow: hidden; } */



/* css progress bar */

.am-free-shipping {
    display: grid;
    gap: .5rem;
    width: 100%;
    max-width: 640px;
}

.am-fs-bar {
    position: relative;
    height: 8px;
    background: #FFF;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--grey);
}

.am-fs-bar__fill {
    height: 100%;
    width: 0%;
    background: var(--beige-hover-btn);
    transition: all .2s ease-out;
}

.am-fs-text {
    text-transform: uppercase;
    font-family: "Julius Sans One";
    text-align: center;
    color: #000;
    font-size: 1.3rem;
    line-height: 2rem;
}

.am-fs-text__ok,
.am-fs-text__remaining .woocommerce-Price-amount bdi {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}