/* =========================================================
   CART DRAWER & BTNS
   ========================================================= */

.cart-toggle-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 50;
}

.cart-toggle-btn:hover {
    background: var(--bg-hover);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #FF3B30;
    color: #FFF;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(25%, -25%);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #FFF;
    z-index: 9999;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.cart-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-hover);
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--black);
    line-height: 1.3;
}

.cart-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cart-item-price {
    font-weight: 800;
    color: #000;
    margin-top: auto;
}

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

.cart-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.cart-qty-control button {
    background: var(--bg-hover);
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    color: var(--black);
}

.cart-qty-control input {
    width: 32px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
}

.cart-remove-btn {
    background: transparent;
    border: none;
    color: var(--error);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.cart-remove-btn:hover {
    background: #ff000015;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 800;
}

.cart-total-row strong {
    color: #000;
    font-size: 20px;
}