/* ============================================================
   THE WHITE DIGITAL — Cart & Drawer System Styles
   ============================================================ */

.cart-badge {
    background: var(--accent, #fbb03b);
    color: var(--black, #0a0a0a);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--white, #ffffff);
    margin-left: 4px;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.cart-badge.pulse {
    transform: scale(1.3);
}

/* Cart Drawer Overlay */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

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

/* Slide-out Cart Drawer Container */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--white, #ffffff);
    z-index: 2001;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

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

.cart-drawer.open {
    right: 0;
}

/* Drawer Header */
.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-100, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--black, #0a0a0a);
    color: var(--white, #ffffff);
}

.cart-drawer-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white, #ffffff);
}

.cart-drawer-close {
    background: none;
    border: none;
    color: var(--white, #ffffff);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.cart-drawer-close:hover {
    color: var(--accent, #fbb03b);
}

/* Drawer Body */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cart Empty State */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--gray-500, #888888);
    padding: 40px 20px;
}

.cart-empty-state i {
    font-size: 3rem;
    color: var(--gray-200, #dddddd);
    margin-bottom: 16px;
}

.cart-empty-state h4 {
    margin: 0 0 8px;
    color: var(--black, #0a0a0a);
    font-size: 1.1rem;
    font-weight: 700;
}

.cart-empty-state p {
    font-size: 0.9rem;
    margin: 0 0 20px;
}

/* Cart Item Row */
.cart-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100, #f5f5f5);
    align-items: start;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm, 4px);
    object-fit: cover;
    background: var(--black, #0a0a0a);
    border: 1px solid var(--gray-100, #f5f5f5);
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--black, #0a0a0a);
    margin: 0 0 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--black, #0a0a0a);
    margin-bottom: 8px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Quantity Selector */
.cart-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200, #dddddd);
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
    background: var(--gray-100, #f5f5f5);
}

.cart-qty-btn {
    background: none;
    border: none;
    padding: 3px 9px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: bold;
    color: var(--black, #0a0a0a);
    transition: background 0.2s;
}

.cart-qty-btn:hover {
    background: var(--gray-200, #dddddd);
}

.cart-qty-val {
    width: 26px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    border-left: 1px solid var(--gray-200, #dddddd);
    border-right: 1px solid var(--gray-200, #dddddd);
    background: var(--white, #ffffff);
    color: var(--black, #0a0a0a);
    padding: 2px 0;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--gray-400, #bbbbbb);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: #e53935;
}

/* Drawer Footer */
.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-100, #f5f5f5);
    background: var(--gray-500, #fafafa);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-summary-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.cart-summary-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--black, #0a0a0a);
}

.cart-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
