/* Storefront cart drawer. Its center scrolls independently of the header and checkout. */
.gl3-cart-drawer {
    --drawer-gutter: clamp(16px, 4.8vw, 25px);
    --drawer-paper: #f7f3ee;
    --drawer-edge: #e5dbd1;
    --drawer-ink: #2f251e;
    width: min(480px, 100%);
    border-radius: 0;
    background: var(--drawer-paper);
    color: #171717;
    box-shadow: -12px 0 44px #291b1226;
    font-variant-numeric: tabular-nums;
}

.gl3-cart-drawer::backdrop { background: #22180e64; }
.gl3-cart-drawer .gl3-cart-top { flex: none; border-bottom: 1px solid var(--drawer-edge); }
.gl3-cart-drawer .gl3-cart-heading { padding: 10px var(--drawer-gutter); border: 0; min-height: 65px; }
.gl3-cart-drawer .gl3-cart-heading h2 { font: 600 clamp(1.375rem, 5.25vw, 1.65rem)/1.2 var(--sans); color: var(--drawer-ink); }
.gl3-cart-drawer .gl3-cart-heading > button,
.gl3-cart-drawer .gl3-cart-remove,
.gl3-cart-drawer .gl3-drawer-upsell-nav button {
    display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 6px; background: transparent; color: var(--drawer-ink); cursor: pointer;
}
.gl3-cart-drawer :is(.gl3-cart-remove, .gl3-drawer-upsell-nav button, .gl3-cart-heading > button):hover { background: #eadecf; }
.gl3-cart-drawer .gl3-cart-remove .gl-icon { width: 17px; height: 17px; }

.gl3-cart-drawer .gl3-free-shipping { margin: 0; padding: 4px var(--drawer-gutter) 14px; border: 0; background: transparent; }
.gl3-cart-drawer .gl3-free-shipping .gl3-progress { height: 5px; background: #ded1c3; box-shadow: none; }
.gl3-cart-drawer .gl3-free-shipping .gl3-progress > span { background: #73563f; }
.gl3-cart-drawer .gl3-free-shipping p { margin: 9px 0 0; color: var(--drawer-ink); font-size: .875rem; line-height: 1.4; text-align: center; }

.gl3-cart-drawer .gl3-cart-scroll { padding: 0 0 16px; }
.gl3-cart-drawer .gl3-cart-products { padding-inline: var(--drawer-gutter); background: #fff; }
.gl3-cart-drawer .gl3-cart-notice { margin: 8px var(--drawer-gutter); }
.gl3-cart-drawer .gl3-cart-empty { padding-inline: var(--drawer-gutter); }
.gl3-cart-drawer[data-gl3-cart-stale] :is(.gl3-free-shipping, .gl3-cart-scroll, .gl3-cart-total),
.gl3-cart-drawer .gl3-cart-loading [hidden] { display: none; }
.gl3-cart-drawer .gl3-cart-loading {
    position: absolute;
    inset: 65px 0 auto;
    padding: 22px var(--drawer-gutter);
    font-size: 1rem;
    line-height: 1.5;
}
.gl3-cart-drawer .gl3-cart-loading p { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.gl3-cart-drawer[data-gl3-cart-waiting] .gl3-cart-loading p::before {
    content: ''; flex: 0 0 16px; width: 16px; height: 16px; border: 2px solid #cdbda9;
    border-top-color: var(--drawer-ink); border-radius: 50%; animation: gl3-drawer-spinner .7s linear infinite;
}
@keyframes gl3-drawer-spinner { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .gl3-cart-drawer[data-gl3-cart-waiting] .gl3-cart-loading p::before { animation: none; }
}
.gl3-cart-drawer .gl3-cart-product {
    display: grid; grid-template-columns: clamp(66px, 22vw, 106px) minmax(0, 1fr); align-items: center;
    gap: clamp(9px, 3.3vw, 16px); padding: 16px 0; border-color: var(--drawer-edge);
}
.gl3-cart-drawer .gl3-cart-product:last-child { border-bottom: 0; }
.gl3-cart-drawer .gl3-cart-product > a { width: 100%; height: auto; background: #faf8f5; border-radius: 5px; }
.gl3-cart-drawer .gl3-cart-product > a img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: inherit; }
.gl3-cart-drawer .gl3-cart-product-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.gl3-cart-drawer .gl3-cart-product-name { font-size: 1rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.gl3-cart-drawer .gl3-cart-product-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.gl3-cart-drawer .gl3-cart-product :is(.variation, div > small) { font-size: .8125rem; line-height: 1.4; }
.gl3-cart-drawer .gl3-cart-line-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-block-start: 5px; }
.gl3-cart-drawer .gl3-cart-quantity { display: flex; align-items: center; flex: none; border: 0; height: auto; min-height: 44px; }
.gl3-cart-drawer .gl3-cart-quantity button { width: 40px; height: 44px; border: 1px solid var(--drawer-edge); border-radius: 4px; background: #fff; }
.gl3-cart-drawer .gl3-cart-quantity button:hover { background: var(--drawer-paper); }
.gl3-cart-drawer .gl3-cart-quantity > span { min-width: 25px; font-size: .9375rem; font-weight: 600; }
.gl3-cart-drawer .gl3-cart-price { display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: 1rem; text-align: end; }
.gl3-cart-drawer .gl3-cart-price del { color: #8b3a32 !important; font-size: .8125rem; }

.gl3-cart-drawer .gl3-cart-upsells { margin-top: 0; padding: 12px 0 4px; }
.gl3-cart-drawer .gl3-drawer-upsell-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-inline: var(--drawer-gutter); margin-bottom: 4px; }
.gl3-cart-drawer .gl3-drawer-upsell-heading h3 { margin: 0; padding-block: 8px; font: 600 .9375rem/1.35 var(--sans); }
.gl3-cart-drawer .gl3-drawer-upsell-nav { display: flex; flex: none; }
.gl3-cart-drawer .gl3-drawer-upsell-nav .gl-icon { width: 17px; height: 17px; }
.gl3-cart-drawer [data-gl3-drawer-slide="1"] .gl-icon { transform: rotate(180deg); }
.gl3-cart-drawer .gl3-cart-upsells.gl-compact-upsells > .gl3-small-upsells {
    display: flex; overflow-x: auto; gap: 9px; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 3px var(--drawer-gutter) 7px; scroll-padding-inline: var(--drawer-gutter);
}
.gl3-cart-drawer .gl3-cart-upsells .gl3-small-upsell {
    flex: 0 0 82%; display: grid; grid-template-columns: clamp(51px, 16vw, 81px) minmax(0,1fr) 44px;
    gap: 8px; min-width: 0; min-height: 97px; padding: 9px; scroll-snap-align: start; background: #fff;
}
.gl3-cart-drawer .gl3-cart-upsells .gl3-small-upsell:only-child { flex-basis: 100%; }
.gl3-cart-drawer .gl3-cart-upsells .gl3-upsell-image { width: 100%; }
.gl3-cart-drawer .gl3-cart-upsells :is(.gl3-upsell-name, .gl3-upsell-price) { font-size: .875rem; line-height: 1.35; }
.gl3-cart-drawer .gl3-cart-upsells .gl3-add-small {
    width: 44px; height: 44px; border-radius: 6px !important; border: 1px solid #a99079 !important; background: #fff !important;
}
.gl3-cart-drawer .gl3-cart-upsells .gl3-add-small:hover { background: var(--drawer-paper) !important; }

.gl3-cart-drawer .gl3-cart-total { padding: 12px var(--drawer-gutter) calc(15px + env(safe-area-inset-bottom)); border-color: var(--drawer-edge); background: var(--drawer-paper); }
.gl3-cart-drawer .gl3-drawer-coupon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
.gl3-cart-drawer .gl3-drawer-coupon input {
    width: 100%; min-width: 0; min-height: 46px; padding: 8px 10px; border: 1px solid #c7b9ab;
    border-radius: 7px; background: #fff; color: #171717; font: inherit; font-size: 1rem;
}
.gl3-cart-drawer .gl3-drawer-coupon button {
    min-height: 46px; padding: 7px 11px; border: 1px solid transparent; border-radius: 7px; background: #eee4d8;
    color: var(--drawer-ink); font: inherit; font-size: .875rem; cursor: pointer;
}
.gl3-cart-drawer .gl3-drawer-coupon button:hover { border-color: #ac9680; }
.gl3-cart-drawer .gl3-drawer-coupon-status { margin: 5px 0 9px; font-size: .8125rem; }
.gl3-cart-drawer .gl3-drawer-coupons { display: flex; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; overflow-x: auto; }
.gl3-cart-drawer .gl3-drawer-coupons button {
    display: inline-flex; align-items: center; gap: 6px; min-height: 33px; padding: 4px 8px; border: 1px solid var(--drawer-edge);
    border-radius: 5px; background: #fff; color: var(--drawer-ink); font: inherit; font-size: .8125rem; cursor: pointer; white-space: nowrap;
}
.gl3-cart-drawer .gl3-drawer-coupons .gl-icon { width: 14px; height: 14px; }
.gl3-cart-drawer .gl3-cart-total > .gl3-cart-grand-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; }
.gl3-cart-drawer .gl3-cart-total > .gl3-cart-grand-total strong { font-size: .9375rem; font-weight: 600; }
.gl3-cart-drawer .gl3-cart-grand-total-amount { font-size: clamp(1.125rem, 5vw, 1.35rem); font-weight: 700; }
.gl3-cart-drawer .gl3-cart-total > a.button {
    min-height: 51px; margin-top: 10px; border-radius: 7px !important; background: var(--drawer-ink); border-color: var(--drawer-ink);
    font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none;
}
.gl3-cart-drawer .gl3-cart-total > a.button:hover { background: #513d2d; text-decoration: none; }
.gl3-cart-checkout[aria-busy="true"] { cursor: progress; }
