/* Global product image sizing - ensure all product images fit properly */
.product-image,
.product-card img,
.slider-product-image,
.cart-img,
.image-container img,
.product-image img {
	object-fit: contain !important;
}

/* Product detail modal image sizing */
.product-image {
	max-width: 300px;
	max-height: 300px;
	width: 100%;
	height: auto;
	object-fit: contain;
	background: #ffffff;
}

/* Ensure footer stays below modal overlay */
footer {
	z-index: 900;
	position: relative;
}

/* Custom Toast Notification System */
.toast-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.toast {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	padding: 16px 20px;
	min-width: 300px;
	max-width: 400px;
	display: flex;
	align-items: center;
	gap: 12px;
	transform: translateX(100%);
	transition: all 0.3s ease;
	font-family: 'Inter', sans-serif;
}

.toast.show {
	transform: translateX(0);
}

.toast-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.toast-content {
	flex: 1;
}

.toast-title {
	font-weight: 600;
	font-size: 14px;
	color: #1f2937;
	margin: 0 0 4px 0;
}

.toast-message {
	font-size: 13px;
	color: #6b7280;
	margin: 0;
	line-height: 1.4;
}

.toast-close {
	background: none;
	border: none;
	color: #9ca3af;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	transition: all 0.2s ease;
	font-size: 16px;
	line-height: 1;
}

.toast-close:hover {
	background: #f3f4f6;
	color: #6b7280;
}

/* Toast Types */
.toast-success {
	border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
	color: #10b981;
}

.toast-error {
	border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
	color: #ef4444;
}

.toast-warning {
	border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
	color: #f59e0b;
}

.toast-info {
	border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
	color: #3b82f6;
}

/* Custom Alert Overlay */
.alert-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.alert-overlay.show {
	opacity: 1;
	visibility: visible;
}

.alert-box {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
	padding: 24px;
	max-width: 400px;
	width: 90%;
	text-align: center;
	transform: scale(0.9);
	transition: all 0.3s ease;
}

.alert-overlay.show .alert-box {
	transform: scale(1);
}

.alert-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 16px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
}

.alert-icon.success {
	background: #d1fae5;
	color: #10b981;
}

.alert-icon.error {
	background: #fee2e2;
	color: #ef4444;
}

.alert-icon.warning {
	background: #fef3c7;
	color: #f59e0b;
}

.alert-icon.info {
	background: #dbeafe;
	color: #3b82f6;
}

.alert-title {
	font-size: 18px;
	font-weight: 600;
	color: #1f2937;
	margin: 0 0 8px 0;
}

.alert-message {
	font-size: 14px;
	color: #6b7280;
	margin: 0 0 20px 0;
	line-height: 1.5;
}

.alert-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.alert-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 80px;
}

.alert-btn-primary {
	background: #0000FF;
	color: #ffffff;
}

.alert-btn-primary:hover {
	background: #0000cc;
}

.alert-btn-secondary {
	background: #f3f4f6;
	color: #374151;
}

.alert-btn-secondary:hover {
	background: #e5e7eb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.toast-container {
		top: 10px;
		right: 10px;
		left: 10px;
	}
	
	.toast {
		min-width: auto;
		max-width: none;
	}
	
	.alert-box {
		margin: 20px;
		padding: 20px;
	}
}

/* Signup Modal - polished styles */
#signup-modal {
	--signup-accent: #1e3a8a;
	--signup-border: #e5e7eb;
	--signup-muted: #6b7280;
}

#signup-modal .modal-content,
#signup-modal .modal,
#signup-modal .dialog,
#signup-modal .panel {
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0,0,0,0.18);
	border: 1px solid var(--signup-border);
}

#signup-modal h2,
#signup-modal .title {
	margin: 0 0 12px 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #111827;
}

#signup-modal .subtitle { color: var(--signup-muted); margin-bottom: 16px; }

#signup-modal form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 12px;
}

#signup-modal form .full { grid-column: 1 / -1; }

#signup-modal input[type="text"],
#signup-modal input[type="email"],
#signup-modal input[type="password"],
#signup-modal input[type="tel"] {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--signup-border);
	border-radius: 10px;
	font-size: 14px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

#signup-modal input:focus {
	outline: none;
	border-color: rgba(30,58,138,.6);
	box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}

#signup-modal .actions,
#signup-modal .buttons {
	grid-column: 1 / -1;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 4px;
}

#signup-modal .btn-primary,
#signup-modal button[type="submit"],
#signup-modal .save-btn {
	background: var(--signup-accent);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 10px 16px;
	font-weight: 600;
	cursor: pointer;
}

#signup-modal .btn-primary:hover,
#signup-modal button[type="submit"]:hover,
#signup-modal .save-btn:hover { filter: brightness(1.1); }

#signup-modal .btn-secondary,
#signup-modal .cancel-btn { background: #f3f4f6; color: #374151; border-radius: 10px; }

#signup-modal .oauth { grid-column: 1 / -1; display:flex; gap:8px; margin-top:6px; }

/* Featured Products Slider - Clean Implementation */
.featured-slider {
	position: relative;
	background: #f8f9fa;
	border-radius: 12px;
	padding: 2rem;
	margin: 2rem 0;
	overflow: hidden;
}

.slider-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.slider-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #333;
	margin: 0;
}

.slider-controls {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: rgba(0,0,0,0.5);
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	font-size: 2rem;
	cursor: pointer;
	transition: opacity 0.3s;
	opacity: 0;
}

.slider-prev {
	left: 0;
}

.slider-next {
	right: 0;
	left: auto;
}

.featured-slider:hover .slider-prev,
.featured-slider:hover .slider-next {
	opacity: 1;
}

.slider-arrow:hover {
	background: rgba(0,0,0,0.7);
	opacity: 1;
}

.slider-arrow:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
	opacity: 0.5;
}

.slider-container {
	width: 100%;
	overflow: hidden;
	position: relative;
	padding: 0;
	margin: 0;
	min-height: 350px;
	background: #f8f9fa;
	border-radius: 8px;
}

/* Loading / fallback states */
.slider-loading {
	text-align: center;
	color: #666;
	padding: 2rem 0;
	font-size: 1.1rem;
}

.slider-fallback {
	text-align: center;
	color: #555;
	background: #f8f9fa;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 2rem;
	margin: 1rem 0;
}

.slider-fallback a {
	color: #007bff;
	text-decoration: none;
	font-weight: 600;
}

.slider-fallback a:hover {
	text-decoration: underline;
}

.slider-track {
	display: flex;
	flex-wrap: nowrap;
	transition: transform 0.5s ease;
	will-change: transform;
	height: 100%;
	min-height: 350px;
}

.slider-slide {
	width: 100%;
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	padding: 0;
	margin: 0;
}

/* Desktop: 4 products per slide */
@media (min-width: 1200px) {
	.slider-slide {
		justify-content: space-between;
		gap: 20px;
	}
	
	.slider-product-card {
		flex: 0 0 calc((100% - 60px) / 4);
		margin: 0;
		padding: 1rem;
		box-sizing: border-box;
		min-height: 300px;
		text-align: center;
		background: white;
		border: 1px solid #ddd;
		box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	}
	
	.slider-product-card.hidden {
		display: none;
	}
	
	.slider-arrow {
		opacity: 0;
		transition: opacity 0.3s ease;
	}
	
	.featured-slider:hover .slider-arrow {
		opacity: 0.8;
	}
}

/* Tablet: 2 products per slide */
@media (min-width: 768px) and (max-width: 1199px) {
	.slider-slide {
		justify-content: space-between;
		gap: 20px;
	}
	
	.slider-product-card {
		flex: 0 0 calc((100% - 20px) / 2);
		margin: 0;
		padding: 1rem;
		box-sizing: border-box;
		min-height: 300px;
		text-align: center;
		background: white;
		border: 1px solid #ddd;
		box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	}
}

/* Mobile: 1 product per slide */
@media (max-width: 767px) {
	.slider-slide {
		justify-content: center;
		gap: 0;
	}
	
	.slider-product-card {
		flex: 0 0 90%;
		max-width: 300px;
		margin: 0 auto;
		box-sizing: border-box;
		padding: 1rem;
		min-height: 300px;
		text-align: center;
		background: white;
		border: 1px solid #ddd;
		box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	}
	
	.slider-arrow {
		opacity: 1;
	}
}

.slider-dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

.slider-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #ccc;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
}

.slider-dot.active {
	background: #007bff;
	transform: scale(1.2);
}

.slider-dot:hover {
	background: #999;
}

.slider-dot.active:hover {
	background: #0056b3;
}

/* Product Card Styles for Slider */
.slider-product-card {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 1rem;
	text-align: center;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	border: 1px solid #ddd;
	min-height: 300px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	flex-shrink: 0;
}

.slider-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-product-image-container {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 200px;
	margin-bottom: 1rem;
	overflow: hidden;
	position: relative;
}

.slider-product-image {
	max-width: 100%;
	max-height: 200px;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.slider-product-image:hover {
	transform: scale(1.05);
}

.slider-product-placeholder {
	display: none;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 200px;
	background: #f8f9fa;
	border: 2px dashed #ddd;
	border-radius: 8px;
	color: #666;
	font-size: 0.9rem;
}

.slider-product-title {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #333;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 2.6em;
}

.slider-product-price {
	font-size: 1.1rem;
	font-weight: bold;
	color: #007bff;
	margin-bottom: 1rem;
}

.slider-add-to-cart {
	background: #007bff;
	color: white;
	border: none;
	border-radius: 6px;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	max-width: 150px;
	margin-top: auto;
}

.slider-add-to-cart:hover {
	background: #0056b3;
	transform: translateY(-1px);
}

.slider-add-to-cart:active {
	transform: translateY(0);
}

/* Image container styles */
.image-container {
	height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.image-container img {
	max-height: 100%;
	object-fit: contain;
}

.image-container .placeholder {
	display: none;
	font-style: italic;
	color: gray;
}

/* Force card visibility */
.slider-product-card {
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between !important;
	align-items: center !important;
	height: 300px !important;
	visibility: visible !important;
	opacity: 1 !important;
	background: white !important;
	border: 1px solid #ddd !important;
	border-radius: 8px !important;
	padding: 1rem !important;
	box-sizing: border-box !important;
}

/* Force slider visibility */
.slider-track {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.slider-slide {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100% !important;
}

.slider-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-product-image {
	width: 100%;
	height: 150px;
	object-fit: contain;
	background: #f8f9fa;
	border-radius: 6px;
	margin-bottom: 1rem;
}

.slider-product-placeholder {
	width: 100%;
	height: 150px;
	background: #f8f9fa;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #007bff;
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: 1rem;
	border: 2px dashed #007bff;
}

.slider-product-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.5rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

.slider-product-price {
	font-size: 1.1rem;
	font-weight: 700;
	color: #007bff;
	margin-bottom: 1rem;
}

.slider-add-to-cart {
	width: 100%;
	padding: 0.75rem;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	color: #333;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-top: auto;
}

.slider-add-to-cart:hover {
	background: #007bff;
	color: white;
	border-color: #007bff;
}

.slider-loading {
	text-align: center;
	padding: 2rem;
	color: #666;
}

.slider-error {
	text-align: center;
	padding: 2rem;
	color: #dc3545;
	background: #f8d7da;
	border-radius: 8px;
	margin: 1rem 0;
}

/* Reset */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--primary-blue: #1E3A8A;
	--accent-blue: #3B82F6;
	--light-grey: #F3F4F6;
	--text-grey: #6B7280;
	--dark-grey: #374151;
	--white: #FFFFFF;
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

html, body {
	height: 100%;
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
	color: var(--dark-grey);
	line-height: 1.6;
	background: var(--white);
}

img {
	max-width: 100%;
	display: block;
	object-fit: contain;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.container {
	width: min(1200px, 92%);
	margin: 0 auto;
}

.section {
	padding: 4rem 0;
	background: var(--white);
}

.section-title {
	font-size: 1.75rem;
	font-weight: 700;
	text-align: center;
	color: var(--text-grey);
	margin-bottom: 2rem;
}

.section-sub {
	text-align: center;
	color: var(--text-grey);
	margin-bottom: 1.5rem;
}

/* Header/Nav */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: #f5f5f5;
	box-shadow: var(--shadow);
	z-index: 1000;
}

.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 130px;
	padding: 5px 0;
}

.logo {
	height: 120px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	aspect-ratio: auto;
}
.logo.small {
	height: 80px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	aspect-ratio: auto;
}

.nav-right {
	display: flex;
	align-items: center;
	gap: 1rem;
	justify-content: space-between;
	width: 100%;
}

.nav-links {
	list-style: none;
	display: flex;
	gap: 1rem;
	justify-content: flex-start;
	flex: 1;
}

.nav-links a {
	color: var(--dark-grey) !important;
	text-decoration: none;
	padding: .25rem .5rem;
	border-bottom: 2px solid transparent;
	transition: border-color .2s ease, color .2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
	border-color: var(--accent-blue);
}

.nav-links a.active {
	border-color: var(--accent-blue);
}

/* Checkout Page Styles */
.checkout-container {
	margin-top: 160px;
	padding: 20px;
}

.checkout-container .container {
	max-width: 800px;
	margin: 0 auto;
	background: white;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.summary {
	border: 2px solid #007BFF;
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
}

.summary h3 {
	color: var(--dark-grey);
	margin-top: 0;
}

.summary-item {
	display: flex;
	justify-content: space-between;
	margin: 10px 0;
	padding: 5px 0;
	border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
	border-bottom: none;
	font-weight: bold;
	font-size: 1.1em;
}

.checkout-container .btn {
	background: #007BFF;
	color: white;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	text-decoration: none;
	display: inline-block;
}

.checkout-container .btn:hover {
	background: #0056b3;
}

.form-group {
	margin: 15px 0;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: var(--dark-grey);
}

.form-group input, .form-group textarea, .form-group select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.form-row {
	display: flex;
	gap: 15px;
}

.form-row .form-group {
	flex: 1;
}

.shipping-info {
	background: #e3f2fd;
	padding: 15px;
	border-radius: 4px;
	margin: 15px 0;
	border-left: 4px solid #007BFF;
}

/* Profile Dropdown */
.profile-dropdown {
	position: relative;
}

.profile-submenu {
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--primary-blue);
	border: 1px solid var(--accent-blue);
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 0.5rem 0;
	min-width: 160px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s ease;
	z-index: 1000;
}

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

.profile-submenu li {
	list-style: none;
	margin: 0;
}

.profile-submenu a {
	display: block;
	padding: 0.5rem 1rem;
	color: var(--white) !important;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.profile-submenu a:hover {
	background: var(--accent-blue);
}

/* User Welcome */
.user-welcome {
	color: var(--white);
	font-size: 0.9rem;
	padding: 0.5rem 1rem;
	background: var(--accent-blue);
	border-radius: 4px;
	display: none;
}

/* Cart Styles */
.cart-grid {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.cart-item {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e5e7eb;
}

.cart-left {
	flex: 0 0 100px;
	display: flex;
	align-items: center;
}

.cart-img {
	width: 100px;
	height: 66px;
	object-fit: contain;
	border-radius: 6px;
	background: #fff;
	border: 1px solid #e5e7eb;
}

.cart-middle {
	flex: 1;
	text-align: center;
}

.price-text {
	color: #374151;
	margin-top: 0.25rem;
}

.cart-right {
	flex: 0 0 180px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	gap: 0.35rem;
}

.qty-controls {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.qty-btn {
	width: 28px;
	height: 28px;
	border: 1px solid #d1d5db;
	background: #fff;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: bold;
}

.qty-btn:hover {
	background: #f3f4f6;
}

.qty-input {
	width: 56px;
	text-align: center;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	padding: 0.25rem;
}

.subtotal {
	font-weight: bold;
	color: #1f2937;
}

.remove-btn {
	font-size: 0.8rem;
	padding: 0.25rem 0.5rem;
}

.cart-summary {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1.5rem;
	margin-top: 2rem;
}

.nav-search {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.nav-search input {
	padding: .5rem .75rem;
	border: 2px solid var(--accent-blue);
	border-radius: 6px;
	background: var(--white);
	min-width: 180px;
}

.nav-search button {
	padding: .5rem .75rem;
	background: var(--accent-blue);
	color: var(--white);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	box-shadow: var(--shadow);
	transition: transform .15s ease;
}

.nav-search button:hover {
	transform: scale(1.05);
}

.cart-link {
	color: var(--white);
	text-decoration: none;
	font-size: 1.25rem;
	position: relative;
}

.cart-total {
	color: var(--white);
	font-weight: 700;
	font-size: 0.9rem;
	display: block;
	text-align: center;
	margin-top: 2px;
}

/* Cart container for right alignment */
.cart-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.cart-badge {
	background: var(--primary-blue);
	color: var(--white);
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	position: relative;
	top: -8px;
	left: -8px;
	min-width: 20px;
}

.nav-toggle {
	display: none;
	background: transparent;
	border: none;
	width: 40px;
	height: 40px;
	position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
	content: '';
	display: block;
	background: var(--white);
	height: 2px;
	width: 22px;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	transition: transform .2s ease;
}

.hamburger {
	top: 50%;
	transform: translate(-50%, -50%);
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Hero */
.hero {
    margin-top: 0;
    position: relative;
    height: 40vh;
    min-height: 300px;
    background: linear-gradient(to bottom, var(--primary-blue), var(--accent-blue));
    color: var(--white);
    overflow: hidden;
    /* Ensure hero starts exactly where menu ends */
    padding-top: 80px;
    box-sizing: border-box;
}

.hero-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .7;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(30,58,138,.6), rgba(59,130,246,.3));
}

.hero-content {
	position: relative;
	height: 100%;
	display: grid;
	place-content: center;
	text-align: center;
	gap: 1rem;
	/* Ensure content is always visible */
	padding: 3rem 1rem;
	box-sizing: border-box;
}

.hero h1 {
	font-size: 2.5rem;
	font-weight: 700;
}

.hero-sub {
	color: #E5E7EB;
    font-size: 1.25rem;
    line-height: 1.6;
}

/* Hero Search */
.hero-search {
	margin: 2rem 0;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.hero-search-form {
	display: flex;
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-search-form input {
	flex: 1;
	padding: 1rem 1.5rem;
	border: none;
	font-size: 1rem;
	outline: none;
	color: #333;
}

.hero-search-form button {
	background: var(--primary-blue);
	color: white;
	border: none;
	padding: 1rem 1.5rem;
	cursor: pointer;
	font-size: 1.2rem;
	transition: background-color 0.2s ease;
}

.hero-search-form button:hover {
	background: var(--secondary-blue);
}

/* Featured Search */
.featured-search-form button:hover {
	background: var(--secondary-blue);
}

/* Responsive featured search */
@media (max-width: 768px) {
	.featured-search {
		max-width: 100% !important;
		min-width: 200px !important;
	}
	
	.featured-search-form {
		flex-direction: column !important;
	}
	
	.featured-search-form input {
		border-radius: 8px 8px 0 0 !important;
	}
	
	.featured-search-form button {
		border-radius: 0 0 8px 8px !important;
	}
}

/* Buttons */
.btn {
	display: inline-block;
	padding: .75rem 1.25rem;
	border-radius: 10px;
	text-decoration: none;
	font-weight: 600;
	box-shadow: var(--shadow);
	transition: transform .15s ease, background-color .15s ease, color .15s ease;
}

.btn-cta {
	background: var(--accent-blue);
	color: var(--white);
}

.btn-cta:hover { transform: scale(1.05); }

.btn-primary {
	background: var(--accent-blue);
	color: var(--white);
	border: none;
	cursor: pointer;
}

.btn-secondary {
	background: var(--light-grey);
	color: var(--accent-blue);
	border: none;
	cursor: pointer;
}

.btn-secondary:hover,
.btn-primary:hover { transform: scale(1.05); }

/* Featured */
.featured { background: var(--white); }

.product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.product-card {
	border: 1px solid var(--dark-grey);
	border-color: rgba(55,65,81,.15);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform .15s ease, box-shadow .15s ease;
	background: var(--white);
}

.product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
}

.product-card figure { height: 220px; overflow: hidden; }
.product-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.product-card figure {
	margin: 0;
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background: #f3f4f6;
}

.image-placeholder {
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	height: 200px;
	border-radius: 8px;
}

.product-card h3 {
	font-size: 1.25rem;
	margin: 1rem;
	color: var(--dark-grey);
}

.product-card .price {
	margin: 0 1rem 1rem;
	color: var(--accent-blue);
	font-weight: 700;
}

.product-card .btn {
	margin: 0 1rem 1.25rem;
}

/* Categories */
.categories { background: var(--light-grey); }
.category-row {
	display: flex;
	gap: .75rem;
	flex-wrap: wrap;
	justify-content: center;
}
.category-pill {
	display: inline-block;
	padding: .4rem .8rem;
	border-radius: 999px;
	background: #E5E7EB;
	color: var(--dark-grey);
	text-decoration: none;
	box-shadow: var(--shadow);
	transition: transform .15s ease, background-color .15s ease;
	font-size: 0.875rem;
	margin: 0.25rem;
}
.category-pill.primary { background: var(--accent-blue); color: var(--white); }
.category-pill:hover { transform: translateY(-2px); }

/* Newsletter */
.newsletter { background: var(--light-grey); }
.newsletter-form {
	display: flex;
	gap: .75rem;
	justify-content: center;
	flex-wrap: wrap;
}
.newsletter-form input {
	padding: .75rem 1rem;
	border: 2px solid #D1D5DB;
	border-radius: 8px;
	min-width: 260px;
}
.newsletter-form input:focus { border-color: var(--accent-blue); outline: none; }

/* Footer */
.site-footer {
	background: var(--primary-blue);
	color: var(--white);
	padding: 2.5rem 0;
	border-top: 1px solid rgba(55,65,81,.3);
}

/* Social links */
.footer-links.social li a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.footer-links.social svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	align-items: start;
}

.footer-col h3 { margin-bottom: 1rem; }
.footer-links { list-style: none; }
.footer-links li { margin: .35rem 0; }
.footer-links a { color: var(--white); text-decoration: none; opacity: .9; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

.footer-logo { display: inline-block; margin-bottom: .75rem; }

/* Typography */
	main, p, li { font-size: 1rem; }
	main { margin-top: 140px; }
	
	/* Exception for homepage - hero should start immediately after header */
	main#home { margin-top: 0; }

/* Responsive */
@media (max-width: 1024px) {
	.product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Admin header buttons */
.nav-button {
    display: inline-block;
    padding: .5rem .9rem;
    background: var(--accent-blue);
    color: var(--white) !important;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-left: .5rem;
}
.nav-button:hover { filter: brightness(1.08); }

/* Large desktop screens - ensure hero is never cut off */
@media (min-width: 1920px) {
	.hero {
		margin-top: 0;
		height: 45vh;
		min-height: 350px;
		padding-top: 100px;
	}
	main#home { margin-top: 0; }
}

/* Medium desktop screens */
@media (min-width: 1440px) and (max-width: 1919px) {
	.hero {
		margin-top: 0;
		height: 42vh;
		min-height: 320px;
		padding-top: 90px;
	}
	main#home { margin-top: 0; }
}

/* Standard desktop screens */
@media (min-width: 1024px) and (max-width: 1439px) {
	.hero {
		margin-top: 0;
		height: 40vh;
		min-height: 300px;
		padding-top: 80px;
	}
	main#home { margin-top: 0; }
}

@media (max-width: 768px) {
	.nav-toggle { display: inline-block; }
	.nav-right { 
		align-items: flex-start; 
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	.nav-links {
		position: absolute;
		top: 100px;
		left: 0;
		right: 0;
		background: #f5f5f5;
		flex-direction: column;
		padding: 1rem;
		display: none;
	}
	.nav-links.open { display: flex; }
	.nav-search { display: none; }
	.product-grid { grid-template-columns: 1fr; }
	.hero { 
		height: 35vh; 
		min-height: 250px; 
		margin-top: 0;
		padding-top: 70px;
	}
	main#home { margin-top: 0; }
	.hero h1 { font-size: 2rem; }
	.footer-grid { grid-template-columns: 1fr; }
	.logo { 
		height: 44px; 
		width: auto;
		max-width: 100%;
		object-fit: contain;
		aspect-ratio: auto;
	}
	
	/* Mobile Cart Styles */
	.cart-grid {
		display: flex;
		flex-direction: column;
		gap: 1rem;
	}
	
	.cart-item {
		display: flex;
		flex-direction: column;
		background: #fff;
		border: 1px solid #e5e7eb;
		border-radius: 8px;
		padding: 1rem;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}
	
	.cart-left {
		display: flex;
		justify-content: center;
		margin-bottom: 1rem;
	}
	
	.cart-img {
		width: 120px !important;
		height: 80px !important;
		object-fit: contain;
		border-radius: 6px;
		background: #fff;
		border: 1px solid #e5e7eb;
	}
	
	.cart-middle {
		text-align: center;
		margin-bottom: 1rem;
	}
	
	.cart-right {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.5rem;
	}
	
	.qty-controls {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		margin-bottom: 0.5rem;
	}
	
	.qty-btn {
		width: 32px;
		height: 32px;
		border: 1px solid #d1d5db;
		background: #fff;
		border-radius: 4px;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		font-size: 1rem;
		font-weight: bold;
	}
	
	.qty-input {
		width: 60px !important;
		text-align: center;
		border: 1px solid #d1d5db;
		border-radius: 4px;
		padding: 0.25rem;
	}
	
	.remove-btn {
		width: 100%;
		max-width: 120px;
	}
	
	.cart-summary {
		position: sticky;
		bottom: 0;
		background: #fff;
		border-top: 1px solid #e5e7eb;
		padding: 1rem;
		margin-top: 1rem;
	}
	
	/* Mobile Navigation Adjustments */
	.cart-link {
		font-size: 1.1rem;
	}
	
	.cart-total {
		font-size: 0.8rem;
		display: block;
		text-align: center;
		margin-top: 0.25rem;
	}
	
	.signup-btn {
		font-size: 0.9rem;
		padding: 0.5rem 0.75rem;
	}
	
	.user-welcome {
		font-size: 0.8rem;
		padding: 0.4rem 0.6rem;
	}
	
	/* Mobile Product Grid */
	.product-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	
	.product-card {
		margin-bottom: 1rem;
	}
	
	
	.slider-arrow {
		display: none;
	}
	
	.slider-dots {
		margin-top: 1rem;
		display: flex;
		justify-content: center;
		gap: 0.5rem;
	}
	
	/* Mobile Profile Dropdown */
	.profile-dropdown:hover .profile-submenu {
		opacity: 0;
		visibility: hidden;
	}
	
	.profile-dropdown:active .profile-submenu,
	.profile-dropdown:focus .profile-submenu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
	
	/* Mobile Search */
	.nav-search input {
		width: 120px;
		font-size: 0.9rem;
	}
	
	/* Mobile Buttons */
	.btn {
		padding: 0.75rem 1rem;
		font-size: 0.9rem;
	}
	
	.btn-primary {
		width: 100%;
		max-width: 200px;
	}
}

/* Spinner */
.spinner {
	border: 4px solid #E5E7EB;
	border-top: 4px solid var(--primary-blue);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 1rem auto;
}
.loading-text { text-align: center; color: var(--text-grey); }

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Toast */
.toast {
	position: fixed;
	top: 20px;
	right: 20px;
	background: var(--primary-blue);
	color: var(--white);
	padding: 1rem;
	border-radius: 6px;
	box-shadow: 0 10px 15px -3px rgba(0,0,0,.2);
	opacity: 0;
	transition: opacity 200ms ease-in-out;
	z-index: 1001;
}
.toast.show { opacity: 1; }

.filters {
	display: flex;
	gap: .75rem;
	justify-content: center;
	align-items: center;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}
.filters select {
	padding: .5rem .75rem;
	border: 2px solid #D1D5DB;
	border-radius: 8px;
	background: var(--white);
}

.subcategory-badge {
	background: var(--accent-blue);
	color: var(--white);
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.875rem;
	display: inline-block;
	margin: 0 1rem .75rem;
}

.upload-btn {
	background: var(--accent-blue);
	color: var(--white);
	padding: .5rem 1rem;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: var(--shadow);
}
.upload-btn:focus { outline: 3px solid #93C5FD; outline-offset: 2px; }

.login-btn { background: #28a745; color: var(--white); padding: .5rem .9rem; border: none; border-radius: 8px; cursor: pointer; box-shadow: var(--shadow); margin-right: 0.5rem; }
.login-btn:hover { background: #218838; }

.signup-btn { background: var(--accent-blue); color: var(--white); padding: .5rem .9rem; border: none; border-radius: 8px; cursor: pointer; box-shadow: var(--shadow); }

/* NEW SLIDER STYLES - Clean Implementation */
.slider-wrapper {
	position: relative;
	width: 100%;
	margin: 2rem 0;
}

.slider-container {
	width: 100%;
	overflow: hidden;
	position: relative;
	border-radius: 8px;
	background: #f8f9fa;
	min-height: 400px;
}

.slider-track {
	display: flex;
	transition: transform 0.3s ease;
	height: 100%;
}

.slider-slide {
	width: 100%;
	flex-shrink: 0;
	display: flex;
	gap: 1rem;
	padding: 1rem;
	box-sizing: border-box;
}

.slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: white;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 1.5rem;
	cursor: pointer;
	z-index: 10;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.slider-btn:hover {
	background: rgba(0, 0, 0, 0.9);
	transform: translateY(-50%) scale(1.1);
}

.slider-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: translateY(-50%);
}

.slider-btn-prev {
	left: 10px;
}

.slider-btn-next {
	right: 10px;
}

.slider-dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.slider-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: none;
	background: #ccc;
	cursor: pointer;
	transition: background 0.3s ease;
}

.slider-dot.active {
	background: #007bff;
}

.slider-dot:hover {
	background: #007bff;
}

/* Product Card Styles */
.product-card {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 1rem;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 350px;
	box-sizing: border-box;
}

.product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
	height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
	border-radius: 4px;
	margin-bottom: 1rem;
	overflow: hidden;
}

.product-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	width: auto;
	height: auto;
}

.product-image .no-image {
	color: #666;
	font-style: italic;
	font-size: 0.9rem;
}

.product-name {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	color: #333;
	line-height: 1.3;
}

.product-price {
	font-size: 1.2rem;
	font-weight: 700;
	color: #007bff;
	margin: 0 0 1rem 0;
}

.add-to-cart-btn {
	background: #007bff;
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: background 0.3s ease;
	width: 100%;
}

.add-to-cart-btn:hover {
	background: #0056b3;
}

/* Responsive Design */
@media (min-width: 1200px) {
	.slider-slide {
		justify-content: space-between;
	}
	
	.product-card {
		flex: 0 0 calc(25% - 0.75rem);
	}
}

@media (min-width: 768px) and (max-width: 1199px) {
	.slider-slide {
		justify-content: space-between;
	}
	
	.product-card {
		flex: 0 0 calc(50% - 0.5rem);
	}
}

@media (max-width: 767px) {
	.slider-slide {
		justify-content: center;
	}
	
	.product-card {
		flex: 0 0 90%;
		max-width: 300px;
	}
	
	.slider-btn {
		width: 40px;
		height: 40px;
		font-size: 1.2rem;
	}
	
	.slider-btn-prev {
		left: 5px;
	}
	
	.slider-btn-next {
		right: 5px;
	}
}

/* Error State */
.slider-error {
	text-align: center;
	padding: 2rem;
	color: #666;
	background: #f8f9fa;
	border-radius: 8px;
}

.modal { background: rgba(0,0,0,0.5); position: fixed; inset: 0; display: none; justify-content: center; align-items: center; z-index: 1100; }
.modal[hidden] { display: none; }
.modal:not([hidden]) { display: flex; }
.modal-content { background: var(--light-grey); padding: 2rem; border-radius: 12px; width: min(560px, 92%); box-shadow: 0 10px 25px rgba(0,0,0,.25); }

.price { font-weight: 700; color: var(--accent-blue); margin: 0 .0 1rem; }

.product-card .btn[disabled] { opacity: .5; cursor: not-allowed; }

.admin-dashboard { padding: 2rem; }
.upload-section { background: var(--light-grey); padding: 1.5rem; border-radius: 8px; margin: 1rem 0; }
.upload-status { color: var(--text-grey); margin-top: 0.5rem; }

/* Extra small screens - ensure hero text is never cut off */
@media (max-width: 480px) {
	.hero { 
		height: 40vh; 
		min-height: 280px; 
		padding-top: 80px;
	}
	.hero h1 { font-size: 1.8rem; }
}

/* Full-screen image viewer */
.fullscreen-image-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10001;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.fullscreen-image-container {
	position: relative;
	width: 100vw;
	height: 100vh;
	padding: 60px 80px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fullscreen-image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.fullscreen-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
	z-index: 10002;
}

.fullscreen-close:hover {
	background: rgba(0, 0, 0, 0.9);
}

.fullscreen-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: white;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
	z-index: 10002;
}

.fullscreen-nav:hover {
	background: rgba(0, 0, 0, 0.9);
}

.fullscreen-nav.prev {
	left: 20px;
}

.fullscreen-nav.next {
	right: 20px;
}

.fullscreen-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	z-index: 10002;
}

/* Make product images clickable */
.product-image,
.slider-product-image,
.cart-img {
	cursor: pointer;
	transition: transform 0.3s ease;
}

.product-image:hover,
.slider-product-image:hover,
.cart-img:hover {
	transform: scale(1.05);
}

/* Save button loading state */
.btn-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.btn-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #ffffff;
	border-top: 2px solid transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Progress indicator */
.save-progress {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: 20px 30px;
	border-radius: 8px;
	z-index: 10002;
	text-align: center;
}

.save-progress.show {
	display: block;
}

.save-progress-spinner {
	width: 30px;
	height: 30px;
	border: 3px solid #ffffff;
	border-top: 3px solid transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 10px;
}

.save-progress-text {
	font-size: 14px;
	margin-top: 10px;
}
