/* Cart Design System */
:root {
    --cart-bg: rgba(18, 18, 20, 0.98);
    --cart-accent: #d6b36a;
    --cart-text: #f3f3f3;
}

/* Floating Cart Button */
.cart-floating-btn {
    position: fixed;
    right: 20px;
    bottom: 90px;
    /* Above WhatsApp float */
    z-index: 99;
    background: var(--cart-accent);
    color: #14110a;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.cart-floating-btn:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 12px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border: 2px solid #0b0b0c;
}

/* Sidebar Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: min(400px, 100vw);
    height: 100vh;
    background: var(--cart-bg);
    backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
}

.cart-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--cart-accent);
}

.close-cart {
    background: transparent;
    border: none;
    color: var(--cart-text);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
}

.close-cart:hover {
    opacity: 1;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 24px;
    padding-right: 8px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.item-info p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #b9b9b9;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 10px;
}

.item-controls button {
    background: transparent;
    border: none;
    color: var(--cart-text);
    cursor: pointer;
    font-weight: 800;
}

.cart-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--cart-text);
}

.checkout-btn {
    width: 100%;
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    padding: 16px;
    border-radius: 14px;
    border: none;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    background: #20bd5a;
}

.checkout-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

.compare-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--cart-text);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.compare-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--cart-accent);
}

/* Overlay focus */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
}

.cart-overlay.show {
    display: block;
}

@keyframes cartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.animate-pulse {
    animation: cartPulse 0.3s ease-out;
}

.price-tag {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand);
    margin: 18px 0 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-tag::before {
    content: "PRECIO:";
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 2px;
    font-weight: 700;
}