/* ==========================================================================
   Single product details page.
   The accordion (.overview-section / .overview-heading / ...) is the SAME
   markup + styling as the Fabrics single page accordion.
   ========================================================================== */
.psd-page {
	--psd-font: "Futura Book", "Futura", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--psd-black: #111111;
	font-family: var(--psd-font);
	color: var(--psd-black);
}

/* --psd-pl / --psd-pr = left / right margin of the hero and the title row, measured
   by product-single.js from the "Discover Projects" slider. --psd-left is only the
   fallback used until the script has measured. */
/* The theme's row is a flex container: without this the page is sized by its
   content (a fixed-width full-bleed slider inside can push it past the screen on
   mobile, so the right side loses its space and the accordion "+" is cut off).
   Always exactly as wide as the space it is given. */
.psd-page { --psd-left: clamp(20px, 3.6vw, 56px); width: 100%; max-width: 100%; min-width: 0; flex: 1 1 100%; box-sizing: border-box; }

.psd-section { margin: 0 0 70px; }
.psd-hero { margin: 0 var(--psd-mr, 0) 60px var(--psd-ml, 0); padding: 0 var(--psd-pr, var(--psd-left)) 0 var(--psd-pl, var(--psd-left)); box-sizing: border-box; }

/* The Projects / Variants / Related sliders keep their own design untouched;
   the hero and the title row are aligned TO the "Discover Projects" slider. */

/* ----- Section 2: text | slider ----- */
.psd-main {
	display: flex;
	align-items: flex-start;
	gap: 70px;
	/* Full width, with the SAME left/right margin as the "Discover Projects" /
	   variants / related slider headings: product-single.js measures where those
	   headings start and sets --psd-left (the fallback is only used until then). */
	width: auto;
	max-width: none;
	margin: 0 var(--psd-mr, 0) 70px var(--psd-ml, 0);
	padding: 0 var(--psd-pr, var(--psd-left)) 0 var(--psd-pl, var(--psd-left));
	box-sizing: border-box;
}
.psd-main--slider-left { flex-direction: row-reverse; }
.psd-main__text   { flex: 0 0 44%; max-width: 44%; min-width: 0; }
/* contain: inline-size => whatever slider/shortcode is pasted here can NEVER make
   this column wider than the space it is given (that was the "slider runs off the
   screen when the 2 columns stack into 1" problem). */
.psd-main__slider { flex: 1 1 auto; min-width: 0; max-width: 100%; contain: inline-size; }
.psd-main__slider > * { max-width: 100%; }
.psd-main:not(:has(.psd-main__slider)) .psd-main__text { flex-basis: 100%; max-width: 100%; }

/* Desktop (>800px): two columns on a grid, so the side slider starts at the SAME top as
   the accordion (below the title and the breadcrumb), not at the top of the title.
   The text wrapper is "display: contents", so its title / breadcrumb / accordion
   become grid items of the row themselves. */
@media (min-width: 801px) {
	.psd-main {
		display: grid;
		grid-template-columns: 44% minmax(0, 1fr);
		column-gap: 70px;
		row-gap: 0;
		align-items: start;
	}
	.psd-main--slider-left { grid-template-columns: minmax(0, 1fr) 44%; }
	.psd-main:not(:has(.psd-main__slider)) { grid-template-columns: minmax(0, 1fr); }

	.psd-main__text { display: contents; }
	.psd-main__text > * { min-width: 0; }

	/* text column: title, breadcrumb, accordion */
	.psd-main__text > .psd-title      { grid-column: 1; grid-row: 1; }
	.psd-main__text > .psd-breadcrumb { grid-column: 1; grid-row: 2; }
	.psd-main__text > .psd-accordion  { grid-column: 1; grid-row: 3; margin-top: 0; }
	/* side slider: top = top of the accordion */
	.psd-main__slider { grid-column: 2; grid-row: 3; align-self: start; max-width: 100%; }

	/* slider on the left: swap the two columns */
	.psd-main--slider-left .psd-main__text > .psd-title,
	.psd-main--slider-left .psd-main__text > .psd-breadcrumb,
	.psd-main--slider-left .psd-main__text > .psd-accordion { grid-column: 2; }
	.psd-main--slider-left .psd-main__slider { grid-column: 1; }

	.psd-main:not(:has(.psd-main__slider)) .psd-main__text > * { grid-column: 1; }
}
@media (min-width: 801px) and (max-width: 1024px) {
	.psd-main { column-gap: 40px; }
}

/* Breadcrumb (same look as the fabric breadcrumb) */
.psd-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-size: 14px;
	line-height: 1.4;
	margin: 0 0 30px;
}
.psd-breadcrumb a { color: #8c8c8c !important; text-decoration: none !important; font-weight: 400; transition: color .2s ease; }
.psd-breadcrumb a:hover { color: #111111 !important; }
.psd-crumb-sep {
	display: inline-block;
	width: 6px; height: 6px;
	margin: 0 12px;
	border-top: 1.5px solid #979797;
	border-right: 1.5px solid #979797;
	transform: rotate(45deg);
}
.psd-crumb-current { color: #111111; font-weight: 500; }

.psd-title {
	font-size: 44px;
	font-weight: 500;
	letter-spacing: -0.5px;
	line-height: 1.15;
	margin: 0 0 14px; /* title first, the breadcrumb sits right below it */
}

/* ----- Accordion: identical to the Fabrics page ----- */
.psd-accordion { margin-top: 10px; }
.overview-heading {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	padding: 20px 0 16px;
	border-bottom: 0; /* the borders now belong to the item (top + bottom), see .psd-acc-item */
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	user-select: none;
}
.overview-toggle-icon { display: inline-block; font-size: 20px; font-weight: 400; line-height: 1; }
.overview-toggle-icon::before { content: '\2212'; }
.overview-body {
	display: grid;
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows .45s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s;
}
.overview-body-inner { overflow: hidden; min-height: 0; }
.overview-body-inner::before { content: ''; display: block; height: 24px; }
.overview-heading-text { display: inline-block; }
/* Borders above and below every item. Neighbouring items share one line (each item
   draws its top line, the last item also draws its bottom line). On hover, or while an
   item is open, BOTH of its lines turn black. */
.psd-acc-item { border-top: 1px solid #999999; transition: border-color .2s ease; }
.psd-acc-item:last-child { border-bottom: 1px solid #999999; }
.psd-acc-item:hover,
.psd-acc-item.is-open { border-top-color: #000000; }
.psd-acc-item:hover + .psd-acc-item,
.psd-acc-item.is-open + .psd-acc-item { border-top-color: #000000; }
.psd-acc-item:last-child:hover,
.psd-acc-item:last-child.is-open { border-bottom-color: #000000; }
.psd-acc-text { font-size: 13px; color: #444; line-height: 1.6; margin: 0 0 20px; }

@media (prefers-reduced-motion: reduce) {
	.overview-body, .overview-heading, .overview-heading-text, .overview-toggle-icon { transition: none !important; }
}
@media (min-width: 801px) {
	.psd-acc-item.is-closed .overview-body { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .45s cubic-bezier(.4,0,.2,1), visibility 0s linear .45s; }
	.psd-acc-item.is-closed .overview-toggle-icon::before { content: '+'; }
}
@media (max-width: 800px) {
	.psd-acc-item:not(.is-expanded) .overview-body { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .45s cubic-bezier(.4,0,.2,1), visibility 0s linear .45s; }
	.psd-acc-item:not(.is-expanded) .overview-toggle-icon::before { content: '+'; }
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
	.psd-main { gap: 40px; }
	.psd-title { font-size: 36px; }
}
@media (max-width: 800px) {
	.psd-main, .psd-main--slider-left { flex-direction: column; align-items: stretch; gap: 30px; padding: 0 var(--psd-pr, var(--psd-left)) 0 var(--psd-pl, var(--psd-left)); }
	.psd-main__text, .psd-main__slider { flex: 0 0 auto; max-width: 100%; width: 100%; min-width: 0; }
	.psd-title { font-size: 30px; }
	.psd-section { margin-bottom: 50px; }
}

/* ----- Accordion contents ----- */
/* 1. Product Variants: 4 per row. Same tile look as the variant thumbnails on the product
   grid cards (1px border, 2px padding, light background, image "contain", dark border on
   hover); the picture is the variant's hover image. The title sits under each tile. */
.psd-var-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; align-items: start; }
.psd-var { display: flex; flex-direction: column; align-items: stretch; min-width: 0; text-decoration: none !important; color: inherit !important; }
.psd-var__img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	border: 1px solid #e5e5e5;
	padding: 2px;
	box-sizing: border-box;
	background: #fafafa;
	cursor: pointer;
	transition: border-color .2s ease;
}
.psd-var__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.psd-var__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.25;
	color: #777777;
	text-align: center;
	word-break: break-word;
	transition: color .2s ease;
}
a.psd-var:hover .psd-var__img,
a.psd-var:focus-visible .psd-var__img { border-color: #111111; }
a.psd-var:hover .psd-var__title { color: #111111; }

/* 2. Overview */
.psd-overview { display: block; }
.psd-ov-row { margin-bottom: 18px; }
.psd-ov-label { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8c8c8c; margin-bottom: 4px; }
.psd-ov-value { display: block; font-size: 16px; line-height: 1.4; }

/* 3. Dimension: label + value pairs, two per row (one per row on mobile) */
.psd-dim-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
@media (max-width: 800px) { .psd-dim-rows { grid-template-columns: minmax(0, 1fr); } }
.psd-dim-img { display: block; max-width: 100%; height: auto; margin-bottom: 14px; }

/* 4. Designer */
.psd-designer { display: flex; gap: 20px; align-items: flex-start; }
.psd-designer__img { width: 130px; max-width: 35%; height: auto; flex: 0 0 auto; }
.psd-designer__body { min-width: 0; }
.psd-designer__name { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 0 0 8px; }
.psd-link { display: inline-block; font-size: 14px; color: #111 !important; text-decoration: underline !important; text-underline-offset: 3px; }

/* 5. Downloads */
.psd-downloads { display: flex; flex-direction: column; }
.psd-dl { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e3e3e3; font-size: 15px; color: #111 !important; text-decoration: none !important; }
.psd-dl:hover { color: #000 !important; }
.psd-dl:hover svg { transform: translateY(2px); }
.psd-dl svg { transition: transform .2s ease; }

@media (max-width: 800px) {
	.psd-designer { flex-direction: column; }
	.psd-designer__img { max-width: 60%; }
}

/* Product detail pages (single-ps_detail): no top padding on the theme's main area,
   so the page starts right under the header. Only these pages are affected. */
body.single-ps_detail #main,
body.single-ps_detail #main > .fusion-row {
	padding-top: 0 !important;
}

/* ----- Downloads accordion: the "Product Card (PDF)" button looks like the other rows ----- */
button.psd-dl { width: 100%; background: none; border: 0; border-bottom: 1px solid #e3e3e3; text-align: left; cursor: pointer; font-family: inherit; }
button.psd-dl:disabled { cursor: progress; }

/* ----- The PDF page (hidden on screen; cloned and rendered into the PDF) ----- */
.psd-pdf {
	width: 1100px;
	padding: 40px 50px 50px;
	box-sizing: border-box;
	background: #fff;
	color: #111;
	font-family: var(--psd-font, "Futura Book", "Futura", Arial, sans-serif);
}
.psd-pdf__header { display: flex; justify-content: center; margin-bottom: 28px; }
.psd-pdf__logo { height: 130px; width: auto; max-width: 480px; object-fit: contain; display: block; }
.psd-pdf__site { margin: 0; font-size: 34px; font-weight: 600; }
.psd-pdf__title { margin: 0 0 28px; font-size: 52px; font-weight: 500; line-height: 1.1; letter-spacing: -.5px; }
.psd-pdf__cols { display: flex; gap: 50px; align-items: flex-start; }
.psd-pdf__media { flex: 0 0 48%; max-width: 48%; }
.psd-pdf__media img { display: block; width: 100%; height: auto; }
.psd-pdf__info { flex: 1 1 auto; min-width: 0; }
.psd-pdf__h { margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #999; font-size: 22px; font-weight: 600; }
.psd-pdf__info .psd-pdf__h:not(:first-child) { margin-top: 30px; }
.psd-pdf__section { margin-top: 36px; }
.psd-pdf__dim { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; margin: 0 auto; }
.psd-pdf .psd-var-grid { gap: 16px 10px; }
.psd-pdf .psd-var__title { font-size: 13px; }
.psd-pdf .psd-designer { display: flex !important; flex-direction: row !important; gap: 24px; align-items: flex-start; }
.psd-pdf .psd-designer__img { width: 140px; max-width: 140px; }

/* Titles of the Family / Related product sliders: no left padding (a page-level custom CSS
   rule adds 8px, which pushed the heading away from the cards and the Projects slider). */
body .psd-page h2.ps-slider__title,
body .psd-page .ps-slider__title {
	padding-left: 0 !important;
}
