/* NIRSHA — Homepage "Shop by Category" flagship emphasis (Task 3 §B, LOCALHOST).
   Scoped to the front page only (body.home .nrs-cats). Layers on top of the
   existing image-overlay category cards: Dry Fruits + Chocolates become the two
   large flagship cards (pistachio / peach-coral accent + brand-tinted scrim +
   larger title), Combo Packs is secondary, Mukhwas / Flavoured Shots stay
   discoverable but subordinate. No markup rebuild, no new sections, no cramped
   mobile grid, links/images/functionality unchanged. Titles stay light for
   legibility over the photography; the palette is carried by accent + scrim. */

body.home .nrs-cats {
	--nf-pistachio: #83B46C;   /* Dry Fruits accent (botanical green) */
	--nf-peach: #E88B77;       /* Chocolates accent (soft coral) */
	--nf-gold: #D6A24B;
}

/* ---- Flagship layout: 2 large (Dry Fruits + Chocolates) over 3 smaller ---- */
@media (min-width: 768px) {
	body.home .nrs-cats .nrs-cats__grid {
		display: flex !important;
		flex-wrap: wrap;
		gap: 20px;
		grid-template-columns: none !important;
	}
	body.home .nrs-cats .nrs-cat { flex: 1 1 calc(33.333% - 14px) !important; min-height: 220px !important; width: auto !important; max-width: none !important; }
	body.home .nrs-cats .nrs-cat--dry-fruits,
	body.home .nrs-cats .nrs-cat--chocolates { flex: 1 1 calc(50% - 10px) !important; min-height: 300px !important; order: 0; }
	body.home .nrs-cats .nrs-cat--combo-packs { order: 1; }
	body.home .nrs-cats .nrs-cat--mukhwas,
	body.home .nrs-cats .nrs-cat--flavoured-shots { order: 2; }
}

/* ---- Card chrome + motion ---- */
body.home .nrs-cats .nrs-cat {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	transition: transform .22s ease, box-shadow .22s ease;
	box-shadow: 0 6px 18px rgba(70,55,30,.10);
}
body.home .nrs-cats .nrs-cat:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(70,55,30,.18); }
body.home .nrs-cats .nrs-cat__media img { transition: transform .5s ease; }
body.home .nrs-cats .nrs-cat:hover .nrs-cat__media img { transform: scale(1.04); }

/* Flagship accents: pistachio (Dry Fruits) / peach-coral (Chocolates) top bar + brand glow */
body.home .nrs-cats .nrs-cat--dry-fruits { box-shadow: inset 0 5px 0 var(--nf-pistachio), 0 10px 26px rgba(40,91,61,.18); }
body.home .nrs-cats .nrs-cat--chocolates { box-shadow: inset 0 5px 0 var(--nf-peach), 0 10px 26px rgba(161,78,64,.18); }
body.home .nrs-cats .nrs-cat--dry-fruits:hover { box-shadow: inset 0 5px 0 var(--nf-pistachio), 0 18px 36px rgba(40,91,61,.26); }
body.home .nrs-cats .nrs-cat--chocolates:hover { box-shadow: inset 0 5px 0 var(--nf-peach), 0 18px 36px rgba(161,78,64,.26); }

/* Brand-tinted bottom scrim behind the flagship titles (on-brand + keeps text legible) */
body.home .nrs-cats .nrs-cat--dry-fruits .nrs-cat__media::after,
body.home .nrs-cats .nrs-cat--chocolates .nrs-cat__media::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
}
body.home .nrs-cats .nrs-cat--dry-fruits .nrs-cat__media::after { background: linear-gradient(180deg, transparent 42%, rgba(24,46,33,.74) 100%); }
body.home .nrs-cats .nrs-cat--chocolates .nrs-cat__media::after { background: linear-gradient(180deg, transparent 42%, rgba(86,38,32,.74) 100%); }
/* keep the body text above the scrim */
body.home .nrs-cats .nrs-cat__body { z-index: 2; }

/* Titles: larger on the two flagships (colour stays the theme's light overlay colour) */
@media (min-width: 768px) {
	body.home .nrs-cats .nrs-cat--dry-fruits .nrs-cat__title,
	body.home .nrs-cats .nrs-cat--chocolates .nrs-cat__title { font-size: clamp(1.3rem, 1rem + 1vw, 1.7rem) !important; letter-spacing: .01em; }
	body.home .nrs-cats .nrs-cat--combo-packs .nrs-cat__title { font-size: 1.2rem !important; }
}

/* ---- Mobile: flagships full-width & prominent; others two-up (never a cramped 5/6-col) ---- */
@media (max-width: 767px) {
	body.home .nrs-cats .nrs-cats__grid {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		/* Rows must size to each card, NOT the theme's fixed grid-auto-rows:160px
		   (style.css §.nrs-cats__grid--six). A fixed 160px track is shorter than
		   the flagship cards, so they overflowed their track and overlapped the
		   next row on real phones (360/412px). `auto` lets each card's min-height
		   define its row height — no overlap. */
		grid-auto-rows: auto !important;
		grid-template-rows: none !important;
		align-items: stretch !important;
		gap: 12px !important;
	}
	body.home .nrs-cats .nrs-cat { min-height: 150px !important; width: auto !important; max-width: none !important; grid-row: auto !important; }
	body.home .nrs-cats .nrs-cat--dry-fruits,
	body.home .nrs-cats .nrs-cat--chocolates { grid-column: 1 / -1 !important; min-height: 190px !important; }
	/* The lone trailing secondary card (Mukhwas) spans the full width so the row
	   is never left with a broken empty cell; its shorter height keeps it clearly
	   subordinate to the two flagship cards. */
	body.home .nrs-cats .nrs-cat--mukhwas { grid-column: 1 / -1 !important; }
	/* Hierarchy order on mobile: Dry Fruits → Chocolates → Combo → Shots → Mukhwas */
	body.home .nrs-cats .nrs-cat--dry-fruits { order: 0; }
	body.home .nrs-cats .nrs-cat--chocolates { order: 1; }
	body.home .nrs-cats .nrs-cat--combo-packs { order: 2; }
	body.home .nrs-cats .nrs-cat--flavoured-shots { order: 3; }
	body.home .nrs-cats .nrs-cat--mukhwas { order: 4; }
	body.home .nrs-cats .nrs-cat--dry-fruits .nrs-cat__title,
	body.home .nrs-cats .nrs-cat--chocolates .nrs-cat__title { font-size: 1.3rem !important; }
}

/* ---- Accessibility / motion ---- */
body.home .nrs-cats .nrs-cat:focus-visible { outline: 2px solid var(--nf-gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	body.home .nrs-cats .nrs-cat,
	body.home .nrs-cats .nrs-cat__media img { transition: none !important; }
	body.home .nrs-cats .nrs-cat:hover { transform: none !important; }
	body.home .nrs-cats .nrs-cat:hover .nrs-cat__media img { transform: none !important; }
}
