/* Layout CSS */

/* --- Header --- */
header {
	background: linear-gradient(180deg, rgba(255, 250, 245, 0.98) 0%, rgba(250, 241, 228, 0.96) 100%);
	color: var(--text-color);
	height: auto;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: none;
	border-bottom: 1px solid var(--border-color);
	backdrop-filter: blur(12px);
}

#header-placeholder {
	position: sticky;
	top: 0;
	z-index: 1000;
}

.header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	gap: 16px;
	padding: 16px 0;
	flex-wrap: wrap;
}

.logo {
	order: 2;
}

.header-actions {
	order: 3;
	margin-left: auto;
}

.logo img {
	height: 40px; /* Adaptive width needed */
}

.header-top {
	border-bottom: 1px solid rgba(202, 162, 123, 0.45);
	background: var(--header-top-bg);
}

.header-nav-row {
	display: none;
}

/* Nav Desktop */
.nav-desktop {
	display: none;
	margin-top: 0;
}
.nav-desktop ul {
	display: flex;
	align-items: center;
	gap: 20px;
	height: 100%;
	padding: 0;
}
.nav-desktop a {
	display: inline-block;
	position: relative;
	font-weight: 600;
	text-transform: none;
	font-size: 15px;
	letter-spacing: 0.01em;
	height: 30px;
	padding: 6px 2px;
}
.nav-desktop a:hover,
.nav-desktop a.active {
	color: var(--primary-color);
	text-decoration: none;
}
.nav-desktop a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	background: var(--primary-color);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}
.nav-desktop a:hover::after,
.nav-desktop a.active::after {
	transform: scaleX(1);
}

/* Header Actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}
.auth-user-btn {
	position: relative;
}
.auth-user-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--text-color);
	font-weight: 600;
	border-radius: 999px;
	padding: 6px 10px;
	transition: var(--transition);
}
.auth-user-trigger:hover {
	background: var(--warm-tint);
	color: var(--primary-color);
}
.auth-user-name {
	color: var(--text-color);
}
.auth-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: var(--surface-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	min-width: 140px;
	box-shadow: var(--shadow-sm);
	padding: 6px 0;
	display: none;
	z-index: 1300;
}
.auth-user-btn.open .auth-menu {
	display: block;
}
.auth-menu-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	color: var(--text-color);
	font-size: 0.9rem;
}
.auth-menu-item:hover {
	background: var(--warm-tint);
	color: var(--primary-color);
}
.header-icon {
	font-size: 1.2rem;
	cursor: pointer;
	position: relative;
	display: flex;
	align-items: center;
	color: var(--heading-color);
	min-width: 40px;
	height: 40px;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid transparent;
	transition: var(--transition);
	padding: 0 10px;
}
.header-icon:hover,
.header-icon:focus-visible {
	background: var(--warm-tint);
	color: var(--primary-color);
	border-color: rgba(202, 162, 123, 0.75);
}
.auth-login-btn {
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 600;
}
.count-badge {
	position: absolute;
	top: -5px;
	right: -8px;
	background-color: var(--sale-tag-bg);
	color: white;
	font-size: 10px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Sample Search Box */
.search-box {
	display: block;
	position: relative;
	flex: 1 1 100%;
	order: 4;
	max-width: 100%;
}
.search-input {
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--border-color);
	background: linear-gradient(180deg, #fffaf4 0%, var(--warm-tint) 100%);
	color: var(--text-color);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.search-input:hover {
	border-color: var(--border-strong);
	background: #fffdf8;
}
.search-input:focus {
	background: var(--white);
}
.search-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: 100%;
	max-width: 360px;
	max-height: 360px;
	overflow-y: auto;
	background: var(--surface-color);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	box-shadow: 0 18px 36px rgba(95, 47, 26, 0.18);
	display: none;
	z-index: 1200;
}
.search-suggest-item {
	display: flex;
	gap: 12px;
	padding: 10px 12px;
	align-items: center;
	border-bottom: 1px solid var(--border-color);
}
.search-suggest-item:last-child {
	border-bottom: none;
}
.search-suggest-item:hover {
	background: var(--warm-tint);
}
.search-suggest-img {
	width: 44px;
	height: 44px;
	border-radius: 6px;
	object-fit: cover;
	background: var(--accent-color);
}
.search-suggest-title {
	font-size: 0.9rem;
	color: var(--heading-color);
	margin: 0;
}
.search-suggest-price {
	font-size: 0.85rem;
	color: var(--primary-color);
	margin-top: 2px;
}

/* Mobile Toggle */
.mobile-toggle {
	display: block;
	font-size: 1.5rem;
	cursor: pointer;
	order: 1;
}

/* Desktop Styles */
@media (min-width: 1024px) {
	.header-container {
		flex-wrap: nowrap;
	}
	.logo {
		order: 1;
	}
	.nav-desktop {
		display: flex;
		order: 2;
		flex: 0 0 auto;
	}
	.mobile-toggle {
		display: none;
	}
	.search-box {
		display: block;
		order: 3;
		flex: 1 1 auto;
		max-width: 520px;
	}
	.header-actions {
		order: 4;
		margin-left: 0;
	}

	.logo img {
		height: 50px;
	}
}

/* --- Mobile Menu Drawer --- */
.mobile-drawer {
	position: fixed;
	top: 0;
	left: -100%;
	width: 80%;
	max-width: 300px;
	height: 100vh;
	background: linear-gradient(180deg, #fffaf5 0%, #f5e7d5 100%);
	z-index: 2100;
	transition: var(--transition);
	padding: 20px;
	box-shadow: var(--shadow);
}
.mobile-drawer.active {
	left: 0;
}
.drawer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(52, 28, 20, 0.48);
	z-index: 2000;
	display: none;
}
.drawer-overlay.active {
	display: block;
}

.mobile-nav li {
	margin-bottom: 15px;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 10px;
}

/* --- Cart Drawer --- */
.cart-drawer {
	position: fixed;
	top: 0;
	right: -100%;
	width: 500px;
	height: 100vh;
	background: var(--surface-color);
	z-index: 2200;
	transition: var(--transition);
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow);
	font-family: var(--font-body);
}
.cart-drawer.active {
	right: 0;
}
@media (max-width: 500px) {
	.cart-drawer {
		width: 100%;
	} /* Mobile fullwidth */
}

.cart-header {
	padding: 20px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.cart-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}
.cart-footer {
	padding: 20px;
	border-top: 1px solid var(--border-color);
	background: linear-gradient(180deg, var(--warm-tint) 0%, var(--accent-color) 100%);
}
.cart-footer .btn,
.cart-footer .btn-outline {
	height: 40px;
	line-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cart-item {
	display: flex;
	gap: 12px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 16px;
	align-items: flex-start;
}
.cart-item img {
	width: 80px;
	height: 110px;
	object-fit: contain;
	border-radius: 8px;
}
.cart-item h4 {
	font-size: 0.95rem;
	margin-bottom: 6px;
}
.cart-item-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: nowrap;
}
.cart-item-line p {
	margin: 0;
	white-space: nowrap;
	color: var(--primary-color);
	font-weight: 600;
}
.cart-item-line .cart-qty-control {
	/* flex: 1 1 auto; */
}
.cart-qty-control .qty-input {
	width: 70px;
}
.cart-qty-control {
	margin-top: 12px;
	display: flex;
	width: 100%;
	max-width: 220px;
	justify-content: space-between;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	height: 40px;
	overflow: hidden;
}
.cart-qty-control .qty-input {
	text-align: center;
	width: 100%;
	padding: 8px 6px;
	border: none;
	background: transparent;
	font-weight: 600;
	height: 40px;
	flex: 1 1 auto;
	border-radius: 0;
}
.cart-qty-control .qty-input:focus {
	box-shadow: none;
	border: none !important;
}

.cart-qty-control .qty-btn {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--surface-color);
	font-size: 16px;
	color: var(--text-color);
	flex: 0 0 40px;
	border-radius: 0;
	border-right: 1px solid var(--border-color);
}
.cart-qty-control .qty-btn:last-child {
	border-right: none;
	border-left: 1px solid var(--border-color);
}
.cart-qty-control .qty-btn:hover {
	background: var(--warm-tint);
	color: var(--primary-color);
}
.cart-remove-btn-lg {
	font-size: 1.2rem;
	line-height: 1;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--danger-color);
	border-radius: 999px;
	background: #fff1ed;
	color: var(--danger-color);
}

/* --- Footer --- */
footer {
	background: linear-gradient(180deg, var(--footer-bg) 0%, #d8bea2 100%);
	padding: 60px 0 20px;
	margin-top: 60px;
	color: var(--text-color);
}
.footer-grid {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	gap: 40px;
}
@media (min-width: 900px) {
	.footer-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
.footer-col h4 {
	margin-bottom: 20px;
	color: var(--heading-color);
}
.footer-links li {
	margin-bottom: 10px;
}
.footer-links a,
.footer-legal a,
.contact-info a,
footer p,
.contact-info li {
	color: var(--text-color);
}
.footer-links a:hover,
.footer-legal a:hover,
.contact-info a:hover {
	color: var(--primary-color);
}
.footer-trust {
	margin-top: 24px;
	padding-top: 12px;
	border-top: 1px solid var(--border-color);
}
.footer-trust h5 {
	font-size: 0.9rem;
	font-weight: 700;
	margin-bottom: 10px;
	color: var(--heading-color);
}
.trust-logos {
	display: grid;
	gap: 12px;
	align-items: center;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.trust-logo {
	background: var(--surface-color);
	border: 1px solid var(--border-color);
	border-radius: 999px;
	padding: 6px 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	width: 100%;
}
.trust-logo img {
	height: 20px;
	width: auto;
	display: block;
}
.copyright {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}
@media (min-width: 900px) {
	.copyright {
		flex-direction: row;
		justify-content: space-between;
	}
}

/* Top Banner Global Component Styles */
.top-banner {
	background: linear-gradient(90deg, #f1d6a3 0%, #eeb58b 45%, #d99857 100%);
	color: var(--heading-color);
	text-align: center;
	padding: 8px 0;
	font-size: 0.9rem;
	position: relative;
	z-index: 1001;
}
.top-banner strong {
	color: var(--primary-color);
	margin-left: 5px;
}
