/* CSS Variables for Premium Theme */
:root {
	--primary-color: #e62623;
	--primary-dark: #b81c1a;
	--bg-color: #121212;
	--section-bg: #1e1e1e;
	--card-bg: #252525;
	--text-light: #f5f5f5;
	--text-muted: #aaaaaa;
	--font-main: "Montserrat", sans-serif;
	--font-heading: "Playfair Display", serif;
}

/* Basic Reset & Smooth Scroll */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body {
	font-family: var(--font-main);
	background-color: var(--bg-color);
	color: var(--text-light);
	line-height: 1.6;
	overflow-x: hidden;
}

/* --- Navigation Bar --- */
header {
	position: fixed;
	top: 0;
	width: 100%;
	background: rgba(18, 18, 18, 0.95);
	backdrop-filter: blur(10px);
	z-index: 1000;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	transition: all 0.3s ease;
}

nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 5%;
	max-width: 1400px;
	margin: auto;
}

.logo {
	font-family: var(--font-heading);
	font-size: 28px;
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 1px;
}

.nav-links {
	list-style: none;
	display: flex;
	gap: 30px;
	align-items: center;
}

.nav-links li a {
	color: var(--text-light);
	text-decoration: none;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	transition: color 0.3s ease;
}

.nav-links li a:hover {
	color: var(--primary-color);
}

.nav-right {
	display: flex;
	align-items: center;
	gap: 20px;
}

/* Online Order Button styling */
.btn-online-order {
	background-color: var(--primary-color);
	color: #ffffff;
	padding: 10px 24px;
	border-radius: 30px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(230, 38, 35, 0.3);
}

.btn-online-order:hover {
	background-color: var(--primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(230, 38, 35, 0.5);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
	display: none;
	cursor: pointer;
}

.hamburger div {
	width: 25px;
	height: 3px;
	background-color: var(--text-light);
	margin: 5px;
	transition: all 0.3s ease;
}

/* --- Hero Section Fix --- */
#hero {
	width: 100vw;
	max-width: 100%;
	height: 100vh;
	background:
		linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
		url("images/b1.jpg") center/cover no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0 20px;
	margin: 0;
}

.hero-content h1 {
	font-family: var(--font-heading);
	font-size: 4.5rem;
	margin-bottom: 20px;
	color: var(--text-light);
	line-height: 1.1;
}

.hero-content h1 span {
	color: var(--primary-color);
	font-style: italic;
}

.hero-content p {
	font-size: 1.2rem;
	color: var(--text-muted);
	margin-bottom: 40px;
	max-width: 650px;
	margin-inline: auto;
}

.hero-buttons {
	display: flex;
	gap: 20px;
	justify-content: center;
	flex-wrap: wrap;
}

.btn {
	display: inline-block;
	padding: 15px 35px;
	background-color: var(--primary-color);
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	border-radius: 4px;
	transition:
		background 0.3s,
		transform 0.3s;
}

.btn:hover {
	background-color: var(--primary-dark);
	transform: translateY(-3px);
}

.btn-outline {
	background-color: transparent;
	border: 2px solid var(--primary-color);
	color: var(--primary-color);
}

.btn-outline:hover {
	background-color: var(--primary-color);
	color: #ffffff;
}

/* --- Common Section Styles --- */
section {
	padding: 100px 5%;
	max-width: 1400px;
	margin: auto;
	overflow: hidden;
}

.section-title {
	text-align: center;
	font-family: var(--font-heading);
	font-size: 2.8rem;
	margin-bottom: 60px;
	color: var(--primary-color);
}

.section-bg {
	background-color: var(--section-bg);
	max-width: 100%;
}

/* --- About Us --- */
.about-content {
	display: flex;
	align-items: center;
	gap: 60px;
}

.about-text {
	flex: 1;
}

.about-text p {
	margin-bottom: 20px;
	color: var(--text-muted);
	font-size: 1.1rem;
}

.about-image {
	flex: 1;
	height: 450px;
	width: 100%;
	background: url("images/b2.jpg") center/cover;
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* --- Menu Section --- */
.menu-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 40px;
}

.menu-card {
	background-color: var(--card-bg);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.menu-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 30px rgba(230, 38, 35, 0.15);
}

.menu-image-container {
	height: 220px;
	overflow: hidden;
}

.menu-image-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.menu-card:hover .menu-image-container img {
	transform: scale(1.08);
}

.menu-card-content {
	padding: 25px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.menu-item-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 15px;
	gap: 10px;
}

.menu-item-title {
	font-size: 1.25rem;
	font-weight: 700;
	font-family: var(--font-heading);
	color: var(--text-light);
}

.menu-item-price {
	color: var(--primary-color);
	font-weight: 700;
	font-size: 1.2rem;
}

.menu-item-desc {
	color: var(--text-muted);
	font-size: 0.95rem;
	line-height: 1.5;
	flex-grow: 1;
}

/* --- Gallery Section (Artistic Layout) --- */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 250px;
	grid-auto-flow: dense;
	gap: 15px;
	
}

.gallery-item {
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	cursor: pointer;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.gallery-item:hover img {
	transform: scale(1.1);
}

.gallery-item::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(230, 38, 35, 0.2);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
	opacity: 1;
}

/* CSS Grid Magic for 9 items */
.gallery-item:nth-child(1) {
	grid-column: span 2;
	grid-row: span 2;
} /* Large Square */
.gallery-item:nth-child(2) {
	grid-column: span 1;
	grid-row: span 1;
} /* Small Square */
.gallery-item:nth-child(3) {
	grid-column: span 1;
	grid-row: span 1;
} /* Tall Rectangle */
.gallery-item:nth-child(4) {
	grid-column: span 1;
	grid-row: span 1;
} /* Small Square */
.gallery-item:nth-child(5) {
	grid-column: span 1;
	grid-row: span 1;
} /* Small Square */
.gallery-item:nth-child(6) {
	grid-column: span 2;
	grid-row: span 1;
} /* Wide Rectangle */
.gallery-item:nth-child(7) {
	grid-column: span 1;
	grid-row: span 1;
} /* Small Square */
.gallery-item:nth-child(8) {
	grid-column: span 1;
	grid-row: span 1;
} /* Small Square */
.gallery-item:nth-child(9) {
	grid-column: span 2;
	grid-row: span 2;
} /* Large Square */
.gallery-item:nth-child(10) {
	grid-column: span 2;
	grid-row: span 2;
} /* Large Square */
.gallery-item:nth-child(11) {
	grid-column: span 2;
	grid-row: span 2;
} /* Large Square */

/* --- Footer --- */
footer {
	background-color: #0a0a0a;
	padding: 80px 5% 30px;
	text-align: center;
}

.footer-info {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	margin-bottom: 50px;
	gap: 40px;
}

.footer-block h4 {
	color: var(--primary-color);
	margin-bottom: 20px;
	font-family: var(--font-heading);
	font-size: 1.6rem;
}

.footer-block p {
	color: var(--text-muted);
	margin-bottom: 8px;
	font-size: 1.05rem;
}

.copyright {
	color: var(--text-muted);
	font-size: 0.95rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 30px;
}

/* --- Back to Top Button --- */
#backToTop {
	display: none;
	position: fixed;
	bottom: 40px;
	right: 40px;
	z-index: 999;
	border: none;
	outline: none;
	background-color: var(--primary-color);
	color: #ffffff;
	cursor: pointer;
	padding: 15px;
	border-radius: 50%;
	font-size: 20px;
	width: 55px;
	height: 55px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	transition: all 0.3s ease;
	opacity: 0;
}

#backToTop:hover {
	background-color: var(--primary-dark);
	transform: translateY(-5px);
	box-shadow: 0 6px 20px rgba(230, 38, 35, 0.5);
}

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 992px) {
	.hero-content h1 {
		font-size: 3.5rem;
	}

	/* Update about section to ensure image shows on mobile */
	.about-content {
		flex-direction: column;
	}

	/* Explicitly set width to 100% and a fixed height for mobile */
	.about-image {
		width: 100%;
		height: 350px;
		flex: none; /* Prevent flexbox from collapsing the empty div */
	}
}

@media screen and (max-width: 768px) {
	.nav-links {
		position: fixed;
		right: -100%;
		top: 70px;
		flex-direction: column;
		background-color: rgba(18, 18, 18, 0.98);
		width: 100%;
		text-align: center;
		transition: 0.4s ease-in-out;
		padding: 40px 0;
		box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
	}

	.nav-links.nav-active {
		right: 0;
	}
	/* 强制修复手机端 Gallery 错位与留空问题 */
@media screen and (max-width: 768px) {
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-flow: row !important;
        gap: 10px !important;
    }

    .gallery-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: auto !important;
    }
}

	.nav-links li {
		margin: 25px 0;
	}

	.hamburger {
		display: block;
		margin-left: 20px;
	}

	.hamburger.toggle .line1 {
		transform: rotate(-45deg) translate(-5px, 6px);
	}
	.hamburger.toggle .line2 {
		opacity: 0;
	}
	.hamburger.toggle .line3 {
		transform: rotate(45deg) translate(-5px, -6px);
	}

	.btn-online-order {
		padding: 8px 16px;
		font-size: 12px;
	}

	.hero-content h1 {
		font-size: 2.8rem;
	}
	.section-title {
		font-size: 2.2rem;
	}

	.footer-info {
		flex-direction: column;
	}

	/* Fallback layout for mobile gallery */
	.gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 200px;
	}

	.gallery-item:nth-child(n) {
		grid-column: span 1;
		grid-row: span 1;
	}

	.gallery-item:nth-child(1),
	.gallery-item:nth-child(5),
	.gallery-item:nth-child(8),
	.gallery-item:nth-child(9) {
		grid-column: span 2;
	}
}
/* --- Spice Level Icons --- */
.spicy-level {
	font-size: 1.1rem;
	margin-left: 10px;
	vertical-align: middle;
}

/* --- View More Button Container in Menu --- */
.menu-action {
	text-align: center;
	margin-top: 60px;
	width: 100%;
}

/* --- Full Menu Page (menu.html) Styles --- */
.full-menu-section {
	padding-top: 130px; /* Offset for the fixed navigation bar */
	min-height: 100vh;
}

.menu-images-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	max-width: 1000px;
	margin: 0 auto;
}

.menu-page-img {
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
	background-color: var(--card-bg);
}

.menu-page-img img {
	width: 100%;
	height: auto;
	display: block;
}
