/* ===== AUTHENTICATION STYLES ===== */

/* Profile Icon */
.profile-icon {
    position: relative;
    text-decoration: none;
    color: var(--charcoal);
    font-size: 1.3rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.profile-icon:hover {
    color: var(--gold-primary);
    background-color: rgba(197, 160, 40, 0.05);
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-overlay.active {
    display: flex;
}

/* Auth Container */
.auth-container {
    background-color: var(--ivory);
    border-radius: var(--border-radius);
    width: 100%;
    height: 90%;
    max-width: 450px;
    box-shadow: var(--box-shadow);
    overflow-y: scroll;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background-color: white;
    border-bottom: 1px solid var(--gold-light);
}

.auth-tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    background: none;
    border: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--taupe);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.auth-tab.active {
    color: var(--gold-primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--gold-primary);
}

.auth-tab:hover:not(.active) {
    background-color: rgba(197, 160, 40, 0.05);
    color: var(--charcoal);
}

/* Auth Content */
.auth-content {
    padding: 40px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* Form Elements */
.auth-form h3 {
    font-family: 'Cinzel', serif;
    color: var(--charcoal);
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--charcoal);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--gold-light);
    border-radius: var(--border-radius);
    background-color: white;
    color: var(--charcoal);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 40, 0.1);
}

.form-group input::placeholder {
    color: var(--light-taupe);
}

/* Remember Me & Forgot Password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--taupe);
    cursor: pointer;
}

.remember-me input {
    width: auto;
}

.forgot-password {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.auth-submit:hover {
    background: linear-gradient(135deg, var(--gold-secondary), var(--gold-primary));
    transform: translateY(-2px);
}

/* Social Login */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 25px 0;
    color: var(--taupe);
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--gold-light);
}

.auth-divider span {
    background-color: var(--ivory);
    padding: 0 15px;
    position: relative;
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: 1px solid var(--gold-light);
    background-color: white;
    border-radius: var(--border-radius);
    color: var(--charcoal);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    border-color: var(--gold-primary);
    background-color: rgba(197, 160, 40, 0.05);
}

.social-btn.google {
    color: #DB4437;
}

.social-btn.facebook {
    color: #4267B2;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gold-light);
    color: var(--taupe);
}

.auth-footer a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

/* Close Button */
.auth-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.auth-close:hover {
    color: var(--gold-primary);
    transform: scale(1.1);
}

/* Account Panel */
.account-panel {
    position: fixed;            /* 🔥 important */
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;              /* 🔥 fixed height */
    background-color: var(--ivory);
    border-left: 1px solid var(--gold-light);
    box-shadow: var(--box-shadow);
    z-index: 1200;

    overflow-y: auto;           /* 🔥 panel scroll */
    overscroll-behavior: contain;

    display: none;
}


.account-panel.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Account Header */
.account-header {
    padding: 25px;
    background: linear-gradient(135deg, var(--gold-light), var(--ivory));
    border-bottom: 1px solid var(--gold-light);
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 15px;
}

.user-name {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--charcoal);
    margin-bottom: 5px;
}

.user-email {
    color: var(--taupe);
    font-size: 0.9rem;
}

/* Account Menu */
.account-menu {
    padding: 10px 0;
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: var(--charcoal);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.account-menu-item:hover {
    background-color: rgba(197, 160, 40, 0.05);
    color: var(--gold-primary);
    border-left-color: var(--gold-primary);
}

.account-menu-item.active {
    background-color: rgba(197, 160, 40, 0.05);
    color: var(--gold-primary);
    border-left-color: var(--gold-primary);
}

.account-menu-item i {
    width: 20px;
    text-align: center;
    color: var(--gold-primary);
}

/* Account Content */
.account-content {
    display: none;
    padding: 25px;
    background-color: white;
}

.account-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Orders Section */
.orders-section h3,
.account-details h3,
.wishlist-section h3 {
    font-family: 'Cinzel', serif;
    color: var(--charcoal);
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gold-light);
}

.order-item {
    background-color: var(--off-white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--gold-light);
    transition: var(--transition);
}

.order-item:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-id {
    font-weight: 600;
    color: var(--charcoal);
}

.order-date {
    color: var(--taupe);
    font-size: 0.9rem;
}

.order-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.delivered {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.order-status.processing {
    background-color: rgba(255, 193, 7, 0.1);
    color: #FF9800;
}

.order-status.pending {
    background-color: rgba(158, 158, 158, 0.1);
    color: #9E9E9E;
}

.order-products {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.order-product {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gold-light);
}

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

.no-orders {
    text-align: center;
    padding: 40px 20px;
    color: var(--taupe);
}

.no-orders i {
    font-size: 3rem;
    color: var(--gold-light);
    margin-bottom: 15px;
}

/* Account Details */
.account-details-grid {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gold-light);
}

.detail-label {
    font-weight: 600;
    color: var(--charcoal);
}

.detail-value {
    color: var(--taupe);
}

/* Logout Button */
.logout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        width: 90%;
        max-width: 400px;
    }

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

    .auth-tabs {
        flex-direction: column;
    }

    .account-panel {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 576px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .social-login {
        gap: 10px;
    }
}

/* Make logout button visible in account panel */
.account-content#logoutSection {
    display: block !important;
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--gold-light);
}

.logout-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.2);
}


.account-panel {
  transform: translateX(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.account-panel.closed {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
