/* Cart Drawer - Hidden by default */
.cart-drawer {
    display: none !important;
}

.cart-overlay {
    display: none !important;
}

/* Add to Cart Popup Notification */
.add-to-cart-popup {
    position: fixed;
    top: 80px; /* will be updated by JS */
    right: 20px; /* will be updated by JS */
    transform: translateY(-10px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    z-index: 10001;
    max-width: 440px;
    width: 440px;
    opacity: 0;
    visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s ease;
}

.add-to-cart-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.add-to-cart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.add-to-cart-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.popup-success-icon {
    width: 24px;
    height: 24px;
    background: #10B981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.popup-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.popup-close:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.popup-content {
    padding: 1.25rem;
}

.popup-product {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.popup-product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #F9FAFB;
    flex-shrink: 0;
}

.popup-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-product-details {
    flex: 1;
}

.popup-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.popup-product-meta {
    font-size: 0.875rem;
    color: #6B7280;
}

.popup-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.popup-cart-total-label {
    font-size: 0.95rem;
    color: #6B7280;
}

.popup-cart-total-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
}

.popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.popup-btn {
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.popup-btn-outline {
    background: white;
    color: #6B7280;
    border: 2px solid #E5E7EB;
}

.popup-btn-outline:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    color: #1F2937;
}

.popup-btn-primary {
    background: #2563EB;
    color: white;
    border: 2px solid #2563EB;
}

.popup-btn-primary:hover {
    background: #1D4ED8;
    border-color: #1D4ED8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Cart icon bump feedback */
.cart-bump {
    animation: cartBump .6s ease;
}

@keyframes cartBump {
    0% { transform: scale(1); }
    25% { transform: scale(1.18); }
    50% { transform: scale(0.94); }
    75% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* small arrow pointing to cart icon */
.popup-arrow {
    position: absolute;
    top: -8px;
    right: 28px; /* will be adjusted by JS */
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid #E5E7EB;
    border-top: 1px solid #E5E7EB;
}

/* Cart Notification (Top Bar) - Clean Design */
.cart-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #1F2937;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 380px;
    max-width: 500px;
    border: 1px solid #E5E7EB;
}

.cart-notification.show {
    top: 90px;
}

.cart-notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-notification-icon {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cart-notification-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2937;
}

.cart-notification-link {
    background: linear-gradient(135deg, #1877F2 0%, #0E5FCE 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.cart-notification-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .cart-notification {
        top: -100px;
        min-width: 280px;
        max-width: calc(100% - 2rem);
        padding: 0.875rem 1.5rem;
    }
    
    .cart-notification.show {
        top: 80px;
    }
    
    .cart-notification-content {
        gap: 0.75rem;
    }
    
    .cart-notification-icon {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }
    
    .cart-notification-text {
        font-size: 0.875rem;
    }
    
    .cart-notification-link {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        top: -100px;
        opacity: 0;
    }
    to {
        top: 100px;
        opacity: 1;
    }
}
