/* ============================
   OVERLAY
============================ */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    z-index: 8000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.show { opacity: 1; pointer-events: all; }

/* ============================
   DRAWER
============================ */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: #0f2030;
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 8001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.cart-drawer.open { transform: translateX(0); }

/* Header */
.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.cart-drawer-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-drawer-header h3 span.cart-badge {
    background: #38b6e6;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cart-close-btn:hover { background: rgba(255,255,255,0.15); color: white; }

/* Empty state */
.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255,255,255,0.3);
    padding: 40px;
}
.cart-empty i { font-size: 3rem; }
.cart-empty h4 { font-size: 1.1rem; color: rgba(255,255,255,0.6); }
.cart-empty p { font-size: 0.88rem; text-align: center; }
.cart-empty a {
    margin-top: 8px;
    background: #38b6e6;
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}
.cart-empty a:hover { background: #2a9ecf; }

/* Body — items */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.cart-body::-webkit-scrollbar { width: 4px; }
.cart-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Cart item */
.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s;
}
.cart-item:hover { background: rgba(255,255,255,0.03); }

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 1.4rem;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cart-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: white;
    line-height: 1.35;
}

.cart-item-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    padding: 2px 4px;
    transition: color 0.2s;
}
.cart-item-remove:hover { color: #e74c3c; }

.cart-item-cat {
    font-size: 0.74rem;
    color: #38b6e6;
    font-weight: 500;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.qty-control button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.qty-control button:hover { background: rgba(255,255,255,0.1); color: white; }
.qty-control span {
    font-size: 0.88rem;
    font-weight: 600;
    color: white;
    min-width: 28px;
    text-align: center;
}

.cart-item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

/* Divider */
.cart-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 0;
}

/* Sugeridos */
.cart-suggestions {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 14px 22px;
    flex-shrink: 0;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.cart-suggestions h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-info h5 {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggestion-info span {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
}
.suggestion-add {
    background: rgba(56,182,230,0.15);
    border: 1px solid rgba(56,182,230,0.3);
    color: #38b6e6;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.suggestion-add:hover { background: #38b6e6; color: white; }
a.suggestion-add { text-decoration: none; display: inline-block; }

/* Footer */
.cart-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 18px 22px 20px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.2);
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.cart-subtotal-row span:first-child {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}
.cart-subtotal-row span:last-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.cart-shipping-note {
    font-size: 0.78rem;
    color: #38b6e6;
    margin-bottom: 14px;
}

.btn-comprar {
    width: 100%;
    padding: 14px;
    background: #38b6e6;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}
.btn-comprar:hover { background: #2a9ecf; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(56,182,230,0.35); }

.cart-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}
.cart-secure i { color: #27ae60; }

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 480px) {
    .cart-drawer { width: 100vw; }
}
