/* ==========================================================================
   Storefront cart — header icon + slide-out drawer (site-wide)
   ========================================================================== */

/* Header cart icon */
.sb-header-cart {
    position: relative;
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
}
.sb-header-cart:hover { color: #ffb84d; }
.sb-cart-count {
    position: absolute;
    top: -2px; right: -4px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    background: #ed7d2b;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 17px;
    text-align: center;
}

/* Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
    z-index: 1090;
}
.cart-overlay.show { opacity: 1; visibility: visible; }

/* Drawer */
.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 30px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
    z-index: 1100;
    display: flex;
    flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid #eef0f3;
}
.cart-drawer-head h3 { 
    margin: 0;
    font-size: 26px;
    font-weight: 400;
    color: #1f2937;
}
.cart-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #131413;
}
.cart-close:hover { color: #1f2937; }

.cart-drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }

.cart-line {
    display: flex;
    gap: 14px;
    padding: 30px 0;
    border-bottom: 1px solid #eef0f3;
}
.cart-line-media {
    width: 64px; height: 64px;
    flex: 0 0 64px;
    border-radius: 8px;
    background: #f4f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.cart-line-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-line-emoji { font-size: 30px; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-top { display: flex; justify-content: space-between; gap: 10px; }
.cart-line-name {
    font-size: 18px;
    font-weight: 400;
    color: #131413;
}
.cart-line-remove {
    background: none;
    border: none;
    color: #231F20;
    cursor: pointer;
    background: #F0F0F0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 6px;
}
.cart-line-remove:hover { color: #dc2626; }
.cart-line-price {
    font-size: 20px;
    font-weight: 600;
    color: #5DA12C;
    margin-top: 6px;
}
.cart-line-variant { font-size: 12px; color: #6b7280; margin-top: 3px; }

.cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #D5D5D5;
    border-radius: 7px;
    margin-top: 16px;
    overflow: hidden;
}
.cart-qty-btn {
    width: 30px;
    height: 30px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #323232;
}
.cart-qty-btn:hover { background: #f3f4f6; }
.cart-qty-val {
    min-width: 30px; 
    text-align: center;
    font-size: 16px;
}

.cart-drawer-empty {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #6b7280;
    padding: 30px;
}
.cart-drawer-empty i { font-size: 44px; color: #d1d5db; }

.cart-drawer-foot { padding: 20px 22px; border-top: 1px solid #eef0f3; }
.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 25px;
}
.cart-subtotal-row span:first-child {
    color: #131413;
}
.cart-subtotal-val {
    font-weight: 600;
    color: #5DA12C;
    font-size: 24px;
}
.cart-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 10px;
    border: none;
    cursor: pointer;
}
.cart-btn:last-child { margin-bottom: 0; }
.cart-btn-orange { background: #ed7d2b; color: #fff; }
.cart-btn-orange:hover { background: #d96e1f; color: #fff; }
.cart-btn-green { background: #5da12c; color: #fff; }
.cart-btn-green:hover { background: #518f26; color: #fff; }

@media (max-width: 480px) {
    .cart-drawer { width: 100%; max-width: 100%; }
}
