/* ============================================
   CARRITO DROPDOWN - DISEÑO PREMIUM COMPACTO
   ============================================ */

.cart-dropdown {
    position: fixed;
    top: 90px;
    right: 2rem;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: rgba(13, 17, 28, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(74, 158, 255, 0.15);
    border-radius: 20px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(74, 158, 255, 0.1),
        0 10px 40px rgba(74, 158, 255, 0.15);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.cart-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.cart-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    background: linear-gradient(180deg, rgba(74, 158, 255, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
}

.cart-dropdown-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.cart-dropdown-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #5a6a8a;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

/* Body */
.cart-dropdown-body {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 158, 255, 0.3) transparent;
}

.cart-dropdown-body::-webkit-scrollbar {
    width: 4px;
}

.cart-dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 2px;
}

/* Empty State */
.cart-dropdown-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
    gap: 0.5rem;
}

.cart-dropdown-empty-icon {
    font-size: 2rem;
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.cart-dropdown-empty p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #8b9bb4;
    margin: 0;
}

/* Items */
.cart-dropdown-items {
    padding: 0.6rem;
}

.cart-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.cart-dropdown-item:last-child {
    margin-bottom: 0;
}

.cart-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(74, 158, 255, 0.15);
}

.cart-dropdown-item-img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
}

.cart-dropdown-item-img img,
.cart-dropdown-item-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-dropdown-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cart-dropdown-item-info h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-dropdown-item-info span, .product-price-mini {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem !important;
    color: var(--color-accent-primary, #4a9eff) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.cart-dropdown-item-remove {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cart-dropdown-item-remove:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

/* Footer */
.cart-dropdown-footer {
    padding: 1rem 1.2rem;
    background: linear-gradient(0deg, rgba(10, 14, 26, 0.98) 0%, rgba(10, 14, 26, 0.9) 100%);
    border-top: 1px solid rgba(74, 158, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

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

.cart-dropdown-total span:first-child {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #8b9bb4;
}

.cart-dropdown-total span:last-child {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--color-accent-primary, #4a9eff);
    font-weight: 800;
    text-shadow: 0 0 15px rgba(74, 158, 255, 0.4);
}

.cart-dropdown-actions {
    display: flex;
    gap: 0.6rem;
}

.cart-dropdown-actions button {
    flex: 1;
    padding: 0.75rem;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.cart-dropdown-clear {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #8b9bb4;
}

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

.cart-dropdown-checkout {
    background: linear-gradient(135deg, #4a9eff, #7c5cff);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.cart-dropdown-checkout:hover {
    background: linear-gradient(135deg, #3a8ee6, #6c4cef);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.4);
}

.cart-dropdown-checkout svg {
    transition: transform 0.3s ease;
}

.cart-dropdown-checkout:hover svg {
    transform: translateX(3px);
}

/* Responsive */
@media (max-width: 480px) {
    .cart-dropdown {
        width: calc(100vw - 30px);
        right: 15px !important;
        left: 15px !important;
    }
}
