/* Layout CSS */

/* --- Header --- */
header {
	background-color: var(--surface-color);
	color: var(--text-color);
	height: auto;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: none;
	border-bottom: 1px solid var(--border-color);
}

#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;
}

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

.header-top {
	border-bottom: 1px solid var(--border-color);
}

.header-nav-row {
	background: var(--surface-color);
}

/* Nav Desktop */
.nav-desktop {
	display: none;
	margin-top: 1rem;
}
.nav-desktop ul {
	display: flex;
	align-items: center;
	gap: 28px;
	height: 100%;
	padding: 12px 0;
}
.nav-desktop a {
	display: inline-block;
	position: relative;
	font-weight: 600;
	text-transform: none;
	font-size: 15px;
	letter-spacing: 0.01em;
	padding-bottom: 2px;
}
.nav-desktop a:hover,
.nav-desktop a.active {
	color: var(--primary-color);
}
.nav-desktop a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	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;
}
.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(--accent-color);
}
.header-icon {
	font-size: 1.2rem;
	cursor: pointer;
	position: relative;
	display: flex;
	align-items: center;
}
.count-badge {
	position: absolute;
	top: -5px;
	right: -8px;
	background-color: #ff4444; /* Standard alert color */
	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: none; /* Mobile hidden mainly? Or just icon? Req says "Logo, Nav, Search, Icons". */
	position: relative;
}
.search-box {
	flex: 1 1 auto;
	max-width: 520px;
}
.search-input {
	padding: 8px 15px;
	border-radius: 999px;
	border: 1px solid var(--border-color);
	background: var(--accent-color);
	color: var(--text-color);
}
.search-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: 320px;
	max-height: 360px;
	overflow-y: auto;
	background: var(--surface-color);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	box-shadow: 0 10px 24px rgba(78, 60, 46, 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(--accent-color);
}
.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;
}

/* Desktop Styles */
@media (min-width: 1024px) {
	.nav-desktop {
		display: block;
	}
	.mobile-toggle {
		display: none;
	}
	.search-box {
		display: block;
	}

	.logo img {
		height: 50px;
	}
}

/* --- Mobile Menu Drawer --- */
.mobile-drawer {
	position: fixed;
	top: 0;
	left: -100%;
	width: 80%;
	max-width: 300px;
	height: 100vh;
	background: var(--surface-color);
	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(0, 0, 0, 0.5);
	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: var(--accent-color);
}
.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: 0;
	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(--accent-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 #ef4444;
	border-radius: 999px;
	background: #fff5f5;
}

/* --- Footer --- */
footer {
	background: var(--accent-color);
	padding: 60px 0 20px;
	margin-top: 60px;
}
.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;
}
.footer-links li {
	margin-bottom: 10px;
}
.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, #e2c59f 0%, #ebc3b7 50%, #edd2a8 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;
}
