/*
 * Menu section (Thực đơn) — dùng chung ở trang chủ (preview) và /thuc-don/.
 * Đối chiếu react-analysis.md mục 4.5 / 5.
 */

.menu-section {
	background: var(--color-surface-green-alt);
}

.menu-section--page {
	min-height: 60vh;
}

.menu-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

.menu-section__desc {
	margin-top: 12px;
	font-size: 14px;
	color: var(--color-muted);
}

.menu-section__link {
	font-size: 14px;
	font-weight: 700;
	color: var(--color-primary);
	text-decoration: underline;
	text-decoration-color: var(--color-border-step);
	text-underline-offset: 8px;
}

/* Toolbar / filters -------------------------------------------------------- */
.menu-toolbar {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 32px;
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-border-soft);
	background: rgba(255, 255, 255, 0.55);
	padding: 16px;
}

@media (min-width: 640px) {
	.menu-toolbar {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.menu-toolbar__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.menu-category-tab {
	display: inline-flex;
	align-items: center;
	border-radius: var(--radius-pill);
	padding: 10px 16px;
	font-size: 12px;
	font-weight: 700;
	background: #fff;
	color: var(--color-muted-dark);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-category-tab:hover {
	background: var(--color-surface-green);
}

.menu-category-tab.is-active {
	background: var(--color-primary);
	color: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.menu-category-tab__count {
	margin-left: 6px;
	opacity: 0.7;
}

.menu-search {
	display: flex;
	align-items: center;
	gap: 8px;
	border-radius: var(--radius-pill);
	border: 1px solid var(--color-border-input);
	background: #fff;
	padding: 10px 16px;
	font-size: 12px;
	color: var(--color-muted);
}

@media (min-width: 640px) {
	.menu-search { width: 256px; }
}

.menu-search input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	outline: none;
	color: inherit;
}

.menu-search input::placeholder {
	color: var(--color-placeholder-text);
}

.menu-result-count {
	margin-top: 28px;
	font-size: 12px;
	font-weight: 600;
	color: var(--color-muted);
}

/* Product grid -------------------------------------------------------------- */
.product-grid {
	margin-top: 16px;
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.homepage-product-grid {
	margin-top: 40px;
}

@media (min-width: 640px) {
	.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.product-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 64px 24px;
	border-radius: var(--radius-xl);
	border: 1px dashed var(--color-border-step);
	background: rgba(255, 255, 255, 0.5);
}

.product-grid__empty p {
	color: var(--color-muted);
	font-size: 14px;
	line-height: 1.7;
}

.product-grid__empty .btn {
	margin-top: 16px;
}

/* Product card --------------------------------------------------------------- */
.product-card {
	overflow: hidden;
}

.product-card__media {
	position: relative;
	height: 224px;
	overflow: hidden;
}

.product-card__media img,
.product-card__media .nepnha-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s ease;
}

.product-card:hover .product-card__media img {
	transform: scale(1.05);
}

.product-card__badge-tag {
	position: absolute;
	top: 16px;
	left: 16px;
}

.product-card__badge-cart {
	position: absolute;
	top: 16px;
	right: 16px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.product-card__body {
	padding: 20px;
}

.product-card__meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.product-card__category {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--color-label-amber);
}

.product-card__time {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: var(--color-muted);
}

.product-card__title {
	margin-top: 8px;
	font-size: 18px;
	font-weight: 700;
}

.product-card__title a {
	color: inherit;
}

.product-card__price-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-top: 20px;
}

.product-card__price {
	font-size: 18px;
	font-weight: 700;
	color: var(--color-primary);
}

.product-card__price del {
	margin-right: 6px;
	font-size: 12px;
	font-weight: 400;
	color: var(--color-old-price);
}

.product-card__price-unit {
	margin-left: 4px;
	font-size: 12px;
	font-weight: 400;
	color: var(--color-muted);
}

.product-card__note {
	font-size: 12px;
	color: var(--color-muted);
}

.product-card__add-btn {
	margin-top: 16px;
	width: 100%;
}

.product-card__add-btn.is-added {
	background: var(--color-surface-green);
	color: var(--color-primary);
	box-shadow: none;
}

/* Pagination ------------------------------------------------------------------- */
.nepnha-pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.nepnha-pagination a,
.nepnha-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--radius-pill);
	font-size: 13px;
	font-weight: 600;
	color: var(--color-muted-dark);
	background: #fff;
	border: 1px solid var(--color-border-input);
}

.nepnha-pagination a:hover {
	background: var(--color-surface-green);
}

.nepnha-pagination .current {
	background: var(--color-primary);
	color: #fff;
	border-color: var(--color-primary);
}
