/* ══════════════════════════════════════════
   AW Cart Drawer
   ══════════════════════════════════════════ */

/* ── Overlay ── */
.aw-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 10, .52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
    z-index: 99998;
    cursor: pointer;
}

.aw-cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ── Drawer Panel ── */
.aw-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(440px, 94vw);
    background: #fff;
    border-left: 1px solid rgba(0, 0, 0, .07);
    box-shadow: -8px 0 40px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Instrument Sans', sans-serif;
}

.aw-cart-drawer.is-open {
    transform: translateX(0);
}

html.aw-cart-lock,
html.aw-cart-lock body {
    overflow: hidden !important;
}

/* ── Header ── */
.aw-cart-drawer__head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #EFEFED;
}

.aw-cart-drawer__head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0D0D0D;
}

.aw-cart-drawer__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #777;
}

.aw-cart-drawer__count {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0D0D0D;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aw-cart-drawer__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    transition: transform .15s;
    padding: 0;
}

.aw-cart-drawer__close:hover {
    transform: scale(1.08);
}

/* ── Shipping Bar ── */
.aw-cart-shipping {
    padding: 12px 20px;
    border-bottom: 1px solid #EFEFED;
    transition: background .25s ease;
}

.aw-cart-shipping.is-free {
    background: #F0FDF4;
}

.aw-cart-shipping__text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.aw-cart-shipping.is-free .aw-cart-shipping__text {
    color: #166534;
}

.aw-cart-shipping__text strong {
    color: #0D0D0D;
}

.aw-cart-shipping.is-free .aw-cart-shipping__text strong {
    color: #166534;
}

.aw-cart-shipping__bar {
    height: 3px;
    background: #EFEFED;
    border-radius: 2px;
    overflow: hidden;
}

.aw-cart-shipping__fill {
    height: 100%;
    background: #0D0D0D;
    border-radius: 2px;
    transition: width .4s cubic-bezier(.16, 1, .3, 1);
    width: 0%;
}

.aw-cart-shipping.is-free .aw-cart-shipping__fill {
    background: #166534;
}

/* ── Body ── */
.aw-cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.aw-cart-drawer__body::-webkit-scrollbar {
    display: none;
}

/* ── Cart Item ── */
.aw-cart-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #EFEFED;
    position: relative;
    transition: opacity .25s ease, transform .25s ease;
}

.aw-cart-item.is-removing {
    opacity: 0;
    transform: translateX(60px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transition: opacity .2s ease, transform .2s ease, max-height .3s ease .1s, padding .3s ease .1s;
}

.aw-cart-item__img {
    width: 72px;
    height: 72px;
    background: #F5F5F3;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.aw-cart-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aw-cart-item__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.aw-cart-item__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.aw-cart-item__name {
    font-size: 13px;
    font-weight: 600;
    color: #0D0D0D;
    text-transform: uppercase;
    letter-spacing: .02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-decoration: none;
}

.aw-cart-item__name:hover {
    opacity: .7;
}

.aw-cart-item__remove {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #BBB;
    flex-shrink: 0;
    transition: color .15s;
    display: flex;
    align-items: center;
}

.aw-cart-item__remove:hover {
    color: #C0392B;
}

.aw-cart-item__variant {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: .03em;
}

.aw-cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
}

/* ── Qty Stepper ── */
.aw-cart-qty {
    display: flex;
    align-items: center;
    gap: 0;
}

.aw-cart-qty__btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid #E0E0DE;
    cursor: pointer;
    color: #555;
    transition: all .15s;
    padding: 0;
}

.aw-cart-qty__btn:hover {
    border-color: #0D0D0D;
    color: #0D0D0D;
}

.aw-cart-qty__btn--trash {
    color: #C0392B;
    border-color: #f0d0d0;
}

.aw-cart-qty__btn--trash:hover {
    background: #fef2f2;
    border-color: #C0392B;
}

.aw-cart-qty__val {
    width: 34px;
    text-align: center;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0D0D0D;
    border-top: 1.5px solid #E0E0DE;
    border-bottom: 1.5px solid #E0E0DE;
    border-left: none;
    border-right: none;
    height: 30px;
    line-height: 30px;
}

.aw-cart-item__prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.aw-cart-item__old-price {
    font-size: 10px;
    color: #BBB;
    text-decoration: line-through;
    font-weight: 500;
}

.aw-cart-item__price {
    font-size: 14px;
    font-weight: 700;
    color: #0D0D0D;
}

.aw-cart-item__price.is-sale {
    color: #C0392B;
}

/* ── Empty State ── */
.aw-cart-empty {
    padding: 60px 20px;
    text-align: center;
}

.aw-cart-empty__icon {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: .2;
}

.aw-cart-empty__title {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    margin: 0 0 4px;
}

.aw-cart-empty__desc {
    font-size: 12px;
    color: #BBB;
    margin: 0;
}

/* ── Upsell Section ── */
.aw-cart-upsell {
    border-top: 1px solid #EFEFED;
}

.aw-cart-upsell__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Instrument Sans', sans-serif;
}

.aw-cart-upsell__toggle-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aw-cart-upsell__toggle-left span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #0D0D0D;
}

.aw-cart-upsell__chev {
    color: #BBB;
    transition: transform .2s ease;
}

.aw-cart-upsell.is-open .aw-cart-upsell__chev {
    transform: rotate(180deg);
}

.aw-cart-upsell__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.16, 1, .3, 1);
}

.aw-cart-upsell.is-open .aw-cart-upsell__body {
    max-height: 300px;
}

.aw-cart-upsell__track {
    display: flex;
    gap: 12px;
    padding: 0 20px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.aw-cart-upsell__track::-webkit-scrollbar {
    display: none;
}

/* ── Upsell Card ── */
.aw-cart-upsell-card {
    flex: 0 0 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-snap-align: start;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.aw-cart-upsell-card__badge {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 2;
    padding: 2px 6px;
    background: #0D0D0D;
    color: #fff;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 999px;
}

.aw-cart-upsell-card__img {
    width: 100%;
    aspect-ratio: 1/1;
    background: #F5F5F3;
    overflow: hidden;
}

.aw-cart-upsell-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.aw-cart-upsell-card:hover .aw-cart-upsell-card__img img {
    transform: scale(1.05);
}

.aw-cart-upsell-card__name {
    font-size: 10px;
    font-weight: 600;
    color: #0D0D0D;
    text-transform: uppercase;
    letter-spacing: .02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aw-cart-upsell-card__prices {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.aw-cart-upsell-card__old {
    font-size: 9px;
    color: #BBB;
    text-decoration: line-through;
}

.aw-cart-upsell-card__price {
    font-size: 11px;
    font-weight: 700;
    color: #0D0D0D;
}

.aw-cart-upsell-card__price.is-sale {
    color: #C0392B;
}

.aw-cart-upsell-card__add {
    width: 100%;
    height: 28px;
    background: #0D0D0D;
    color: #fff;
    border: none;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.aw-cart-upsell-card__add:hover {
    background: #2a2a2a;
}

.aw-cart-upsell-card__add.is-added {
    background: #166534;
    pointer-events: none;
}

/* Upsell variation selectors */
.aw-upsell-vars {
    display: flex;
    flex-direction: column;
.aw-upsell-vars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

.aw-upsell-select {
    width: 100%;
    height: 26px;
    border: 1px solid #E0E0DE;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 9px;
    font-weight: 600;
    color: #555;
    padding: 0 18px 0 6px;
    background: #fff;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .03em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23999' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    transition: border-color 0.15s;
}

.aw-upsell-select:focus {
    outline: none;
    border-color: #0D0D0D;
}

/* ── Footer ── */
.aw-cart-drawer__foot {
    flex-shrink: 0;
    border-top: 1px solid #EFEFED;
}

.aw-cart-savings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    background: #F0FDF4;
    font-size: 11px;
    font-weight: 600;
    color: #166534;
}

.aw-cart-subtotal {
    padding: 14px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.aw-cart-subtotal__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #BBB;
}

.aw-cart-subtotal__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.aw-cart-subtotal__value {
    font-size: 22px;
    font-weight: 700;
    color: #0D0D0D;
    letter-spacing: -.02em;
}

.aw-cart-subtotal__installments {
    font-size: 11px;
    font-weight: 500;
    color: #999;
}

/* ── CTAs ── */
.aw-cart-ctas {
    padding: 0 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aw-cart-cta {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .15s;
}

.aw-cart-cta--primary {
    background: #0D0D0D !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.aw-cart-cta--primary:hover {
    background: #2a2a2a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.aw-cart-cta--primary:visited,
.aw-cart-cta--primary:focus,
.aw-cart-cta--primary:active {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.aw-cart-cta--primary span,
.aw-cart-cta--primary svg {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    stroke: #fff !important;
}

/* Upsell add buttons */
.aw-cart-upsell-card__add {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.aw-cart-upsell-card__add:visited,
.aw-cart-upsell-card__add:hover,
.aw-cart-upsell-card__add:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.aw-cart-upsell-card__add.is-added {
    background: #166534 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.aw-cart-cta--ghost {
    height: 40px;
    background: transparent;
    border: 1.5px solid #E0E0DE;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
}

.aw-cart-cta--ghost:hover {
    border-color: #0D0D0D;
    color: #0D0D0D;
}

/* ── Trust ── */
.aw-cart-trust {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 14px 20px;
    border-top: 1px solid #EFEFED;
    background: #FAFAF9;
}

.aw-cart-trust__item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
}

.aw-cart-trust__item span {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Loading Spinner ── */
.aw-cart-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.aw-cart-spinner__dot {
    width: 20px;
    height: 20px;
    border: 2px solid #EFEFED;
    border-top-color: #0D0D0D;
    border-radius: 50%;
    animation: aw-cart-spin .7s linear infinite;
}

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

/* ══════════════════════════════════════════
   Mobile
   ══════════════════════════════════════════ */
@media (max-width: 520px) {
    .aw-cart-drawer {
        width: 100vw;
    }

    .aw-cart-trust {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .aw-cart-trust__item span {
        font-size: 8px;
    }

    .aw-cart-upsell-card {
        flex: 0 0 130px;
    }
}
