/**
 * FoodOrder public styles – fade animations, responsive grid, CSS variables.
 */

:root {
	--food-primary: #2c7da0;
	--food-secondary: #61a5c2;
	--food-accent: #ffb703;
	--food-bg-light: #f8f9fa;
	--food-text-dark: #2d3e50;
	--food-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
	--food-radius: 1rem;
	--food-header-height: 64px;
}

/* Fade animations – activated by IntersectionObserver adding .is-visible */
.fade-up {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.fade-up.delay-1 { transition-delay: 0.2s; }
.fade-up.delay-2 { transition-delay: 0.4s; }

/* Landing container */
.food-landing-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem 3rem;
}

.food-landing-container--hero {
	max-width: none;
	padding: 0 0 4rem;
}

/* Hero – premium */
.food-hero--premium {
	position: relative;
	min-height: 52vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.5rem 3.5rem;
	margin-bottom: 0;
	border-radius: 0;
	text-align: center;
	color: #fff;
	overflow: hidden;
	background: linear-gradient(135deg, var(--food-primary) 0%, var(--food-secondary) 55%, #1a1a2e 100%);
}

.food-hero-bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 20% 20%, rgba(255, 183, 3, 0.25), transparent 45%),
		radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.12), transparent 40%);
	z-index: 0;
}

.food-hero--premium .food-hero-overlay {
	background: rgba(0, 0, 0, 0.35);
	z-index: 1;
}

.food-hero--premium .food-hero-content {
	position: relative;
	z-index: 2;
	max-width: 820px;
}

.food-hero-badge {
	display: inline-block;
	padding: 0.35rem 0.9rem;
	margin-bottom: 1.25rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.food-hero--premium h1 {
	font-size: clamp(2rem, 5vw, 3.25rem);
	line-height: 1.15;
	margin: 0 0 1rem;
	color: #fff;
}

.food-hero-lead {
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	opacity: 0.95;
	max-width: 640px;
	margin: 0 auto 1.75rem;
}

.food-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-bottom: 2rem;
}

.food-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.5rem;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.food-btn--primary {
	background: var(--food-accent);
	color: #1a1a2e;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.food-btn--primary:hover {
	transform: translateY(-2px);
	color: #1a1a2e;
}

.food-btn--ghost {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.6);
}

.food-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.food-hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.food-hero-stats li {
	min-width: 120px;
}

.food-hero-stats strong {
	display: block;
	font-size: 1.35rem;
}

.food-hero-stats span {
	font-size: 0.85rem;
	opacity: 0.85;
}

.food-hero-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	max-width: 1100px;
	margin: -2.5rem auto 2.5rem;
	padding: 0 1.5rem;
	position: relative;
	z-index: 3;
}

.food-feature-card {
	background: #fff;
	border-radius: var(--food-radius);
	padding: 1.5rem;
	box-shadow: var(--food-shadow);
	text-align: center;
	color: var(--food-text-dark);
}

.food-feature-icon {
	font-size: 2rem;
	display: block;
	margin-bottom: 0.5rem;
}

.food-feature-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}

.food-feature-card p {
	margin: 0;
	font-size: 0.95rem;
	opacity: 0.85;
}

.food-menu-header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 2rem;
	padding: 0 1rem;
}

.food-menu-header h2 {
	font-size: 2rem;
	margin-bottom: 0.5rem;
	color: var(--food-text-dark);
}

.food-menu-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* Language switcher */
.food-lang-switcher {
	display: inline-flex;
	align-items: center;
	margin-bottom: 1rem;
}

.food-menu-toolbar,
.food-status-toolbar,
.food-hero-lang {
	display: none;
}

/* Sticky category navigation under header */
.food-category-tabs-wrap {
	position: sticky;
	top: var(--food-header-height, 64px);
	z-index: 900;
	margin: 0 -1rem 1.25rem;
	padding: 0.65rem 1rem;
	background: rgba(245, 247, 250, 0.96);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.food-category-tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.5rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	margin-bottom: 0;
	padding-bottom: 0.15rem;
}

.food-category-tabs::-webkit-scrollbar {
	display: none;
}

.food-cat-tab {
	flex-shrink: 0;
	scroll-snap-align: start;
	min-height: 44px;
	padding: 0.65rem 1.15rem;
}

.food-lang-select {
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: #fff;
	font-size: 0.95rem;
	cursor: pointer;
}

.food-hero-lang .food-lang-select {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
}

@media (max-width: 768px) {
	.food-hero-features {
		grid-template-columns: 1fr;
		margin-top: 0;
	}

	.food-hero--premium {
		min-height: auto;
		padding: 2.5rem 1rem 2.75rem;
	}

	.food-hero-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.food-btn {
		width: 100%;
		min-height: 48px;
	}

	.food-hero-stats {
		gap: 1rem;
	}

	.food-hero-stats li {
		min-width: calc(50% - 0.5rem);
		flex: 1 1 calc(50% - 0.5rem);
	}

	.food-menu-header h2 {
		font-size: 1.6rem;
	}

	.food-product-image img {
		height: 180px;
	}

	.food-add-to-cart {
		min-height: 48px;
		font-size: 1rem;
	}

	.food-options-modal {
		align-items: flex-end;
	}

	.food-options-modal-inner {
		width: 100%;
		max-width: none;
		border-radius: 1rem 1rem 0 0;
		max-height: 90vh;
		padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
	}

	.food-options-actions button {
		min-height: 48px;
	}

	.food-cart-sidebar {
		width: 100%;
		right: -100%;
		padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
	}

	.food-cart-icon {
		bottom: calc(16px + env(safe-area-inset-bottom, 0));
		right: 16px;
		width: 58px;
		height: 58px;
	}

	body.food-ordering-menu-page .food-cart-icon {
		bottom: calc(16px + env(safe-area-inset-bottom, 0));
	}

	.food-form-field input,
	.food-form-field textarea,
	.food-form-field select {
		font-size: 16px;
		min-height: 48px;
	}

	.food-checkout-button {
		min-height: 52px;
		font-size: 1.05rem;
	}

	.food-status-page {
		margin: 1rem auto;
		padding: 1rem;
	}

	.food-status-page input,
	.food-status-page button {
		font-size: 16px;
		min-height: 44px;
	}

	.food-order-history input,
	.food-order-history button {
		width: 100%;
		margin-bottom: 0.5rem;
	}
}

/* Hero (legacy) */
.food-hero {
	position: relative;
	background: var(--food-primary);
	padding: 4rem 2rem;
	text-align: center;
	color: #fff;
	border-radius: 0 0 2rem 2rem;
	margin-bottom: 2rem;
	overflow: hidden;
}

.food-hero-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
	border-radius: inherit;
}

.food-hero-content {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	z-index: 1;
}

.food-hero-content h1 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	color: #fff;
}

.food-hero-content p {
	font-size: 1.2rem;
}

/* Closed notice */
.food-closed-notice {
	background: #fff3cd;
	color: #856404;
	border: 1px solid #ffc107;
	border-radius: var(--food-radius);
	padding: 1rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

/* Category tabs */
.food-cat-tab {
	background: transparent;
	border: 2px solid var(--food-primary);
	padding: 0.6rem 1.5rem;
	border-radius: 40px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	color: var(--food-primary);
}

.food-cat-tab.active,
.food-cat-tab:hover {
	background: var(--food-primary);
	color: #fff;
}

/* Product grid – explicit breakpoints per spec */
.food-products-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) and (max-width: 1199px) {
	.food-products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1200px) {
	.food-products-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.food-product-card {
	background: #fff;
	border-radius: var(--food-radius);
	overflow: hidden;
	box-shadow: var(--food-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.food-product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.food-product-image img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.food-product-info {
	padding: 1rem;
}

.food-product-name {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.food-product-desc {
	color: #666;
	font-size: 0.9rem;
	margin: 0 0 0.5rem;
}

.food-product-price {
	font-size: 1.3rem;
	font-weight: bold;
	color: var(--food-primary);
	margin: 0.5rem 0;
}

.food-add-to-cart {
	background: var(--food-primary);
	color: #fff;
	border: none;
	padding: 0.6rem 1rem;
	border-radius: 2rem;
	cursor: pointer;
	width: 100%;
	font-weight: bold;
	transition: background 0.2s;
}

.food-add-to-cart:hover:not(:disabled) {
	background: var(--food-secondary);
}

.food-add-to-cart:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.food-add-to-cart.is-added {
	background: var(--food-accent);
	color: #000;
}

/* Options modal */
.food-options-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1002;
	display: flex;
	align-items: center;
	justify-content: center;
}

.food-options-modal[hidden] {
	display: none;
}

.food-options-modal-inner {
	background: #fff;
	border-radius: var(--food-radius);
	padding: 1.5rem;
	max-width: 420px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
}

.food-options-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.food-options-actions button {
	flex: 1;
	padding: 0.6rem;
	border-radius: 0.5rem;
	cursor: pointer;
}

.food-options-confirm {
	background: var(--food-primary);
	color: #fff;
	border: none;
}

.food-options-cancel {
	background: #eee;
	border: 1px solid #ccc;
}

/* Cart sidebar */
.food-cart-sidebar {
	position: fixed;
	top: 0;
	right: -400px;
	width: 380px;
	height: 100%;
	background: #fff;
	box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
	padding: 1rem;
	overflow-y: auto;
}

.food-cart-sidebar.open {
	right: 0;
}

.food-cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.food-close-cart {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	line-height: 1;
}

.food-cart-items {
	flex: 1;
	overflow-y: auto;
}

.food-cart-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid #eee;
	gap: 0.5rem;
}

.food-cart-item-name {
	flex: 1;
	font-size: 0.9rem;
}

.food-cart-item-price {
	font-weight: 600;
	white-space: nowrap;
}

.cart-remove {
	background: #fee;
	border: none;
	color: #c00;
	cursor: pointer;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	font-size: 0.8rem;
}

.food-cart-total {
	padding: 1rem 0;
	font-size: 1.1rem;
	border-top: 2px solid #eee;
	margin-top: 0.5rem;
}

.food-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
}

.food-cart-overlay[hidden] {
	display: none;
}

.food-cart-icon {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: var(--food-primary);
	color: #fff;
	width: 55px;
	height: 55px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	z-index: 1001;
	border: none;
}

.food-cart-count {
	position: absolute;
	top: -5px;
	right: -5px;
	background: var(--food-accent);
	color: #000;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	font-size: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

/* Checkout form */
.food-checkout-form {
	margin-top: 1rem;
}

.food-form-field {
	margin-bottom: 0.75rem;
}

.food-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
	font-size: 0.9rem;
}

.food-form-field .required {
	color: #c00;
}

.food-form-field input,
.food-form-field textarea {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 0.5rem;
	font-size: 1rem;
	box-sizing: border-box;
}

.food-form-errors {
	background: #fee;
	color: #c00;
	padding: 0.75rem;
	border-radius: 0.5rem;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.food-checkout-button {
	background: var(--food-primary);
	color: #fff;
	border: none;
	padding: 0.75rem;
	border-radius: 2rem;
	cursor: pointer;
	width: 100%;
	font-weight: bold;
	font-size: 1rem;
	margin-top: 0.5rem;
	transition: background 0.2s;
}

.food-checkout-button:hover:not(:disabled) {
	background: var(--food-secondary);
}

.food-checkout-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Status page */
.food-status-page {
	max-width: 600px;
	margin: 2rem auto;
	padding: 1.5rem;
}

.food-status-timeline {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
}

.food-status-timeline li {
	padding: 0.5rem 0;
	border-left: 3px solid var(--food-primary);
	padding-left: 1rem;
	margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 767px) {
	.food-hero-content h1 {
		font-size: 1.8rem;
	}
}

body.food-ordering-menu-page .food-header-cart-btn {
	display: inline-flex;
}

body.food-ordering-menu-page #food-header-cart-btn[hidden] {
	display: none !important;
}

@media (min-width: 992px) {
	body.food-ordering-menu-page .food-cart-icon {
		display: none;
	}
}

@media (max-width: 991px) {
	body.food-ordering-menu-page .food-header-cart-btn {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fade-up {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.food-cart-sidebar {
		transition: none;
	}
}
