/* ===================================
   Auth + Cart Styles
   =================================== */

/* Nav Right Area */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sign-In Button */
.btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.btn-signin:hover {
    background: var(--primary, #8655FF);
    border-color: var(--primary, #8655FF);
    transform: translateY(-1px);
}

.navbar.scrolled .btn-signin {
    background: rgba(134, 85, 255, 0.08);
    border-color: rgba(134, 85, 255, 0.2);
    color: var(--dark, #160F50);
}

.navbar.scrolled .btn-signin:hover {
    background: var(--primary, #8655FF);
    color: #fff;
}

.navbar.scrolled .btn-signin svg {
    stroke: var(--dark, #160F50);
}

.navbar.scrolled .btn-signin:hover svg {
    stroke: #fff;
}

/* User Avatar/Menu */
.user-menu {
    position: relative;
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: var(--primary, #8655FF);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.user-avatar-btn:hover {
    border-color: var(--primary, #8655FF);
    transform: scale(1.05);
}

.navbar.scrolled .user-avatar-btn {
    border-color: rgba(134, 85, 255, 0.3);
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-fallback {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1001;
}

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

.user-dropdown-header {
    padding: 8px 10px;
}

.user-dropdown-header strong {
    display: block;
    color: var(--dark, #160F50);
    font-size: 0.92rem;
}

.user-dropdown-header small {
    color: #888;
    font-size: 0.78rem;
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: none;
    background: none;
    border-radius: 8px;
    color: #dc3545;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(220, 53, 69, 0.06);
}

/* Cart Button */
.cart-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.cart-btn:hover {
    background: var(--primary, #8655FF);
    border-color: var(--primary, #8655FF);
    transform: translateY(-1px);
}

.navbar.scrolled .cart-btn {
    background: rgba(134, 85, 255, 0.08);
    border-color: rgba(134, 85, 255, 0.2);
    color: var(--dark, #160F50);
}

.navbar.scrolled .cart-btn:hover {
    background: var(--primary, #8655FF);
    color: #fff;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.auth-modal.active .auth-modal-content {
    transform: scale(1);
}

.auth-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.auth-logo {
    width: 50px;
    height: auto;
    margin-bottom: 15px;
    filter: none;
}

.auth-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark, #160F50);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 0.88rem;
    color: #888;
    line-height: 1.5;
    margin-bottom: 25px;
}

.google-btn-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #bbb;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.auth-divider span {
    padding: 0 10px;
}

.email-login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-login-form input {
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: var(--dark, #160F50);
    transition: border-color 0.2s;
    outline: none;
}

.email-login-form input:focus {
    border-color: var(--primary, #8655FF);
}

.btn-email-signin {
    padding: 12px;
    background: var(--dark, #160F50);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}

.btn-email-signin:hover {
    background: var(--primary, #8655FF);
}

.auth-switch {
    font-size: 0.85rem;
    color: #666;
    margin-top: 20px;
}

.auth-link {
    background: none;
    border: none;
    color: var(--primary, #8655FF);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.text-right {
    text-align: right;
    width: 100%;
    display: block;
    margin-top: -6px;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.auth-terms {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 20px;
}

.auth-terms a {
    color: var(--primary, #8655FF);
    text-decoration: underline;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar.active {
    opacity: 1;
    visibility: visible;
}

.cart-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.cart-panel {
    position: absolute;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.active .cart-panel {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark, #160F50);
}

.cart-close {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #aaa;
}

.cart-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.cart-empty p {
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.cart-empty small {
    font-size: 0.82rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.cart-item-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark, #160F50);
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--primary, #8655FF);
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.qty-btn:hover {
    background: var(--primary, #8655FF);
    color: #fff;
    border-color: var(--primary, #8655FF);
}

.qty-value {
    width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark, #160F50);
}

.remove-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(220, 53, 69, 0.06);
    border-radius: 8px;
    color: #dc3545;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 6px;
}

.remove-btn:hover {
    background: rgba(220, 53, 69, 0.15);
}

/* Cart Footer */
.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.cart-total span {
    color: #666;
}

.cart-total strong {
    font-size: 1.2rem;
    color: var(--dark, #160F50);
}

.btn-checkout {
    width: 100%;
    padding: 14px 24px;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-checkout-primary {
    background: var(--primary, #8655FF);
    box-shadow: 0 4px 12px rgba(134, 85, 255, 0.25);
}

.btn-checkout-primary:hover {
    background: var(--primary-dark, #6b3fd9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(134, 85, 255, 0.35);
}

.btn-checkout-whatsapp {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-checkout-whatsapp:hover {
    background: rgba(37, 211, 102, 0.08);
    border-color: #25D366;
}

/* "Add to Cart" Button (product cards) */
.btn-add-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--primary, #8655FF);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-add-cart:hover {
    background: var(--primary-dark, #6b3fd9);
    transform: translateY(-1px);
}

/* Product card button row */
.product-buttons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.product-buttons .btn-buy {
    margin-top: 0;
    flex: 1;
    font-size: 0.82rem;
    padding: 10px 14px;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--dark, #160F50);
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-error {
    background: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .signin-text {
        display: none;
    }

    .btn-signin {
        padding: 8px 12px;
    }

    .cart-panel {
        width: 100%;
        max-width: 100vw;
    }

    .auth-modal-content {
        margin: 20px;
        padding: 30px 20px;
    }

    .notif-panel {
        right: -10px;
        width: 320px;
    }
}

/* ===================================
   Notification Bell & Panel
   =================================== */
.notif-wrapper {
    position: relative;
}

.notif-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.notif-btn:hover {
    background: var(--primary, #8655FF);
    border-color: var(--primary, #8655FF);
    transform: translateY(-1px);
}

.navbar.scrolled .notif-btn {
    background: rgba(134, 85, 255, 0.08);
    border-color: rgba(134, 85, 255, 0.2);
    color: var(--dark, #160F50);
}

.navbar.scrolled .notif-btn:hover {
    background: var(--primary, #8655FF);
    color: #fff;
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: 'Inter', sans-serif;
}

/* Notification Panel */
.notif-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-height: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 1001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.notif-panel-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark, #160F50);
}

.notif-read-all {
    background: none;
    border: none;
    color: var(--primary, #8655FF);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s;
}

.notif-read-all:hover {
    opacity: 0.7;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.notif-empty {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
    font-size: 0.9rem;
}

/* Notification Item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.notif-item:hover {
    background: rgba(134, 85, 255, 0.04);
}

.notif-item.notif-read {
    opacity: 0.55;
}

.notif-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.notif-content strong {
    font-size: 0.88rem;
    color: var(--dark, #160F50);
}

.notif-content p {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-content time {
    font-size: 0.72rem;
    color: #aaa;
}

/* Type Tags */
.notif-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.notif-tag-offer {
    background: rgba(37, 211, 102, 0.12);
    color: #25D366;
}

.notif-tag-winner {
    background: rgba(255, 193, 7, 0.15);
    color: #d4a106;
}

.notif-tag-general {
    background: rgba(134, 85, 255, 0.1);
    color: var(--primary, #8655FF);
}

/* Unread Dot */
.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--primary, #8655FF);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    animation: notifPulse 2s infinite;
}

@keyframes notifPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}