/**
 * Cart drawer styles — loaded globally so the drawer is available on every page.
 * These are the .sp-cart-* component styles; full shop/product page styles remain in shop.css.
 */

.sp-cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(16, 24, 39, 0.48);
    backdrop-filter: blur(5px);
}

.sp-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    width: min(440px, 94vw);
    height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 214, 0, 0.14), transparent 22%),
        #fff;
    color: #101827;
    box-shadow: -28px 0 70px rgba(16, 24, 39, 0.24);
    transform: translateX(105%);
    transition: transform 0.28s ease;
}

.sp-cart-drawer.is-open {
    transform: translateX(0);
}

.sp-cart-open {
    overflow: hidden;
}

.sp-cart-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    border-bottom: 1px solid #e7e9ee;
}

.sp-cart-drawer__eyebrow {
    width: max-content;
    margin: 0 0 8px;
    padding: 7px 12px;
    background: #ffd600;
    color: #101827;
    box-shadow: 5px 5px 0 rgba(207, 38, 53, 0.9);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: skew(-8deg);
}

.sp-cart-drawer__header h2 {
    margin: 0;
    color: #101827;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -0.055em;
    line-height: 1;
    text-transform: uppercase;
}

.sp-cart-drawer__close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #101827;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.sp-cart-drawer__items {
    flex: 1;
    overflow-y: auto;
    padding: 22px 28px;
}

.sp-cart-drawer__empty {
    margin: 0;
    padding: 26px;
    border-radius: 18px;
    background: #f6f7f9;
    color: #7d8593;
    font-weight: 800;
    text-align: center;
}

.sp-cart-line {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #edf0f4;
}

.sp-cart-line__image {
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 16px;
    background: #f1f2f4;
}

.sp-cart-line__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-cart-line__body h3 {
    margin: 0 0 6px;
    color: #101827;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.12;
}

.sp-cart-line__variant,
.sp-cart-line__meta {
    margin: 0;
    color: #7d8593;
    font-size: 12px;
    font-weight: 800;
}

.sp-cart-line__meta {
    margin-top: 8px;
    color: #cf2635;
}

.sp-cart-line__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.sp-cart-line__qty {
    display: inline-grid;
    grid-template-columns: 30px 32px 30px;
    align-items: center;
    height: 32px;
    border-radius: 999px;
    background: #f6f7f9;
    box-shadow: inset 0 0 0 1px #e7e9ee;
}

.sp-cart-line__qty-btn {
    width: 30px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #101827;
    font-size: 16px;
    font-weight: 950;
    cursor: pointer;
}

.sp-cart-line__qty span {
    color: #101827;
    font-size: 12px;
    font-weight: 950;
    text-align: center;
}

.sp-cart-line__remove {
    border: 0;
    background: transparent;
    color: #cf2635;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    cursor: pointer;
}

.sp-cart-line__qty-btn:disabled,
.sp-cart-line__remove:disabled {
    cursor: wait;
    opacity: 0.5;
}

.sp-cart-drawer__footer {
    padding: 24px 28px 28px;
    border-top: 1px solid #e7e9ee;
    background: rgba(246, 247, 249, 0.72);
}

.sp-cart-drawer__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: #101827;
    font-weight: 950;
}

.sp-cart-drawer__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border-radius: 999px;
    background: #cf2635;
    color: #fff;
    box-shadow: 0 16px 28px rgba(207, 38, 53, 0.22);
    font-weight: 950;
    text-decoration: none;
    text-transform: uppercase;
}

.sp-cart-drawer__checkout:hover {
    background: #b91524;
    color: #fff;
}

.sp-cart-drawer__checkout.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.sp-cart-drawer__note {
    margin: 12px 0 0;
    color: #7d8593;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}
