/* Room landing pages and category listings (catalogue.php). Product cards use
   the .gf-card styles from gf-saved.css. */

.cat-wrap { padding: 0 20px 50px; box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Breadcrumbs */
.cat-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 16px 0 6px; font-size: 15px; }
.cat-crumbs a { color: #555; text-decoration: underline; }
.cat-crumbs a:hover { color: #1a2a49; text-decoration: underline; }
.cat-crumbs [aria-current] { color: #565656; font-weight: 600; }

/* Room hero */
/* Room hero: photo banner (set per room in includes/catalogue/rooms/) */
.cat-hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; margin: 6px 0 8px; padding: 40px 24px; border-radius: 10px; overflow: hidden; box-sizing: border-box; text-align: center; color: #fff; background: linear-gradient(135deg, #1a2a49, #2c4474); }
.cat-hero.has-img { background: #1a2a49 var(--hero) no-repeat var(--hero-pos, 50% 50%) / cover; }
.cat-hero.has-img:before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 18, 34, .62), rgba(10, 18, 34, .28)); }
.cat-hero > * { position: relative; }
.cat-hero h1 { max-width: 900px; margin: 0 0 12px; font-size: 40px; line-height: 1.15; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.cat-hero-intro { max-width: 760px; margin: 0 0 20px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .92); }
.cat-hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cat-hero-stats li { padding: 7px 14px; border-radius: 20px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(4px); font-size: 13px; color: #fff; }
.cat-hero-stats b { color: #fff; }

/* Sections */
.cat-section { padding: 26px 0 10px; border-top: 1px solid #e6e6e6; margin-top: 16px; }
.cat-section h2 { margin: 0 0 18px; font-size: 24px; }
.cat-section h3 { margin: 22px 0 12px; font-size: 17px; }

/* Category tiles */
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 18px; }
.cat-tile { display: flex; flex-direction: column; color: #222; text-decoration: none; }
.cat-tile-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #f1efef; }
.cat-tile-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cat-tile:hover .cat-tile-img img { transform: scale(1.05); }
.cat-tile-off { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 12px; background: #1a2a49; color: #fff; font-size: 11px; font-weight: 700; }
.cat-tile-name { margin-top: 10px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.cat-tile:hover .cat-tile-name { color: #1a2a49; text-decoration: underline; }
.cat-tile-meta { margin-top: 2px; font-size: 13px; color: #777; }

/* Chips (popular searches, related links) */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #d5d9e1; border-radius: 20px; background: #fff; color: #1a2a49; font-size: 14px; text-decoration: none; font-weight: 600; }
.cat-chip span { color: #8a8f99; font-size: 12px; }
.cat-chip:hover { border-color: #1a2a49; }

/* Listing header */
.cat-head { padding: 0 0 18px; }
.cat-head h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.2; }
.cat-intro { margin: 0; font-size: 15px; line-height: 1.6; color: #555; }
.cat-head-chips { margin-top: 14px; }
.cat-count b { color: #222; font-weight: 700; }

/* Listing layout: filters left, results right */
.cat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 14px; }
.cat-sidebar { position: sticky; top: 12px; margin-top: 8px; max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin; background: #ededed; padding: 16px; box-sizing: border-box; }
.cat-sidebar-head, .cat-sidebar-foot { display: none; }
.cat-filter { padding: 14px 0; border-bottom: 1px solid #bababa; }
.cat-filter:first-child { padding-top: 0; }
.cat-filter-title { margin: 0 0 8px; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: #333; }
.cat-filter ul { margin: 0; padding: 0; list-style: none; }
.cat-opt { display: flex; align-items: center; gap: 10px; padding: 1px 0; color: #333; font-size: 14px; text-decoration: none; }
.cat-opt:hover .cat-opt-label { color: #1a2a49; text-decoration: underline; }
.cat-check { flex: none; width: 16px; height: 16px; border: 1.5px solid #8a919e; border-radius: 4px; box-sizing: border-box; background: #fff; transition: border-color .15s, background-color .15s; }
/* Hover on an unselected option: a light preview tick */
.cat-opt:hover .cat-check { border-color: #1a2a49; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='%23a3aab6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.cat-opt.is-on .cat-check, .cat-opt.is-on:hover .cat-check { border-color: #1a2a49; background: #1a2a49 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.cat-opt.is-on .cat-opt-label { font-weight: 600; }
/* Colour swatches (instead of tick boxes in the Colour filter) */
.cat-swatch { position: relative; flex: none; width: 20px; height: 20px; margin: -2px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); transition: box-shadow .15s; }
.cat-opt:hover .cat-swatch { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px #ededed, 0 0 0 3px #9aa0aa; }
.cat-opt.is-on .cat-swatch { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px #ededed, 0 0 0 4px #1a2a49; }
.cat-opt.is-on .cat-swatch:after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.cat-opt.is-on .cat-swatch.is-light:after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='%231a2a49' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* Hovering a selected colour swaps the tick for a cross: click to remove */
.cat-opt.is-on:hover .cat-swatch:after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); background-size: 11px; }
.cat-opt.is-on:hover .cat-swatch.is-light:after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7' fill='none' stroke='%231a2a49' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
@media only screen and (max-width: 900px) {
	.cat-opt:hover .cat-swatch { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px #fff, 0 0 0 3px #9aa0aa; }
	.cat-opt.is-on .cat-swatch { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px #fff, 0 0 0 4px #1a2a49; }
}
.cat-opt-label { flex: 1; min-width: 0; }
.cat-opt-count { color: #9aa0aa; font-size: 12px; }
/* Show more / Show less on long filter lists (only once the script has run,
   so every option shows without JavaScript) */
.cat-more-toggle { display: none; margin: 6px 0 0; padding: 0; border: 0; background: none; color: #1a2a49; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cat-more-toggle:hover { text-decoration: underline; }
.cat-js .cat-more-toggle { display: inline-block; }
.cat-js .cat-filter:not(.is-expanded) .cat-opt-more { display: none; }
.cat-more-hide, .cat-filter.is-expanded .cat-more-show { display: none; }
.cat-filter.is-expanded .cat-more-hide { display: inline; }

/* Toolbar */
.cat-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cat-count { font-size: 14px; color: #555; }
.cat-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: #555; }
.cat-sort select { height: 38px; padding: 0 10px; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; font: inherit; color: #222; }
.cat-filter-btn { display: none; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid #1a2a49; border-radius: 8px; background: #fff; color: #1a2a49; font: inherit; font-weight: 600; cursor: pointer; }
.cat-filter-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Active filter chips */
.cat-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.cat-active-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 16px; background: #1a2a49; color: #fff; font-size: 13px; text-decoration: none; }
.cat-active-chip:hover { background: #26395f; color: #fff; }
.cat-clear { font-size: 13px; color: #555; text-decoration: underline; }

/* Results grid, pagination, empty state */
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 50px 30px; }
.cat-card-stock { margin-top: 3px; font-size: 12px; font-weight: 600; color: #1a7a34; }
.cat-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 34px 0 10px; }
.cat-pages a, .cat-pages span { min-width: 40px; height: 40px; padding: 0 12px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d5d9e1; border-radius: 8px; color: #1a2a49; font-size: 14px; text-decoration: none; }
.cat-pages a:hover { border-color: #1a2a49; }
.cat-pages .is-current { background: #1a2a49; border-color: #1a2a49; color: #fff; font-weight: 700; }
.cat-pages .cat-pages-gap { border: 0; min-width: 20px; padding: 0; }
.cat-empty { padding: 50px 0; text-align: center; color: #555; }
#cat-main.cat-loading .cat-results, #cat-main.cat-loading .cat-sidebar { opacity: .45; pointer-events: none; transition: opacity .15s; }

/* SEO copy + FAQ */
.cat-seo p { font-size: 15px; line-height: 1.7; color: #444; }
.cat-faq { margin-top: 10px; }
.cat-faq details { border-bottom: 1px solid #e6e6e6; }
.cat-faq summary { padding: 14px 0; font-weight: 600; cursor: pointer; }
.cat-faq details p { margin: 0 0 14px; }

/* Mobile: filters become a full-screen panel */
@media only screen and (max-width: 900px) {
	.cat-wrap { padding: 0 15px 40px; }
	.cat-hero { min-height: 240px; padding: 28px 18px; }
	.cat-hero.has-img, .cat-hero.has-img-m { background: #1a2a49 var(--hero-m) no-repeat var(--hero-pos, 50% 50%) / cover; }
	.cat-hero.has-img-m:before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 18, 34, .66), rgba(10, 18, 34, .3)); }
	.cat-hero:not(.has-img-m) { background: linear-gradient(135deg, #1a2a49, #2c4474); }
	.cat-hero h1 { font-size: 27px; }
	.cat-hero-intro { font-size: 15px; margin-bottom: 16px; }
	.cat-head h1 { font-size: 26px; }
	.cat-layout { display: block; }
	.cat-filter-btn { display: inline-flex; }
	.cat-count { display: none; }
	.cat-sort { font-size: 0; }
	.cat-sort select { font-size: 14px; }
	.cat-sidebar { display: none; position: fixed; inset: 0; z-index: 10000; max-height: none; margin: 0; padding: 0 18px 90px; background: #fff; overflow-y: auto; }
	.cat-sidebar.is-open { display: block; }
	.cat-sidebar-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; margin: 0 -18px 8px; padding: 14px 18px; background: #fff; border-bottom: 1px solid #ececec; font-size: 17px; }
	.cat-close { width: 36px; height: 36px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; }
	.cat-sidebar-foot { display: block; position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 18px; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.08); }
	.cat-apply { width: 100%; height: 48px; border: 0; border-radius: 24px; background: #1a2a49; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
	body.cat-filters-open { overflow: hidden; }
	.cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 12px; }
	.cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
	/* Popular-search pills under the heading: one swipeable row */
	.cat-head-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -15px; padding-right: 15px; scrollbar-width: none; }
	.cat-head-chips::-webkit-scrollbar { display: none; }
	.cat-head-chips .cat-chip { flex: none; white-space: nowrap; }
}
