/* ==========================================================================
   CART SYSTEM STYLES — M&F HERRAMIENTAS
   Aesthetic: Dark Tech Industrial matching M&F site identity
   Primary Color: Celeste vívido (#036fd3)
   Secondary Color: Negro (#000000 / #0a0b0d / #101215)
   Primary Typography: Montserrat Alternates Bold
   Secondary Typography: Inter
   ========================================================================== */

/* Cart Header Trigger & Badge */
.header-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--c-steel-800, #17191d);
    color: var(--c-white, #ffffff);
    font-size: 1.1rem;
    border: 1px solid var(--c-steel-600, #34383f);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-left: 12px;
    text-decoration: none;
}

.header-cart-btn:hover {
    background: #036fd3;
    color: #ffffff;
    border-color: #036fd3;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(3, 111, 211, 0.4);
}

.cart-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #036fd3;
    color: #ffffff;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #0a0b0d;
    box-shadow: 0 2px 6px rgba(3, 111, 211, 0.4);
    animation: badgePulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePulse {
    0% { transform: scale(0.5); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Backdrop Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Sliding Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    background: #0c0e12;
    color: #ffffff;
    z-index: 9999;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
}

.cart-drawer.is-open {
    transform: translateX(-460px);
}

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

/* Drawer Header */
.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid #1a1d24;
    background: #0a0b0d;
}

.cart-drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-drawer-title-wrap i {
    font-size: 1.3rem;
    color: #036fd3;
}

.cart-drawer-header h3 {
    margin: 0;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.cart-drawer-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #8a94a6;
    font-weight: 500;
}

.cart-drawer-close {
    background: #15181e;
    border: 1px solid #242933;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-drawer-close:hover {
    background: #036fd3;
    color: #ffffff;
    border-color: #036fd3;
    transform: rotate(90deg);
}

/* Drawer Body & Items */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.cart-drawer-body::-webkit-scrollbar {
    width: 4px;
}
.cart-drawer-body::-webkit-scrollbar-thumb {
    background: #242933;
    border-radius: 4px;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 14px;
    background: #14171d;
    border: 1px solid #20242d;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: rgba(3, 111, 211, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cart-item-info {
    flex: 1;
    padding-right: 12px;
}

.cart-item-ref {
    display: inline-block;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: #036fd3;
    background: rgba(3, 111, 211, 0.12);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(3, 111, 211, 0.25);
}

.cart-item-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.cart-item-cat {
    font-size: 0.78rem;
    color: #64748b;
    display: block;
}

.cart-item-price {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #036fd3;
    margin-top: 6px;
}

/* Quantity & Remove Controls */
.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.cart-qty-picker {
    display: flex;
    align-items: center;
    background: #0a0b0d;
    border: 1px solid #242933;
    border-radius: 8px;
    overflow: hidden;
}

.btn-qty {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.btn-qty:hover {
    background: #036fd3;
    color: #ffffff;
}

.qty-display {
    padding: 0 8px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    min-width: 24px;
    text-align: center;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.2s ease;
}

.btn-remove-item:hover {
    color: #ef4444;
}

/* Empty State */
.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty-state .empty-icon {
    font-size: 3.5rem;
    color: #242933;
    margin-bottom: 16px;
}

.cart-empty-state h3 {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.cart-empty-state p {
    font-size: 0.88rem;
    color: #8a94a6;
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-explore {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    background: #036fd3;
    color: #ffffff;
    border: none;
}

/* Drawer Footer */
.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #1a1d24;
    background: #0a0b0d;
}

.cart-drawer-total {
    font-family: 'Montserrat Alternates', sans-serif;
}

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

.btn-checkout-start {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #036fd3;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(3, 111, 211, 0.35);
    letter-spacing: 0.02em;
}

.btn-checkout-start:hover {
    background: #025ab0;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(3, 111, 211, 0.45);
}

.btn-whatsapp-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: #14171d;
    color: #ffffff;
    border: 1px solid #242933;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-whatsapp-quote:hover {
    background: #1c2029;
    border-color: #036fd3;
    color: #ffffff;
}

.btn-clear-cart {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #64748b;
    border: 1px dashed #242933;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-cart:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Toast Notifications */
.cart-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.cart-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0e1117;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    border: 1px solid #20242d;
    border-left: 4px solid #036fd3;
}

.cart-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.cart-toast i {
    color: #036fd3;
    font-size: 1.1rem;
}
