/* Category landing page (archive-rich.php, 2026-11-10). Sidebar + grid layout belongs to facets.php / style.css. */
body.irfal-ar [data-vertical-spacing*="top"] { padding-top: 18px; }
body.irfal-ar .woocommerce-products-header { margin: 0; }

/* Header */
.irfal-ar-head { position: relative; display: flex; align-items: center; min-height: 128px; max-height: 200px; margin: 0 0 22px; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #EEF3F9, #E3EBF5); }
.irfal-ar-head .irfal-ar-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.irfal-ar-head.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17, 33, 58, .88) 0, rgba(17, 33, 58, .66) 42%, rgba(17, 33, 58, .05) 78%); }
.irfal-ar-text { position: relative; z-index: 1; padding: 20px 30px; max-width: 760px; }
.irfal-ar-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: #475569; margin-bottom: 4px; }
.irfal-ar-crumbs a { color: #1D4ED8; text-decoration: none; }
.irfal-ar-crumbs a:hover { text-decoration: underline; }
.irfal-ar-head h1 { margin: 0; font-size: 32px; line-height: 1.15; letter-spacing: -.01em; color: var(--irfal-navy, #1F3A5F); }
.irfal-ar-head p { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: #334155; }
.irfal-ar-head p strong { margin-right: 10px; color: var(--irfal-navy, #1F3A5F); }
.irfal-ar-head.has-img .irfal-ar-crumbs, .irfal-ar-head.has-img .irfal-ar-crumbs a, .irfal-ar-head.has-img p { color: #E2E8F0; }
.irfal-ar-head.has-img h1, .irfal-ar-head.has-img p strong { color: #fff; }
.irfal-ar-head.has-img .irfal-ar-crumbs a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255, 255, 255, .4); }

/* Subcategory cards (department page) */
.irfal-ar-subs { margin: 0 0 26px; }
.irfal-ar-subs h2, .irfal-ar-sec h2 { margin: 0 0 14px; font-size: 22px; color: var(--irfal-navy, #1F3A5F); }
.irfal-ar-subs > ul { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; list-style: none; margin: 0; padding: 0; }
.irfal-ar-subs li { margin: 0; min-width: 0; }
.irfal-ar-subs li a { display: flex; flex-direction: column; text-decoration: none; color: var(--irfal-text, #1F2937); }
.irfal-ar-subs img, .irfal-ar-subs .irfal-ar-noimg { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #F1F5F9;
	box-shadow: 0 0 0 1px var(--irfal-line, #E5E7EB); transition: transform .3s, box-shadow .3s; }
.irfal-ar-subs li a:hover img { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--irfal-line, #E5E7EB), 0 16px 30px -18px rgba(15, 23, 42, .5); }
.irfal-ar-subs li span:not(.irfal-ar-noimg) { margin-top: 8px; font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--irfal-navy, #1F3A5F);
	overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.irfal-ar-subs li a:hover span { color: var(--irfal-cta, #C2410C); }
.irfal-ar-subs small { font-size: 13px; color: #64748B; }
.irfal-ar-more { margin-top: 16px; }
.irfal-ar-more summary { display: inline-flex; align-items: baseline; gap: 6px; cursor: pointer; padding: 8px 16px; border: 1px solid var(--irfal-line, #E5E7EB); border-radius: 999px; background: #fff;
	font-weight: 700; font-size: 14px; color: var(--irfal-navy, #1F3A5F); list-style: none; }
.irfal-ar-more summary::-webkit-details-marker { display: none; }
.irfal-ar-more summary::after { content: '▾'; font-size: 12px; }
.irfal-ar-more[open] summary::after { content: '▴'; }
.irfal-ar-more summary small { font-weight: 500; color: #64748B; }
.irfal-ar-more .irfal-popcats { margin-top: 12px; }

/* Chips (sibling categories, page 2+, empty search): .irfal-popcats from style.css + current state */
.irfal-ar-sib { margin: 0 0 22px; }
.irfal-ar-sib ul { position: relative; }
.irfal-ar-row .irfal-popcats { margin: 0; }
.irfal-ar-row .irfal-ar-more { margin-top: 10px; }
.irfal-ar-row .irfal-ar-more summary { padding: 6px 14px; font-size: 13px; }
.irfal-ar-chips a.is-current { background: var(--irfal-navy, #1F3A5F); border-color: var(--irfal-navy, #1F3A5F); color: #fff; }
.irfal-ar-chips a.is-current small { color: #C7D7EC; }

/* Grid cards: two-line names */
body.irfal-ar ul.products .woocommerce-loop-product__title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Pagination: boxed numbers, "Page 2 of 24" on phones */
.irfal-pg-of { display: none; }
body.irfal-ar .ct-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--irfal-line, #E5E7EB); border-radius: 10px; background: #fff; font-weight: 600; text-decoration: none; }
body.irfal-ar .ct-pagination .page-numbers.current { background: var(--irfal-navy, #1F3A5F); border-color: var(--irfal-navy, #1F3A5F); color: #fff; }
body.irfal-ar .ct-pagination .page-numbers.dots { border: 0; background: none; min-width: 20px; padding: 0; }
body.irfal-ar .ct-pagination a.page-numbers:hover { border-color: var(--irfal-navy, #1F3A5F); color: var(--irfal-navy, #1F3A5F); }
body.irfal-ar .ct-pagination .ct-hidden-sm { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Below the grid */
.irfal-ar-after { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--irfal-line, #E5E7EB); }
.irfal-ar-sec + .irfal-ar-sec { margin-top: 30px; }
.irfal-ar-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.irfal-ar-prices a { display: flex; flex-direction: column; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, #1F3A5F, #2B5287);
	color: #fff; font-size: 26px; font-weight: 800; line-height: 1.1; text-decoration: none; transition: transform .2s; }
.irfal-ar-prices a:hover { transform: translateY(-3px); color: #fff; }
.irfal-ar-prices small { font-size: 12px; font-weight: 600; color: #C7D7EC; text-transform: uppercase; letter-spacing: .08em; }
.irfal-ar-prices em { font-style: normal; font-size: 14px; font-weight: 600; color: #FDBA74; margin-top: 8px; }
.irfal-ar-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.irfal-ar-depts li { margin: 0; min-width: 0; }
.irfal-ar-depts a { display: flex; flex-direction: column; text-decoration: none; color: var(--irfal-text, #1F2937); }
.irfal-ar-depts img, .irfal-ar-depts .irfal-ar-noimg { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #F1F5F9; box-shadow: 0 0 0 1px var(--irfal-line, #E5E7EB); }
.irfal-ar-depts span:not(.irfal-ar-noimg) { margin-top: 6px; font-weight: 700; font-size: 14px; line-height: 1.25; color: var(--irfal-navy, #1F3A5F); }
.irfal-ar-depts small { font-size: 12px; color: #64748B; }

/* Empty search */
.irfal-ar-empty { max-width: 900px; margin: 10px auto 30px; padding: 26px; border: 1px solid var(--irfal-line, #E5E7EB); border-radius: 16px; background: #fff; }
.irfal-ar-empty h2 { margin: 0 0 4px; font-size: 24px; color: var(--irfal-navy, #1F3A5F); }
.irfal-ar-empty > p { margin: 0 0 6px; color: #475569; }
.irfal-ar-empty .irfal-popcats { margin-top: 18px; }

/* Department cards: one row on desktop (6 cards; 7 from 1500 px), the rest in "All categories" (archive-rich.php). */
@media (max-width: 1023px) { .irfal-ar-dup, .irfal-ar-more.only-dup { display: none; } }
@media (min-width: 1024px) {
	.irfal-ar-subs > ul { grid-template-columns: repeat(6, 1fr); gap: 14px; }
	.irfal-ar-subs > ul > li:nth-child(n+7) { display: none; }
	.irfal-ar-subs { margin-bottom: 20px; }
	.irfal-ar-subs h2 { font-size: 20px; margin-bottom: 10px; }
	.irfal-ar-subs > ul img, .irfal-ar-subs > ul .irfal-ar-noimg { aspect-ratio: 4 / 3; }
	.irfal-ar-subs li span:not(.irfal-ar-noimg) { font-size: 14px; -webkit-line-clamp: 1; }
	.irfal-ar-more { margin-top: 12px; }
}
@media (min-width: 1500px) {
	.irfal-ar-subs > ul { grid-template-columns: repeat(7, 1fr); }
	.irfal-ar-subs > ul > li:nth-child(7) { display: block; }
	.irfal-ar-dup.is-7, .irfal-ar-more.only-7 { display: none; }
}
@media (min-width: 641px) and (max-width: 1023px) {
	.irfal-ar-subs > ul { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 4px; scrollbar-width: none; }
	.irfal-ar-subs > ul::-webkit-scrollbar { display: none; }
	.irfal-ar-subs li { flex: 0 0 19%; scroll-snap-align: start; }
}
@media (max-width: 689px) {
	.irfal-pg-of { display: block; flex: 1; text-align: center; font-weight: 600; color: #475569; align-self: center; }
	body.irfal-ar .ct-pagination { display: flex; align-items: center; gap: 8px; }
}
@media (max-width: 640px) {
	body.irfal-ar [data-vertical-spacing*="top"] { padding-top: 10px; }
	.irfal-ar-head { min-height: 0; max-height: none; margin-bottom: 16px; border-radius: 12px; }
	.irfal-ar-head.has-img::after { background: linear-gradient(180deg, rgba(17, 33, 58, .72), rgba(17, 33, 58, .86)); }
	.irfal-ar-text { padding: 14px 16px; }
	.irfal-ar-head h1 { font-size: 24px; }
	.irfal-ar-head p { font-size: 14px; }
	.irfal-ar-head p span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
	.irfal-ar-subs h2, .irfal-ar-sec h2 { font-size: 19px; }
	.irfal-ar-subs > ul, .irfal-ar-depts { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
	.irfal-ar-subs > ul::-webkit-scrollbar, .irfal-ar-depts::-webkit-scrollbar { display: none; }
	.irfal-ar-subs li { flex: 0 0 31%; scroll-snap-align: start; }
	.irfal-ar-depts li { flex: 0 0 26%; scroll-snap-align: start; }
	.irfal-ar-subs li span:not(.irfal-ar-noimg) { font-size: 13px; }
	.irfal-ar-prices { grid-template-columns: 1fr 1fr; gap: 10px; }
	.irfal-ar-prices a { font-size: 22px; padding: 14px; }
	.irfal-ar-prices em { font-size: 13px; }
	.irfal-ar-empty { padding: 18px; }
}
