/**
 * PrintifySign — Inspiration Platform Styles (STEP 6)
 * Scoped under .psd-inspiration to avoid Porto theme bleed.
 * Responsive: 4 / 2 / 1 columns. No horizontal scroll on mobile.
 */

.psd-inspiration {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 64px;
	box-sizing: border-box;
	font-family: inherit;
}

.psd-inspiration *,
.psd-inspiration *::before,
.psd-inspiration *::after {
	box-sizing: border-box;
}

/* Hero */
.psd-inspiration__hero {
	text-align: center;
	margin-bottom: 24px;
}

.psd-inspiration__title {
	font-size: 28px;
	line-height: 1.2;
	margin: 0 0 8px;
	font-weight: 700;
}

.psd-inspiration__subtitle {
	font-size: 15px;
	color: #666;
	margin: 0;
}

/* Search */
.psd-inspiration__search {
	position: relative;
	max-width: 520px;
	margin: 0 auto 20px;
}

.psd-inspiration__search-input {
	width: 100%;
	padding: 12px 40px 12px 16px;
	font-size: 15px;
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.15s ease;
}

.psd-inspiration__search-input:focus {
	border-color: #1a1a1a;
}

.psd-inspiration__search-clear {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 4px 8px;
}

/* Filter chips */
.psd-inspiration__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 24px;
}

.psd-inspiration__chip {
	border: 1px solid #d9d9d9;
	background: #fff;
	color: #333;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
}

.psd-inspiration__chip:hover {
	border-color: #1a1a1a;
}

.psd-inspiration__chip.is-active {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

/* Grid */
.psd-inspiration__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/* Card */
.psd-card {
	border: 1px solid #ececec;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.psd-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
}

.psd-card__thumb {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #f3f3f3;
	overflow: hidden;
}

.psd-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.psd-card__thumb--placeholder {
	background: repeating-linear-gradient(
		45deg,
		#f3f3f3,
		#f3f3f3 12px,
		#ececec 12px,
		#ececec 24px
	);
}

.psd-card__body {
	padding: 14px 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 auto;
}

.psd-card__title {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

.psd-card__scene {
	font-size: 13px;
	color: #777;
	margin: 0;
}

.psd-card__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 2px;
}

.psd-card__pill {
	font-size: 11px;
	padding: 3px 9px;
	border-radius: 999px;
	background: #f0f0f0;
	color: #555;
	line-height: 1.4;
}

.psd-card__pill--featured {
	background: #fff3d6;
	color: #8a5a00;
}

.psd-card__pill--led {
	background: #e9f0ff;
	color: #2d4ea0;
}

.psd-card__cta {
	margin-top: auto;
	border: 0;
	background: #1a1a1a;
	color: #fff;
	padding: 11px 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.psd-card__cta:hover {
	background: #000;
}

/* Empty state */
.psd-inspiration__empty {
	text-align: center;
	padding: 48px 16px;
	color: #777;
}

.psd-inspiration__empty-msg {
	font-size: 16px;
	margin: 0 0 16px;
}

.psd-inspiration__empty-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.psd-inspiration__empty-btn {
	border: 1px solid #d9d9d9;
	background: #fff;
	padding: 9px 16px;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
}

.psd-inspiration__empty-btn:hover {
	border-color: #1a1a1a;
}

/* Responsive: tablet */
@media (max-width: 900px) {
	.psd-inspiration__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Responsive: mobile */
@media (max-width: 560px) {
	.psd-inspiration__grid {
		grid-template-columns: 1fr;
	}

	.psd-inspiration__title {
		font-size: 23px;
	}

	.psd-inspiration__filters {
		flex-wrap: nowrap;
		overflow-x: auto;
		justify-content: flex-start;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
	}
}

/* ===================================================================
   Phase 16B — Inspiration feed cards (feed.js renderer)
   feed.js uses hyphen-single class names; the older BEM (__) rules above
   target a different renderer. These rules style the LIVE feed cards.
   CSS-only; no feed.js / routing / data changes. Matches the existing
   .psd-card shell (white, 12px radius) + platform gold accents.
   =================================================================== */
.psd-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f3f3f3;
    overflow: hidden;
    position: relative;
}
.psd-card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.psd-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c1815 0%, #2a2420 100%);
}
.psd-card-thumb-placeholder-mark {
    width: 32px;
    height: 32px;
    border: 2px solid var(--psd-l-gold, #d4a23a);
    border-radius: 6px;
    opacity: 0.55;
}
.psd-card-category-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(20, 17, 15, 0.72);
    color: #f7f4ef;
    font-family: var(--psd-l-font-display, system-ui, sans-serif);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.psd-card-body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
}
.psd-card-title {
    margin: 0;
    font-family: var(--psd-l-font-display, system-ui, sans-serif);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--psd-l-ink, #14110f);
    /* slug→title: convert hyphens visually via the renderer's text; here we
       just ensure clean casing presentation */
    text-transform: capitalize;
}
.psd-card-description {
    margin: 0;
    font-family: var(--psd-l-font-body, system-ui, sans-serif);
    font-size: 13.5px;
    line-height: 1.5;
    color: rgba(20, 17, 15, 0.62);
}
.psd-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}
.psd-card-tag {
    font-family: var(--psd-l-font-body, system-ui, sans-serif);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(20, 17, 15, 0.55);
    background: rgba(20, 17, 15, 0.05);
    border: 1px solid rgba(20, 17, 15, 0.08);
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: capitalize;
}
.psd-card-action {
    appearance: none;
    -webkit-appearance: none;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    background: var(--psd-l-ink, #14110f);
    color: #f7f4ef;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-family: var(--psd-l-font-display, system-ui, sans-serif);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 200ms ease, transform 200ms ease;
}
.psd-card-action:hover {
    background: var(--psd-l-gold, #d4a23a);
    color: var(--psd-l-ink, #14110f);
    transform: translateY(-1px);
}
.psd-card-action:focus-visible {
    outline: 2px solid var(--psd-l-gold, #d4a23a);
    outline-offset: 2px;
}
.psd-card-action-arrow {
    transition: transform 200ms ease;
}
.psd-card-action:hover .psd-card-action-arrow {
    transform: translateX(3px);
}

/* ===================================================================
   Phase 16F — Scene/placeholder containment (Cafe oversized bleed fix)
   The feed.js thumb (.psd-card-thumb) is already contained (16B). The
   spaces renderer uses the BEM variant (.psd-card__thumb) and data-scene-id
   scenes that can render oversized and escape the card. These rules clip
   ALL thumbnail variants + their scene children to the card box. CSS-only;
   no feed.js / filter.js / inspiration-spaces.js / data changes.
   =================================================================== */

/* Containment on every thumbnail variant (BEM + hyphen + placeholder) */
.psd-card-thumb,
.psd-card__thumb,
.psd-card-thumb-placeholder,
.psd-card__thumb--placeholder {
    position: relative;
    overflow: hidden;
    contain: paint;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-width: 100%;
    box-sizing: border-box;
}

/* Any direct child (generated scene, big business-name text, glow layers)
   is clipped to the thumbnail box and cannot overflow the card. */
.psd-card-thumb > *,
.psd-card__thumb > *,
.psd-card-thumb-placeholder > * {
    max-width: 100%;
    max-height: 100%;
}

/* Absolutely-positioned scene layers: keep them inside the thumb box.
   (A scene escaping via position:absolute ignores the parent's normal
   flow but is still clipped by the parent's overflow:hidden above; this
   pins the bounds so nothing renders outside 0/0→100%/100%.) */
.psd-card-thumb > [class*="scene"],
.psd-card__thumb > [class*="scene"],
.psd-card-thumb [style*="position:absolute"],
.psd-card__thumb [style*="position:absolute"] {
    inset: 0;
    max-width: 100%;
    max-height: 100%;
}

/* Photo thumbnails stay cover-fitted (unchanged behaviour, restated so the
   containment rules above can't loosen image fitting). */
.psd-card-thumb-img,
.psd-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
