/* ==================== HEADER STYLES ==================== */

header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-purple) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.logo img{
    border-radius: 10px;
}

.logo span {
    color: var(--gold);
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-btn, .profile-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(251, 191, 36, 0.3);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.cart-btn:hover, .profile-btn:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.cart-btn ion-icon, .profile-btn ion-icon {
    font-size: 1.3rem;
    color: var(--gold);
}

.cart-count {
    background: var(--gold);
    color: var(--primary-navy);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--card-bg);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    min-width: 200px;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.profile-info {
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.profile-name {
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.2rem;
}

.profile-email {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-link:hover {
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold);
}

.dropdown-link ion-icon {
    font-size: 1.2rem;
}




.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--gold);
    color: var(--primary-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    /* changed to absolute so menu can overlay page content reliably */
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%; /* sit just below the header */
    background: var(--card-bg);
    border-top: 2px solid rgba(251, 191, 36, 0.2);
    padding: 0.5rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.2s ease;
    opacity: 0;
}

.mobile-nav.active {
    max-height: 480px; /* allow enough room for the links */
    opacity: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 2rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-nav-link ion-icon {
    font-size: 1.3rem;
    color: var(--gold);
}

.mobile-nav-link:hover {
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold);
}

/* ==================== FOOTER STYLES ==================== */

footer {
    background: var(--primary-navy);
    padding: 3rem 2rem 1.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-column a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    text-decoration: none;
    margin-bottom: 0.7rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.footer-column a ion-icon {
    font-size: 1.1rem;
    color: var(--gold);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.social-links a:hover {
    background: var(--gold);
    transform: translateY(-3px);
    padding-left: 0;
}

.social-links ion-icon {
    font-size: 1.3rem;
    color: var(--gold);
}

.social-links a:hover ion-icon {
    color: var(--primary-navy);
}

/* Newsletter */
.newsletter {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem auto;
    text-align: center;
    max-width: 1400px;
}

.newsletter h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.section-subtitle {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.newsletter-form input::placeholder {
    color: var(--text-gray);
}

.newsletter-form button {
    padding: 0.8rem 2rem;
    background: var(--gold);
    color: var(--primary-navy);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4);
}

/* Payment Methods */
.payment-methods {
    text-align: center;
    padding: 1.5rem 0;
    margin: 0 auto;
    max-width: 1400px;
}

.payment-methods p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-weight: 500;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.payment-icons ion-icon {
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.payment-icons ion-icon:hover {
    opacity: 1;
}

/* Copyright */
.copyright {
    text-align: center;
    color: var(--text-gray);
    padding-top: 2rem;
    margin: 2rem auto 0;
    border-top: 1px solid rgba(251, 191, 36, 0.1);
    font-size: 0.9rem;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.copyright ion-icon {
    font-size: 1rem;
    vertical-align: middle;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 968px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-nav {
        display: block;
        z-index: 1100; /* ensure it's above the sticky header */
    }

    .header-container {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo img{
    border-radius: 10px;
    width:30;
}

    .cart-btn, .profile-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    #profile-text {
        display: none;
    }

    .payment-icons {
        gap: 1rem;
    }

    .payment-icons ion-icon {
        font-size: 1.5rem;
    }
}

/* ==================== GUEST CART MODAL ==================== */

.guest-cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.guest-cart-modal.active {
    display: flex;
}

.guest-cart-modal-content {
    background: var(--bg-dark);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.guest-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

.guest-cart-header h2 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin: 0;
}

.guest-cart-close {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.guest-cart-close:hover {
    color: #fcd34d;
}

.guest-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.guest-cart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.guest-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.05);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.1);
}

.guest-cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.guest-cart-item-info {
    flex: 1;
}

.guest-cart-item-name {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.guest-cart-item-brand {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.guest-cart-item-details {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.guest-cart-item-quantity {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.guest-cart-item-price {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.guest-cart-item-price div:first-child {
    color: var(--gold);
    font-weight: 600;
}

.guest-cart-item-subtotal {
    color: var(--text-light);
    font-size: 0.9rem;
}

.guest-cart-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(251, 191, 36, 0.1);
    background: rgba(251, 191, 36, 0.02);
}

.guest-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.guest-cart-total span:last-child {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.3rem;
}

.btn-block {
    width: 100%;
}

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

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