
/* Header Popups for Cart and User */

/* Container logic */
.header-popup-trigger {
    position: relative;
    padding-bottom: 20px; /* Bridge the gap to the popup */
    margin-bottom: -20px;
}

.header-popup {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    border: 1px solid #f3f4f6;
    color: #000; /* Ensure text is black inside popup regardless of header state */
    text-align: left;
}

/* Arrow */
.header-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    border-top: 1px solid #f3f4f6;
    border-left: 1px solid #f3f4f6;
}

/* Show on hover */
.group:hover .header-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Content Styles */
.popup-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.popup-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.popup-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: #000;
    color: #fff !important;
    text-align: center;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
    text-decoration: none;
}

.popup-btn:hover {
    background: #374151;
    opacity: 1 !important;
}

.popup-link {
    display: block;
    padding: 0.5rem 0;
    color: #4b5563 !important;
    font-size: 0.875rem;
    transition: color 0.2s;
    text-decoration: none;
}

.popup-link:hover {
    color: #000 !important;
}

/* Empty State */
.popup-empty {
    text-align: center;
    color: #6b7280;
    padding: 1rem 0;
    font-size: 0.875rem;
}
