/*
Theme Name: قفسه ایمن
Theme URI: https://wallflore.ir/
Author: صبانت
Description: قفسه ایمن — آلرژی و تغذیه
Version: 1.0.0
Text Domain: ghafeh
*/

:root {
	--ink: #1a3329;
	--muted: #5a7266;
	--wall: #d4ebe2;
	--wood: #6a4632;
	--wood-deep: #4a2f20;
	--leaf: #1f7a55;
	--leaf-bright: #2fa86f;
	--mint: #b7e0cf;
	--bay: #f3faf6;
	--line: #b6d0c3;
	--warn: #c45c2a;
	--safe: #1f7a55;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	background:
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 47px,
			rgba(31, 122, 85, 0.03) 47px,
			rgba(31, 122, 85, 0.03) 48px
		),
		linear-gradient(180deg, #c8e4d8 0%, var(--wall) 40%, #e2f1ea 100%);
	color: var(--ink);
	font-family: "Georgia", "Times New Roman", "Trebuchet MS", Tahoma, serif;
	line-height: 1.75;
}
a { color: var(--leaf); text-decoration: none; }
a:hover { color: var(--wood-deep); }
img { max-width: 100%; height: auto; display: block; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}

/* Pantry shelf header scene */
.pantry {
	position: relative;
	overflow: hidden;
	min-height: 248px;
	background:
		linear-gradient(180deg, #9ecfba 0%, #c5e6d6 38%, #e8f4ee 38%, #e8f4ee 100%);
	border-bottom: 5px solid var(--wood-deep);
}
.pantry-wall {
	position: absolute; inset: 0;
	background:
		radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,255,255,.35), transparent 70%),
		repeating-linear-gradient(
			90deg,
			rgba(106, 70, 50, 0.04) 0 2px,
			transparent 2px 28px
		);
}
.pantry-shelves {
	position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
	z-index: 1;
	pointer-events: none;
}
.pantry-shelves .plank {
	position: absolute; left: 4%; right: 4%;
	height: 10px;
	background: linear-gradient(180deg, #8a5c42, var(--wood-deep));
	border-radius: 2px;
	box-shadow: 0 4px 0 rgba(0,0,0,.12);
}
.pantry-shelves .plank.p1 { bottom: 58%; }
.pantry-shelves .plank.p2 { bottom: 28%; }
.pantry-shelves .plank.p3 { bottom: 0; left: 0; right: 0; height: 14px; border-radius: 0; }
.pantry-foods {
	position: absolute; inset: 0; z-index: 2; pointer-events: none;
}
.pantry-foods svg {
	position: absolute; width: 44px; height: 44px; opacity: .92;
}
.pantry-brand {
	position: relative; z-index: 4;
	max-width: 1120px; margin: 0 auto;
	padding: 28px 18px 88px;
	display: flex; align-items: center; gap: 16px;
}
.pantry-brand .logo {
	width: 72px; height: 72px; flex: 0 0 auto;
	filter: drop-shadow(0 6px 12px rgba(74, 47, 32, .28));
}
.brand-plate {
	background: linear-gradient(180deg, rgba(243,250,246,.94), rgba(231,244,237,.9));
	border: 2px solid var(--wood);
	border-bottom-width: 5px;
	padding: 10px 16px 12px;
	min-width: 0;
	box-shadow: 0 8px 20px rgba(74, 47, 32, .12);
}
.brand-plate .name {
	display: block;
	font-size: 1.55rem;
	font-weight: 700;
	color: var(--wood-deep);
	line-height: 1.25;
	letter-spacing: -0.01em;
}
.brand-plate .tag {
	display: block;
	margin-top: 4px;
	font-size: .86rem;
	color: var(--muted);
	font-family: Tahoma, "Segoe UI", sans-serif;
}
.shelf-tags {
	margin-inline-start: auto;
	display: flex; flex-wrap: wrap; gap: 8px;
	max-width: 220px;
	justify-content: flex-end;
}
.shelf-tags span {
	font-family: Tahoma, sans-serif;
	font-size: .72rem;
	padding: 4px 8px;
	background: var(--wood-deep);
	color: #e8f4ee;
	border-bottom: 2px solid var(--leaf-bright);
}

/* Shelf-label nav */
.shelf-nav {
	background: var(--wood);
	border-bottom: 3px solid var(--wood-deep);
}
.shelf-nav-inner {
	max-width: 1120px; margin: 0 auto;
	padding: 0 14px;
	display: flex; align-items: center; gap: 10px;
}
.nav-toggle { display: none; }
.nav-btn {
	display: none;
	width: 40px; height: 40px;
	align-items: center; justify-content: center;
	cursor: pointer;
}
.nav-btn span {
	display: block; width: 20px; height: 2px; background: #e8f4ee;
	box-shadow: 0 6px 0 #e8f4ee, 0 -6px 0 #e8f4ee;
}
.nav {
	display: flex; flex-wrap: wrap; gap: 2px 0;
	padding: 6px 0;
	font-family: Tahoma, "Segoe UI", sans-serif;
}
.nav a {
	color: #eef8f2;
	padding: 8px 12px;
	font-size: .9rem;
	border-bottom: 3px solid transparent;
}
.nav a:hover,
.nav a.on {
	color: #fff;
	border-bottom-color: var(--leaf-bright);
	background: rgba(0,0,0,.12);
}

/* LTR shell: content left, basket sidebar right */
.shell {
	max-width: 1120px;
	margin: 18px auto 40px;
	padding: 0 14px;
	display: flex;
	flex-direction: row;
	gap: 22px;
	align-items: flex-start;
	direction: ltr;
}
.shell > main,
.shell > .basket {
	direction: rtl;
	text-align: right;
	font-family: Tahoma, "Segoe UI", sans-serif;
}
.shell > main { flex: 1 1 auto; min-width: 0; }
.shell > .basket { flex: 0 0 300px; width: 300px; }

/* Tip strip — allergen guide rail */
.tip-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 18px;
	padding: 12px;
	background: linear-gradient(180deg, #eaf6f0, #dff0e7);
	border: 2px solid var(--line);
	border-inline-start: 6px solid var(--leaf);
}
.tip-strip .tip {
	padding: 8px 10px;
	background: rgba(255,255,255,.55);
	border-bottom: 3px solid var(--mint);
	font-size: .82rem;
	color: var(--ink);
}
.tip-strip .tip strong {
	display: block;
	color: var(--leaf);
	font-size: .78rem;
	margin-bottom: 2px;
	letter-spacing: .02em;
}
.section-label {
	font-family: Georgia, serif;
	font-size: 1.05rem;
	color: var(--wood-deep);
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 2px dashed var(--line);
}

/* Shelf bay grid — not lead+rows */
.shelf-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.bay {
	display: flex;
	flex-direction: column;
	background: var(--bay);
	border: 2px solid var(--wood);
	border-bottom-width: 5px;
	overflow: hidden;
	color: inherit;
	min-height: 100%;
	transition: transform .15s ease, border-color .15s ease;
}
.bay:hover {
	transform: translateY(-2px);
	border-color: var(--leaf);
	color: inherit;
}
.bay-art {
	aspect-ratio: 16 / 10;
	background:
		linear-gradient(180deg, #cfe8db, #b5d9c8);
	overflow: hidden;
	position: relative;
}
.bay-art img {
	width: 100%; height: 100%; object-fit: cover;
}
.bay-art .empty {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	opacity: .35;
}
.bay-art .empty svg { width: 48px; height: 48px; }
.bay-body {
	padding: 12px 14px 14px;
	display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.bay-body .kicker {
	font-size: .72rem;
	color: var(--leaf);
	font-weight: 700;
}
.bay-body h2,
.bay-body h3 {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.45;
	font-family: Georgia, serif;
	color: var(--ink);
	font-weight: 700;
}
.bay-body .meta {
	font-size: .78rem;
	color: var(--muted);
}
.bay-body .excerpt {
	margin: 4px 0 0;
	font-size: .86rem;
	color: var(--muted);
	line-height: 1.6;
}
.bay.wide {
	grid-column: 1 / -1;
	flex-direction: row;
}
.bay.wide .bay-art {
	flex: 0 0 42%;
	aspect-ratio: auto;
	min-height: 180px;
}
.bay.wide .bay-body {
	flex: 1;
	justify-content: center;
	padding: 18px 20px;
}
.bay.wide .bay-body h2 { font-size: 1.35rem; }

/* Basket sidebar */
.basket {
	background: linear-gradient(180deg, #eaf6f0, #ddeee5);
	border: 2px solid var(--wood);
	border-bottom-width: 6px;
	padding: 14px;
}
.basket-head {
	display: flex; align-items: center; gap: 10px;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--line);
}
.basket-head svg { width: 36px; height: 36px; flex: 0 0 auto; }
.basket-head strong {
	display: block;
	font-family: Georgia, serif;
	font-size: 1.05rem;
	color: var(--wood-deep);
}
.basket-head span {
	display: block;
	font-size: .78rem;
	color: var(--muted);
}
.widget {
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px dashed var(--line);
}
.widget:last-child { border-bottom: 0; margin-bottom: 0; }
.widget-title {
	margin: 0 0 8px;
	font-size: .92rem;
	color: var(--leaf);
	font-family: Georgia, serif;
	border-inline-start: 3px solid var(--leaf-bright);
	padding-inline-start: 8px;
}
.widget ul { margin: 0; padding: 0 1.1em 0 0; }
.widget li { margin-bottom: 6px; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--leaf); }
.widget input[type="search"],
.widget input[type="text"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--line);
	background: #fff;
	font-family: Tahoma, sans-serif;
}
.behtarinseo { font-size: .85rem; line-height: 1.7; }
.behtarinseo table { width: 100%; border-collapse: collapse; }
.behtarinseo td { padding: 4px 0; vertical-align: top; }

/* Entry */
.entry {
	background: var(--bay);
	border: 2px solid var(--wood);
	border-bottom-width: 5px;
	padding: 20px 22px 28px;
}
.entry-title {
	margin: 6px 0 8px;
	font-family: Georgia, serif;
	font-size: 1.55rem;
	color: var(--wood-deep);
	line-height: 1.35;
}
.entry .kicker { color: var(--leaf); font-size: .8rem; font-weight: 700; }
.entry .meta { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.entry-thumb { margin: 0 0 16px; }
.entry-thumb img { width: 100%; }
.entry-content { font-size: .98rem; }
.entry-content p { margin: 0 0 1em; }
.entry-content h2, .entry-content h3 { color: var(--wood-deep); font-family: Georgia, serif; }

.site-footer {
	max-width: 1120px;
	margin: 0 auto 28px;
	padding: 14px 18px;
	text-align: center;
	font-family: Tahoma, sans-serif;
	font-size: .85rem;
	color: var(--muted);
	border-top: 2px solid var(--line);
}
.nav-links {
	display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
	font-family: Tahoma, sans-serif;
}
.nav-links a {
	padding: 6px 12px;
	border: 1px solid var(--line);
	background: var(--bay);
	color: var(--ink);
}
.nav-links a:hover { border-color: var(--leaf); color: var(--leaf); }
.comments-area { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }

@media (max-width: 900px) {
	.shell { flex-direction: column; }
	.shell > .basket { flex: 1 1 auto; width: 100%; }
	.bay.wide { flex-direction: column; }
	.bay.wide .bay-art { flex: none; min-height: 160px; }
	.tip-strip { grid-template-columns: 1fr 1fr; }
	.shelf-tags { display: none; }
}
@media (max-width: 640px) {
	.shelf-grid { grid-template-columns: 1fr; }
	.tip-strip { grid-template-columns: 1fr; }
	.pantry-brand { padding-bottom: 70px; }
	.nav-btn { display: flex; }
	.nav { display: none; width: 100%; flex-direction: column; }
	.nav-toggle:checked ~ .nav { display: flex; }
}
