/* Home page - two layouts (views/et22/home2024.php), 2026-09-18.
   Only the new pieces: welcome strip, product rails, how it works, story links. The existing
   blocks (hero, categories, farm updates ...) keep their own styles. Product cards are
   procard1() markup; the card rules mirror categorypage-ux.css, scoped to .hm-track, and never
   force display (customenew.js toggles .cartbtn / .quantity with jQuery show() / hide()). */
.ethome { --hm-green: #1f3b2c; --hm-lime: #72b01d; --hm-ink: #1f2933; --hm-muted: #6b7785; --hm-line: #eceff3; --hm-bg: #f6f7f5; --hm-soft: #f3f7ee; }
.hm-wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.hm-h2 { font-size: 22px; font-weight: 800; color: var(--hm-ink); margin: 0; letter-spacing: -.2px; line-height: 1.25; }
.hm-sub { color: var(--hm-muted); font-size: 14px; margin: 3px 0 0; }
.hm-center { text-align: center; }

/* ---------- welcome strip (regular) ---------- */
.hm-hello { padding: 16px 0 6px; background: linear-gradient(180deg, var(--hm-soft), rgba(243,247,238,0)); }
.hm-hi { font-size: 24px; font-weight: 800; color: var(--hm-green); margin: 0 0 10px; letter-spacing: -.3px; }
.hm-status { display: grid; gap: 8px; margin-bottom: 10px; }
.hm-status:empty { display: none; }
.hm-pill { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: #fff; border: 1px solid #e3e9dc;
	color: var(--hm-ink); text-decoration: none; min-width: 0; }
a.hm-pill:hover { border-color: var(--hm-lime); color: var(--hm-ink); }
.hm-pill > i:first-child { font-size: 18px; color: var(--hm-green); width: 22px; text-align: center; flex: 0 0 22px; }
.hm-pill > span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hm-pill b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.hm-pill small { font-size: 12.5px; color: var(--hm-muted); line-height: 1.3; }
.hm-pill .hm-go { font-size: 12px; color: var(--hm-muted); }
.hm-pill--due { background: #fff7ed; border-color: #fed7aa; }
.hm-pill--due > i:first-child { color: #c2410c; }
.hm-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hm-quick a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 12px; background: #fff; border: 1px solid var(--hm-line);
	color: var(--hm-ink); text-decoration: none; font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.25; }
.hm-quick a:hover { border-color: var(--hm-lime); color: var(--hm-green); }
.hm-quick i { font-size: 18px; color: var(--hm-green); }
.hm-quick b { display: block; font-weight: 700; color: var(--hm-green); }
@media (min-width: 768px) {
	.hm-hello { padding: 22px 0 8px; }
	.hm-hi { font-size: 28px; }
	.hm-status { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
	.hm-quick { grid-template-columns: repeat(4, max-content); }
	.hm-quick a { flex-direction: row; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 14px; }
	.hm-quick b { display: inline; margin-left: 4px; }
}

/* ---------- product rails ---------- */
.hm-rail { padding: 18px 0 8px; }
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hm-head-end { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hm-all { font-size: 13.5px; font-weight: 700; color: var(--hm-green); text-decoration: none; white-space: nowrap; }
.hm-all i { font-size: 10px; margin-left: 2px; }
.hm-arrows { display: none; gap: 6px; }
.hm-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #d9dfe6; background: #fff; color: var(--hm-ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.hm-arrow:hover:not(:disabled) { border-color: var(--hm-green); color: var(--hm-green); }
.hm-arrow:disabled { opacity: .35; cursor: default; }
.hm-prev i { transform: rotate(180deg); }
@media (hover: hover) and (min-width: 992px) { .hm-arrows { display: inline-flex; } }

.hm-track { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
	margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hm-track::-webkit-scrollbar { display: none; }
.hm-track > .hm-cell { flex: 0 0 44%; max-width: 220px; min-width: 150px; width: auto; padding: 0 !important; margin: 0; scroll-snap-align: start; }
@media (min-width: 576px) { .hm-track > .hm-cell { flex-basis: 200px; } }
@media (min-width: 992px) { .hm-track > .hm-cell { flex-basis: calc((100% - 50px) / 6); max-width: none; } }
.hm-track > .hm-cell > div { height: 100%; }

.hm-track .card-style-1 { margin: 0 !important; height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hm-line);
	border-radius: 14px; padding: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: box-shadow .15s, border-color .15s; }
@media (hover: hover) { .hm-track .card-style-1:hover { box-shadow: 0 8px 22px rgba(16,24,40,.08); border-color: #dfe5dc; } }
.hm-track .img-block { display: block; position: relative; border-radius: 10px; overflow: hidden; background: var(--hm-bg); aspect-ratio: 1 / 1; }
.hm-track .img-block > a, .hm-track .img-block img { display: block; width: 100%; height: 100%; }
.hm-track .img-block img { object-fit: cover; }
.hm-track .img-block .notify-badge { left: 6px; top: 6px; border-radius: 8px; background: #b42318; font-weight: 700; font-size: 10.5px; padding: 3px 7px; z-index: 2; }
.hm-track .details { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hm-track .title { font-size: 13.5px; font-weight: 600; line-height: 1.3; min-height: 2.6em; margin: 8px 0 6px; color: var(--hm-ink);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-track .sku { margin-bottom: 4px; }
.hm-track .sku select { height: 32px; border-radius: 8px; border: 1px solid #d5dbe3; font-size: 12.5px; padding: 4px 26px 4px 8px; }
.hm-track .sku .veg-symbol { width: 15px; height: 15px; flex: 0 0 15px; margin-left: 6px; }
.hm-track .price { font-size: 17px; color: var(--hm-ink); margin: 4px 0 0; line-height: 1.25; }
.hm-track .price small { font-weight: 500; color: var(--hm-muted); }
.hm-track .price .mrpblock { font-size: 12px; font-weight: 400; color: var(--hm-muted); }
.hm-track .save { background: #eef7e6; color: #1f5f23; border-radius: 8px; font-size: 11px; padding: 4px 7px; margin: 5px 0 0; text-align: left; line-height: 1.3; }
.hm-track .save a { color: inherit; }
.hm-track .save span { font-size: 11.5px; font-weight: 700; }
.hm-track .delivery { font-size: 11px; font-weight: 500; color: var(--hm-muted); letter-spacing: 0; margin-top: 5px; line-height: 1.3; }
.hm-track .action, .hm-track .details > .quantity { margin-top: auto; padding-top: 8px; }
.hm-track .action .cartbtn { width: 100%; margin: 0; border-radius: 10px; font-weight: 700; padding: 8px 6px; font-size: 14px; }
.hm-track .quantity { display: flex; align-items: stretch; height: 40px; padding: 0; margin-top: 8px; border: 1.5px solid var(--hm-lime); border-radius: 10px; overflow: hidden; background: #fff; }
.hm-track .quantity .minus, .hm-track .quantity .plus { width: 40px; flex: 0 0 40px; font-size: 20px; font-weight: 700; background: #eef5e6; color: var(--hm-green); border: 0; border-radius: 0; }
.hm-track .quantity .qty { flex: 1; width: auto; min-width: 0; font-size: 16px; font-weight: 700; border: 0; text-align: center; }
.hm-track .preorder-box .card-style-1 { background: #fbfaf4; }

/* skeleton while a lazy rail loads - same footprint as a card, so nothing jumps */
.hm-skel { display: flex; flex-direction: column; gap: 8px; padding: 8px !important; border: 1px solid var(--hm-line); border-radius: 14px; background: #fff; min-height: 300px; }
.hm-skel span, .hm-skel i, .hm-skel b { display: block; border-radius: 8px; background: linear-gradient(90deg, #f0f2ef 0%, #f7f8f6 50%, #f0f2ef 100%); background-size: 200% 100%; animation: hmShimmer 1.3s linear infinite; }
.hm-skel span { aspect-ratio: 1 / 1; border-radius: 10px; }
.hm-skel i { height: 12px; width: 85%; }
.hm-skel i + i { width: 55%; }
.hm-skel b { height: 36px; margin-top: auto; }
@keyframes hmShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .hm-skel span, .hm-skel i, .hm-skel b { animation: none; } }

/* ---------- how it works (new) ---------- */
.hm-how { padding: 36px 0; background: var(--hm-soft); }
.hm-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.hm-steps li { position: relative; background: #fff; border: 1px solid #e3e9dc; border-radius: 14px; padding: 14px 14px 14px 58px; }
.hm-step-n { position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--hm-green); color: #fff;
	font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.hm-steps b { display: block; font-size: 16px; color: var(--hm-ink); margin-bottom: 2px; }
.hm-steps p { margin: 0; font-size: 14px; color: #4b5563; line-height: 1.45; }
.hm-steps a { color: var(--hm-green); font-weight: 700; }
@media (min-width: 768px) {
	.hm-how { padding: 48px 0; }
	.hm-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
	.hm-steps li { padding: 58px 16px 18px; }
	.hm-step-n { left: 16px; top: 16px; }
}

/* ---------- story links (regular) ---------- */
.hm-story { padding: 26px 0 30px; }
.hm-story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hm-story-grid a { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--hm-line);
	color: var(--hm-ink); text-decoration: none; }
.hm-story-grid a:hover { border-color: var(--hm-lime); }
.hm-story-grid i { font-size: 20px; color: var(--hm-green); margin-bottom: 4px; }
.hm-story-grid b { font-size: 15px; }
.hm-story-grid small { font-size: 12.5px; color: var(--hm-muted); line-height: 1.35; }
@media (min-width: 768px) { .hm-story-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }

@media (min-width: 768px) { .hm-h2 { font-size: 26px; } .hm-rail { padding: 26px 0 10px; } }
