/*
 * Collection pages (taxonomy-range_classification-new.php): /collection/all/, /collection/stone-effect/ …
 * Place in: /css/collection-page.css (loaded after tile-colour.css, which holds the shared variables).
 * Everything is scoped to body.pt-collection-page. The site header and footer are unchanged.
 */

/* Page background stays the theme's; only the main column gets the lighter ground */
body.pt-collection-page #main.pt-coll {
	--pt-coll-ink: #1f1f1f;
	--pt-coll-soft: #3d3d3d;
	--pt-coll-muted: #6b6b6b;
	--pt-coll-rule: #d2d2d2;
	--pt-coll-radius: var(--single-tile--section--border--radius, 10px);
	width: 80%; max-width: 1600px; margin: 50px auto 0; padding: 0 var(--single-tile--section--padding, 2vw) 120px; box-sizing: border-box; /* as the range and colour templates */
	background: var(--single-tile--section--background, #eeeeee); color: var(--pt-coll-ink); font-family: 'Futura PT W01 Book', sans-serif; text-align: left;
}
.pt-coll a {color: var(--pt-coll-ink); text-decoration: none;}
.pt-coll h1, .pt-coll h2, .pt-coll h3 {color: var(--pt-coll-ink); text-transform: none; letter-spacing: normal; border: 0; padding: 0; background: none;}

/* Intro */
.pt-coll-intro {padding: 112px 0 56px; text-align: center;}
.pt-coll-kicker {margin: 0 0 20px; font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--pt-coll-muted);}
.pt-coll .pt-coll-h1 {margin: 0; font-family: 'Futura PT W01 Light', sans-serif; font-weight: normal; font-size: clamp(40px, 5.5vw, 72px); line-height: 1.05; text-wrap: balance;}
.pt-coll-desc {max-width: 720px; margin: 28px auto 0; font-size: 19px; line-height: 1.65; color: var(--pt-coll-soft);}
.pt-coll-facts {margin: 18px 0 0; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pt-coll-muted);}

/* About (the term description after its first sentence) and Questions & Answers */
.pt-coll-about h2, .pt-coll-faq h2 {margin: 0 0 32px; font-family: 'Futura PT W01 Light', sans-serif; font-weight: normal; font-size: 34px; text-align: center;}
.pt-coll-about-text {max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.7; color: var(--pt-coll-soft);}
.pt-coll-about-text p {margin: 0 0 1em;}
.pt-coll-about-text p:last-child {margin-bottom: 0;}
.pt-coll-faq-list {display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px;}
.pt-coll-qa {background: #fff; border-radius: var(--pt-coll-radius); padding: 28px 32px;}
.pt-coll .pt-coll-qa h3 {margin: 0 0 10px; font-family: 'Futura PT W01 Medium', sans-serif; font-weight: normal; font-size: 18px; line-height: 1.35; text-align: left;}
.pt-coll-qa p {margin: 0; font-size: 16px; line-height: 1.6; color: var(--pt-coll-soft);}
.pt-coll .pt-coll-qa a {color: inherit; text-decoration: underline; text-decoration-color: #cfcfcf; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s;} /* many links in a row: quiet until hovered */
.pt-coll .pt-coll-qa a:hover, .pt-coll .pt-coll-qa a:focus-visible {color: var(--pt-coll-ink); text-decoration-color: currentColor;}

/* Effect links + sort */
.pt-coll-bar {display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; border-top: 1px solid var(--pt-coll-rule); border-bottom: 1px solid var(--pt-coll-rule);}
.pt-coll-nav {display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 2vw;}
.pt-coll-nav-link {display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 0; font-size: 16px; letter-spacing: 0.04em; border-bottom: 1px solid transparent;}
.pt-coll-nav-link[aria-current] {border-bottom-color: var(--pt-coll-ink);}
.pt-coll-nav-link:hover {border-bottom-color: var(--pt-coll-rule);}
.pt-coll-nav-count, .pt-coll-sort {display: none;} /* hidden for a cleaner bar (Andy, 19 Nov); kept in the markup */
.pt-coll-sort {gap: 20px; align-items: center; font-size: 14px;} /* to show it again: display: flex */
.pt-coll-sort-label {color: var(--pt-coll-muted);}
.pt-coll-sort a {padding: 10px 0; color: var(--pt-coll-muted);}
.pt-coll-sort a[aria-current] {color: var(--pt-coll-ink); text-decoration: underline; text-underline-offset: 6px;}

/* Sections */
.pt-coll-section {padding-top: 96px;}
.pt-coll-head {display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 36px; text-align: center;}
.pt-coll .pt-coll-head h2, .pt-coll-browse h2 {margin: 0; font-family: 'Futura PT W01 Light', sans-serif; font-weight: normal; font-size: 34px;}
.pt-coll-browse h2 {margin-bottom: 36px; text-align: center;}
.pt-coll-head-link {font-size: 14px; letter-spacing: 0.08em; text-decoration: underline !important; text-underline-offset: 6px;}
.pt-coll-head-sub {font-size: 14px; color: var(--pt-coll-muted);}
.pt-coll-empty {text-align: center; font-size: 17px;}
.pt-coll-empty a {text-decoration: underline;}

/* Card grid */
.pt-coll-grid {list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 40px;}
.pt-coll-grid--wide {grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));}
.pt-coll-grid--single {max-width: 620px; margin-left: auto; margin-right: auto;} /* one new range on this page: half width, centred */
.pt-coll-grid > li {margin: 0; padding: 0; list-style: none;}
.pt-coll-grid > li::before {display: none;}
.pt-coll-card {display: flex; flex-direction: column; background: #fff; border-radius: var(--pt-coll-radius); overflow: hidden;}

/* Image box: average colour of the featured image until it loads, then the image fades in */
.pt-coll-media {position: relative; aspect-ratio: 900 / 977; background-color: #dcdcdc; overflow: hidden;}
.pt-coll-card--wide .pt-coll-media {aspect-ratio: 1600 / 917;}
.pt-coll-strip {display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;}
.pt-coll-strip::-webkit-scrollbar {display: none;}
.pt-coll-slide {flex: 0 0 100%; height: 100%; scroll-snap-align: start; display: block;}
.pt-coll-slide picture {display: block; width: 100%; height: 100%;}
.pt-coll-img {display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease;}
.pt-coll-img.is-loaded {opacity: 1;}
@media (hover: hover) and (pointer: fine) {
	.pt-coll-strip {overflow-x: hidden;} /* desktop: the mouse position picks the colour */
}
/* Desktop (class set by the script): the slides sit on top of each other and cross-fade */
.pt-coll-media.is-fade .pt-coll-strip {display: block; position: relative; overflow: hidden;}
.pt-coll-media.is-fade .pt-coll-slide {position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity .4s ease; pointer-events: none;}
.pt-coll-media.is-fade .pt-coll-slide.is-shown {opacity: 1; pointer-events: auto; z-index: 1;}

/* "+ 47 more Colours" (ranges with a preview limit, e.g. Bookmatch Bliss) */
.pt-coll a.pt-coll-more {display: flex; align-items: center; justify-content: center; background: #2b2b2b; color: #fff; text-align: center;}
.pt-coll-more-text {display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 18px; letter-spacing: 0.04em;}
.pt-coll-more-n {font-family: 'Futura PT W01 Light', sans-serif; font-size: 56px; line-height: 1;}
.pt-coll-more-go {margin-top: 14px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 6px;}
@media (prefers-reduced-motion: reduce) {
	.pt-coll-img, .pt-coll-media.is-fade .pt-coll-slide {transition: none;}
}

/* Colour label and position bars */
.pt-coll-label {position: absolute; z-index: 2; top: 14px; left: 14px; padding: 6px 10px; border-radius: 6px; background: rgba(255,255,255,0.88); font-size: 12px; color: var(--pt-coll-ink); pointer-events: none;}
.pt-coll-label:empty {display: none;}
.pt-coll-bars {position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 4px; pointer-events: none; opacity: 0; transition: opacity .2s;}
/* Desktop: the strip round the bars (bottom 18%, at least 64px) is where the colours are picked; a soft shade marks it */
@media (hover: hover) and (pointer: fine) {
	.pt-coll-media[data-colours]::after {content: ''; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: max(64px, 18%); background: linear-gradient(to top, rgba(0,0,0,0.28), rgba(0,0,0,0)); opacity: 0; transition: opacity .2s; pointer-events: none;}
	.pt-coll-media[data-colours]:hover::after {opacity: 1;}
	.pt-coll-bars span {height: 4px;}
}
.pt-coll-bars span {flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.75);}
.pt-coll-bars span.is-on {background: var(--pt-coll-ink);}
.pt-coll-media.is-more .pt-coll-bars span {background: rgba(255,255,255,0.35);}
.pt-coll-media.is-more .pt-coll-bars span.is-on {background: #fff;}
.pt-coll-media:hover .pt-coll-bars, .pt-coll-media.is-colour .pt-coll-bars {opacity: 1;}
@media (hover: none) {
	.pt-coll-bars {opacity: 1;}
}

/* Card text: name, effect, number of colours (left-aligned) */
.pt-coll-text {display: block; padding: 24px 28px 26px; text-align: left;}
.pt-coll-card--wide .pt-coll-text {padding: 26px 32px 28px;}
.pt-coll-title {display: flex; justify-content: space-between; align-items: baseline; gap: 12px;}
.pt-coll .pt-coll-name {margin: 0; font-family: 'Futura PT W01 Book', sans-serif; font-weight: normal; font-size: 26px; line-height: 1.2; letter-spacing: 0.02em; text-align: left;}
.pt-coll-card--wide .pt-coll-name {font-size: 32px;}
.pt-coll-effect {font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pt-coll-muted); white-space: nowrap;}
.pt-coll-count {display: block; margin-top: 6px; font-size: 15px; color: var(--pt-coll-soft);}
.pt-coll-text:hover .pt-coll-name {text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;}

/* Browse by effect: button cards */
.pt-coll-effects {list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;}
.pt-coll-effects li {margin: 0; padding: 0; list-style: none;}
.pt-coll-effects li::before {display: none;}
.pt-coll-effect-link {display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 96px; padding: 24px 28px; box-sizing: border-box; background: #fff; border-radius: var(--pt-coll-radius); transition: box-shadow .2s;}
.pt-coll-effect-link:hover {box-shadow: 0 0 0 1px var(--pt-coll-ink) inset;}
.pt-coll-effect-link > span {display: flex; flex-direction: column; gap: 4px;}
.pt-coll-effect-name {font-size: 21px;}
.pt-coll-effect-count {font-size: 14px; color: var(--pt-coll-muted);}
.pt-coll-effect-link svg {flex: none;}

/* Find a Product */
.pt-coll a.pt-coll-finder {margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px 48px; background: #2b2b2b; color: #fff; border-radius: var(--pt-coll-radius);}
.pt-coll-finder > span:first-child {display: flex; flex-direction: column; gap: 8px;}
.pt-coll-finder-title {font-family: 'Futura PT W01 Light', sans-serif; font-size: 40px; line-height: 1.1;}
.pt-coll-finder-sub {font-size: 16px; color: #d0d0d0;}
.pt-coll-finder-go {display: flex; align-items: center; gap: 14px; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;}
.pt-coll a.pt-coll-finder:hover .pt-coll-finder-go {text-decoration: underline; text-underline-offset: 6px;}

/* Showroom + samples */
.pt-coll-panels {display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 24px;}
.pt-coll-panel {background: #f8f8f8; border-radius: var(--pt-coll-radius); padding: 48px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start;}
.pt-coll .pt-coll-panel h2 {margin: 0; font-family: 'Futura PT W01 Light', sans-serif; font-weight: normal; font-size: 28px; text-align: left;}
.pt-coll-panel p {margin: 0; font-size: 16px; line-height: 1.6; color: var(--pt-coll-soft);}
.pt-coll a.pt-coll-btn {display: inline-flex; align-items: center; min-height: 44px; padding: 12px 24px; box-sizing: border-box; border-radius: 4px; background: var(--pt-coll-ink); color: #fff; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;}

/* Phones */
@media screen and (max-width: 760px) {
	body.pt-collection-page #main.pt-coll {width: 98%; padding-bottom: 72px;}
	.pt-coll-intro {padding: 56px 0 32px;}
	.pt-coll-desc {font-size: 17px; margin-top: 18px;}
	.pt-coll-bar {align-items: stretch;}
	.pt-coll-nav {flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 2vw; scrollbar-width: none;}
	.pt-coll-nav::-webkit-scrollbar {display: none;}
	.pt-coll-nav-link {flex: none;}
	/* Centred when the links fit; when they don't, the row still scrolls from the first link
	   (auto margins, rather than justify-content: center, which would cut off the start) */
	.pt-coll-nav-link:first-child {margin-left: auto;}
	.pt-coll-nav-link:last-child {margin-right: auto;}
	.pt-coll-sort {justify-content: center;}
	.pt-coll-section {padding-top: 56px;}
	.pt-coll .pt-coll-head h2, .pt-coll-browse h2 {font-size: 26px;}
	.pt-coll-head {margin-bottom: 20px;}
	.pt-coll-grid, .pt-coll-grid--wide {grid-template-columns: 1fr; gap: 24px;}
	.pt-coll-card--wide .pt-coll-media {aspect-ratio: 900 / 977;} /* phones: the portrait crop for the New cards too */
	.pt-coll-text, .pt-coll-card--wide .pt-coll-text {padding: 20px 20px 22px;}
	.pt-coll .pt-coll-name {font-size: 24px;}
	.pt-coll-card--wide .pt-coll-name {font-size: 26px;}
	.pt-coll-effects {grid-template-columns: 1fr; gap: 12px;}
	.pt-coll-effect-link {min-height: 72px; padding: 18px 20px;}
	.pt-coll a.pt-coll-finder {padding: 28px 24px; margin-top: 24px;}
	.pt-coll-finder-title {font-size: 28px;}
	.pt-coll-finder-go {font-size: 0; gap: 0;} /* arrow only */
	.pt-coll-panels {grid-template-columns: 1fr;}
	.pt-coll-about h2, .pt-coll-faq h2 {font-size: 26px; margin-bottom: 20px;}
	.pt-coll-about-text {font-size: 17px;}
	.pt-coll-faq-list {grid-template-columns: 1fr; gap: 12px;}
	.pt-coll-qa {padding: 22px 20px;}
	.pt-coll-panel {padding: 32px 24px;}
}