@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Philosopher:ital,wght@0,400;0,700;1,400;1,700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Winky+Sans:ital,wght@0,300..900;1,300..900&display=swap');
@import 'root-color.css';

:root {
    /* cream / brown / gold palette */
    --cream: #f6f1ea;
    --dark-brown: #3d2c19;
    --muted-brown: #a68c6d;
    --gold: #bfa16a;
    --muted-gray: #e7e4df;
}

/* Header base */
.site-header {
    background: var(--cream);
    border-bottom: 1px solid var(--muted-gray);
    position: sticky;
    top: 0;
    z-index: 1100;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

/* top row */
.header-top {
    padding: 20px 30px;
    /* increased vertical & horizontal padding */
    align-items: center;
}

.logo img {
    width: 150px;
    height: auto;
    object-fit: contain;
}

/* Search (placed to the right via layout) */
.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--muted-gray);
    padding: 8px 10px;
    border-radius: 28px;
    min-width: 280px;
    max-width: 480px;
    margin-left: 18px;
    /* spacing from logo */
    margin-right: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.site-search input[type="search"] {
    border: none;
    outline: none;
    padding: 8px;
    font-size: 14px;
    color: var(--dark-brown);
    background: transparent;
}

.site-search button {
    border: none;
    background: var(--muted-brown);
    color: #fff;
    padding: 8px 10px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
}

.site-search button:hover {
    background: var(--gold);
}

/* header icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-brown);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.cart-link:hover {
    background: var(--muted-gray);
}

/* Navigation - pill style */
.main-nav {
    background: transparent;
    padding: 10px 0;
    /* increased padding for taller header */
}

.nav-list {
    display: flex;
    gap: 14px;
    /* space between items */
    align-items: center;
    justify-content: flex-start;
    /* left aligned */
    padding-left: 0;
}

/* Navigation styles update */
.nav-list {
    display: flex;
    /* justify-content:center; */
    gap: 48px;
    padding: 12px 0;
}

.nav-list a {
    font-size: 16.5px;
    /* increased from 15px */
    font-weight: 600;
    /* semi-bold */
    color: #3d2c19;
    /* dark brown */
    padding: 10px 20px;
    /* more padding */
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    /* slight letter spacing */
}

.nav-list a:hover {
    background: #bfa16a;
    /* gold background */
    color: #ffffff;
    /* white text */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(191, 161, 106, 0.2);
}

.nav-list a.active {
    background: #a68c6d;
    /* muted brown background */
    color: #ffffff;
    /* white text */
    box-shadow: 0 4px 12px rgba(166, 140, 109, 0.2);
}

.nav-list li {
    margin: 0;
}

/* Ensure nav has good left padding on wide screens */
.main-nav .container {
    padding-left: 20px;
    padding-right: 20px;
}

/* user avatar and dropdown */
.user-avatar {
    background: var(--muted-brown);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(166, 140, 108, 0.12);
}

/* mobile adjustments */
.mobile-menu-icon {
    display: none;
    background: transparent;
    border: none;
    padding: 6px;
}

.mobile-menu-icon .icon-close {
    display: none;
}

/* Header layout adjustments */
.header-top .row {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Move search to right */
.site-search {
    margin-left: auto;
    /* pushes search to right */
    width: 320px;
    /* fixed width */
    margin-right: 20px;
}

/* Navigation centered items */
.main-nav {
    padding: 12px 0;
    background: transparent;
    border-bottom: 1px solid var(--muted-gray);
}

.nav-list {
    display: flex;
    justify-content: center;
    /* center the items */
    gap: 48px;
    /* increased gap between items */
    padding: 0;
    margin: 0;
}

.nav-list a {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-brown);
    transition: all 0.2s ease;
    border-radius: 6px;
}

.nav-list a:hover,
.nav-list a.active {
    background: var(--muted-brown);
    color: #fff;
}

/* Search Box and Results Container */
.site-search-container {
    position: relative;
    flex: 1;
    max-width: 480px;
    margin: 0 20px;
}

.site-search {
    width: 100%;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-item {
    padding: 12px 16px;
    display: block;
    color: var(--dark-brown);
    transition: background 0.2s;
    text-decoration: none;
}

.search-item:hover {
    background: var(--cream);
}

.no-results {
    padding: 16px;
    text-align: center;
    color: #666;
}

/* Update site-search styles for better responsiveness */
.site-search {
    width: 100%;
    max-width: 320px;
    min-width: auto;
    margin: 0 10px;
}

/* Logo switching rules */
.logo {
    display: block;
    line-height: 0; /* remove any extra space */
}

.logo-large {
    display: block;
    width: 150px;
    height: auto;
}

.logo-small {
    display: none;
    width: 40px; /* adjust size as needed */
    height: auto;
}

@media (max-width: 476px) {
    .logo-large {
        display: none;
    }
    .logo-small {
        display: block;
    }
    
    /* Adjust header spacing for small logo */
    .header-right {
        gap: 8px;
    }
    
    .site-search {
        max-width: 220px; /* slightly wider since we saved space with small logo */
        min-width: 180px;
    }
}

/* Responsive */
@media (max-width: 992px) {
    /* .site-search {
        display: none;
    } */

    .mobile-menu-icon {
        display: inline-flex;
    }

    .logo img {
        width: 140px;
    }

    .nav-list {
        gap: 10px;
        overflow-x: auto;
    }

    .header-top {
        padding: 12px 16px;
    }

    .nav-list {
        gap: 24px;
    }

    .site-search {
        max-width: 260px;
        margin: 0 10px;
    }

    .header-top .row {
        flex-wrap: wrap;
        gap: 10px;
    }

	/* hide the header cart link when mobile menu/toggle is visible */
	.header-icons .cart-link {
		display: none !important;
	}
}

@media (max-width: 768px) {
    .nav-list {
        gap: 16px;
        justify-content: flex-start;
    }

    .site-search {
        max-width: 200px;
        margin: 0 8px;
    }

    .header-top .row {
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .mobile-menu-icon {
        display: block;
    }

    .logo img {
        width: 110px;
    }

    .nav-list {
        display: none;
    }

    .site-search {
        max-width: 160px;
        margin: 0 6px;
    }

    .site-search input[type="search"] {
        font-size: 13px;
        padding: 6px;
    }

    .site-search button {
        padding: 6px 8px;
        font-size: 13px;
    }
}

/* Mobile: show cart inside nav menu and hide header cart icon to avoid duplicates */
.nav-list .mobile-cart {
	/* hidden by default on desktop */
	display: none;
}

/* style mobile cart to match nav items (will appear inside the vertical menu) */
.nav-list .mobile-cart a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	border-radius: 8px;
	color: var(--dark-brown);
	font-weight: 600;
}

/* Small screens: show mobile-cart and hide header icon cart */
@media (max-width: 992px) {
	/* hide the header/inline cart icon when menu is used */
	.header-icons .cart-link {
		display: none !important;
	}

	/* show the cart inside the nav list (mobile menu) and give it an order so it sits after the first three items */
	.nav-list {
		flex-direction: column;
	}
	.nav-list .mobile-cart {
		display: block;
		order: 3; /* places it after the first two nav items; adjust numeric order if needed */
		margin: 8px 0;
	}
	.nav-list .mobile-cart a {
		background: transparent;
		color: var(--dark-brown);
	}

	/* ensure the mobile menu and items are readable */
	.main-nav.active .nav-list li a,
	.nav-list .mobile-cart a {
		padding: 14px 20px;
		font-size: 16px;
		border-radius: 6px;
	}

}

/* Additional responsive tweaks for very small screens (iPhone SE etc) */
@media (max-width: 375px) {
    .header-top {
        padding: 8px 6px;
    }

    .header-top .row {
        flex-wrap: nowrap;
        gap: 16px;
    }

    /* Even smaller logo */
    .logo-small {
        width: 28px;
        height: auto;
    }

    /* More compact search */
    .site-search-container {
        max-width: 160px;
        margin: 0 4px;
    }
    
    .site-search {
        padding: 4px 8px;
        font-size: 12px;
        height: 32px;
        min-width: 120px;
        border-radius: 16px;
    }

    .site-search input[type="search"] {
        padding: 4px;
        width: 100%;
    }

    /* Compact user controls */
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Smaller menu toggle */
    .mobile-menu-icon {
        width: 32px;
        height: 32px;
        padding: 4px;
        margin-left: 2px;
    }
    
    .mobile-menu-icon i {
        font-size: 14px;
    }

    /* Force single line */
    .header-right {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: auto;
    }

    /* Ensure proper spacing */
    .container {
        padding: 0 4px;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--alert-light-color);
    /* border-radius: 5px; */
}

.pt-50 {
    padding-top: 40px;
    padding-bottom: 40px;
}

a {
    text-decoration: none;
    display: inline-block;
}

ul,
ol {
    list-style: none;
}

img {
    width: 100%;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    /* overflow: hidden;    */
}

.row {
    display: flex;
    flex-wrap: nowrap;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-end {
    justify-content: end;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--white);
}

/* Header Styles */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white);
}

.header-top {
    padding: 10px 16px;
    border-bottom: none;
}

.logo img {
    width: 135px;
    /* margin-left: 60px; */
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-icon i {
    color: var(--header-icon-color);
    font-size: 18px;
}

.header-icons a {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.header-icons i {
    font-size: 18px;
}

/*Main Navigation */

/* .nav-list {
    /* justify-content: space-around; */

nav {
    background-color: #f1f1f1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.nav-list a {
    display: block;
    padding: 15px 20px;
    font-size: 15px;
    color: var(--color-black);
}

.nav-list a i {
    margin-right: 8px;
}

.nav-list li {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* .nav-list a:hover {
    color: var(--primary-color);
} */

/* .nav-list a.active {
    color: var(--primary-color);
    
} */
/* Mobile Menu Icon */
.mobile-menu-icon {
    display: none;
    cursor: pointer;
    z-index: 100;
    position: relative;
}

.mobile-menu-icon i.fa-xmark {
    display: none;
    font-size: 20px;
    color: var(--header-icon-color);
}

.mobile-menu-icon span i.fa-bars {
    font-size: 18px;
    color: var(--header-icon-color);
    display: block;
}

.mobile-menu-icon.open i.fa-bars {
    display: none;
}

.mobile-menu-icon.open i.fa-xmark {
    display: block;
}

.mobile-only {
    display: none;
}

.header-top button {
    background: none;
    outline: none;
    border: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .header-top {
        padding: 12px 16px;
        border-bottom: none;
    }

    .logo img {
        width: 140px;
        margin: auto 0;
    }

    .mobile-menu-icon {
        display: block;
    }

    .header-icons {
        display: none;
    }

    .search-icon i {
        font-size: 18px;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 20px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 15px;
        height: 100%;
        overflow-y: auto;
        z-index: 99;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list li {
        border-bottom: 1px solid var(----color-light-gray-5);
        width: 100%;
    }

    .nav-list a {
        padding: 15px 0;
    }

    .mobile-only {
        display: block;
    }
}

@media (max-width: 576px) {
    .header-top {
        padding: 10px 20px;
    }

    .logo img {
        width: 100px;
        margin: 0;
    }

    .header-icons {
        gap: 15px;
    }

    .header-icons i {
        font-size: 16px;
    }
}

.main-content {
    background: #f0ecec;
}

.drop-modal {
    width: 14rem;
    position: absolute;
    top: 4.5rem;
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, .2) 0 0 24px 10px;
    border-radius: .5rem;
    flex-direction: column;
    transition: .3s;
    opacity: 1;
    padding: 20px;
    display: none;
    /* right: 13rem; */
}

.drop-modal.show {
    display: flex;
}

.logout_div,
.drop-a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: .6rem .8rem;
    border-top: 1px solid #444
}

.first-letter {
    height: 2.6rem;
    width: 2.6rem;
    border-radius: 50%;
    background-color: #444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .3s;
    position: relative;

}

.button_div {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: #444;
    font-size: .9rem;
    font-weight: 500;
    padding: .8rem;
    transition: .3s;
}

.logout_div a,
.drop-a a {
    text-decoration: none;
    color: #444;
    font-size: 1rem;
    font-weight: 500;
    transition: .3s;
    text-align: center;
}

.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #997c79;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
    margin-right: 0;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px 0;
    z-index: 999;
    display: none;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-header {
    font-size: 0.95rem;
    color: #888;
    padding: 0 18px 6px 18px;
}

.dropdown-username {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px 10px 18px;
}

.dropdown-username .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    margin-right: 0;
}

.username-text {
    font-weight: bold;
    color: #222;
    font-size: 1rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 1rem;
    color: #222;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item i {
    font-size: 1.1rem;
}

.dropdown-menu .dropdown-item:last-child {
    border-top: 1px solid #eee;
    margin-top: 8px;
    padding-top: 12px;
}