:root {
    --primary-color: #e6af61;
    --secondary-color: #000000;
    --accent-color: #956a2d;
    --light-gray: #f8f9fa;
    --dark-gray: #2c2c2c;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
}

/* Navbar Styling */
.navbar {
    background: rgb(0, 0, 0);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(187, 35, 37, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(187, 35, 37, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: #000;
    box-shadow: 0 4px 25px rgba(230, 175, 97, 0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 75px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', serif;
}

.logo:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

.logo img {
    width: 150px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(5deg);
    box-shadow: 0 6px 20px rgba(187, 35, 37, 0.4);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-gray);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1rem;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::before {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(187, 35, 37, 0.3);
}

.nav-links a.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 35, 37, 0.4);
}

/* Specific style for logged-in user welcome text */
.nav-links .welcome-text {
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    background: rgba(187, 35, 37, 0.1);
    border-radius: 25px;
    border: 1px solid rgba(187, 35, 37, 0.2);
}

.nav-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-link {
    position: relative;
    color: var(--light-gray);
    transition: all 0.3s ease;
    padding: 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    background: rgba(63, 66, 68, 0.05);
    border: 1px solid rgba(63, 66, 68, 0.1);
}

.icon-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(187, 35, 37, 0.3);
}

.icon-link svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
}

.icon-link:hover svg {
    transform: scale(1.1);
}

.cart-count,
.wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 10px rgba(187, 35, 37, 0.4);
    border: 2px solid white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(187, 35, 37, 0.1);
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-btn.active span {
    background: var(--primary-color);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 25px rgba(187, 35, 37, 0.15);
    border-top: 2px solid rgba(187, 35, 37, 0.1);
    padding-bottom: 1.5rem;
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu ul {
    list-style: none;
    padding: 1.5rem;
}

.mobile-menu li {
    margin: 0.75rem 0;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 1rem 1.5rem;
    display: block;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(63, 66, 68, 0.1);
}

.mobile-menu a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(187, 35, 37, 0.3);
}

.mobile-menu .welcome-text {
    background: rgba(187, 35, 37, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(187, 35, 37, 0.2);
    text-align: center;
    font-weight: 600;
}

.mobile-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(187, 35, 37, 0.1);
    background: rgba(187, 35, 37, 0.02);
}

.btn-primary, .btn-secondary {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(187, 35, 37, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 35, 37, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-gray));
    color: white;
    box-shadow: 0 4px 15px rgba(63, 66, 68, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(63, 66, 68, 0.4);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.btn-secondary:hover::before {
    left: 100%;
}

/* Search Bar Enhancement (if you have one) */
.search-container {
    position: relative;
    margin: 0 1rem;
}

.search-input {
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid rgba(187, 35, 37, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    width: 250px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(187, 35, 37, 0.1);
    background: white;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
}

/* Notification Badge for Navbar */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
    border: 2px solid white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-icons {
        gap: 0.5rem;
    }

    .nav-container {
        padding: 0 1rem;
        height: 75px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }

    .search-input {
        width: 200px;
    }
    
    .btn-log{
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .search-container {
        display: none; /* Hide search on very small screens */
    }

    .mobile-icons {
        gap: 1rem;
    }
}

/* Dropdown Menu Enhancement */
.dropdown {
    position: relative;
}

.dropdown-menu { /* Renamed from .dropdown-content to match PHP/JS */
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Position below the toggle */
    /* Adjust left/right based on desired alignment. 'right: 0;' often works well for user menus. */
    right: 0; /* Align to the right of the parent .dropdown */
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(187, 35, 37, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    z-index: 1001;
    border: 1px solid rgba(187, 35, 37, 0.1);
    transform: translateY(10px); /* Start slightly below for animation */
    opacity: 0; /* Start invisible for animation */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Add transition for smooth appearance */
    pointer-events: none; /* Prevent clicks when hidden */
}

/* !!! THIS IS THE KEY CHANGE !!! */
.dropdown.active .dropdown-menu {
    display: block; /* Show when .dropdown has 'active' class */
    opacity: 1; /* Fade in */
    transform: translateY(0); /* Slide up to final position */
    pointer-events: auto; /* Allow clicks when visible */
}

/* The animation keyframes are no longer strictly needed for `fadeIn`
   if you use transitions on opacity/transform, but you can keep them
   if you prefer a specific animation over a simple transition.
   I've kept your fadeIn keyframes in case you want to revert to them
   or use them elsewhere.
*/
/*
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
*/

.dropdown-menu a { /* Changed from .dropdown-content a */
    padding: 0.75rem 1rem !important;
    border-radius: 0 !important;
    margin: 0 0.5rem;
    transition: all 0.2s ease;
    display: block; /* Make sure links fill the width for easier clicking */
    text-decoration: none; /* Ensure no underline */
    color: var(--secondary-color); /* Ensure text color is consistent */
}

.dropdown-menu a:hover { /* Changed from .dropdown-content a:hover */
    background: rgba(187, 35, 37, 0.1) !important;
    color: var(--primary-color) !important;
    transform: translateX(5px) !important;
}