/* Categories page (page-categories.php) – semantic tokens only, so Light and Dark both work. */

.promptix-categories-page { padding-bottom: 56px; }
.promptix-main:has(> .promptix-categories-page) { padding-top: 0; }

.pxg-grad { padding-left: .06em; background: linear-gradient(-90deg, var(--color-purple) 0%, var(--color-primary) 55%, var(--color-cyan) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pxg-title { margin: 0; font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: var(--text-heading); }
.pxg-lead { margin: 4px 0 0; color: var(--text-secondary); }

.pxg-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--color-cyan); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pxg-badge__icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--badge-primary-bg); color: var(--color-primary); }

/* Hero */
.pxg-hero { position: relative; overflow: hidden; padding: 20px 0 40px; background: var(--gradient-soft); border-bottom: 1px solid var(--border-default); }
.pxg-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.pxg-breadcrumb { margin-bottom: 28px; font-size: 13px; }
.pxg-breadcrumb li + li::before { content: "›"; }
.pxg-breadcrumb a { display: inline-flex; align-items: center; gap: 6px; }
.pxg-hero__title { margin: 0 0 16px; font-size: clamp(2.125rem, 4vw, 3.25rem); font-weight: 800; font-style: italic; line-height: 1.08; letter-spacing: -.02em; color: var(--text-heading); }
.pxg-hero__lead { max-width: 560px; margin: 0 0 24px; font-size: 1.0625rem; color: var(--text-body); }

.pxg-search { position: relative; display: flex; align-items: center; max-width: 600px; padding: 6px 50px 6px 6px; border: 1.5px solid var(--color-cyan); border-radius: var(--radius-pill); background: var(--bg-input); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-cyan) 12%, transparent), var(--shadow-md); }
.pxg-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 4px var(--ui-focus-glow), var(--shadow-md); }
.pxg-search__icon { position: absolute; right: 18px; display: flex; color: var(--text-secondary); }
.pxg-search__input { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; background: transparent; color: var(--text-heading); font: inherit; outline: 0; }
.pxg-search__input::placeholder { color: var(--text-muted); }
.pxg-search__input::-webkit-search-cancel-button { cursor: pointer; }
.pxg-search__submit { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--gradient-cyan); color: var(--text-inverse); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.pxg-search__submit:hover { transform: translateX(-2px); box-shadow: var(--shadow-md); }

.pxg-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; }
.pxg-popular__label { color: var(--text-heading); font-size: 13px; font-weight: 600; }
.pxg-popular ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pxg-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--bg-card); color: var(--text-body); font-size: 12px; font-weight: 500; transition: color .2s ease, border-color .2s ease; }
.pxg-pill:hover { color: var(--color-primary); border-color: var(--color-primary); }
.pxg-pill.is-hot { color: var(--color-cyan); border-color: var(--color-cyan); }

.pxg-hero__art { position: relative; display: grid; place-items: center; min-height: 320px; overflow: hidden; border-radius: var(--radius-xl); background: var(--gradient-primary); color: var(--text-inverse); box-shadow: var(--shadow-lg); }
.pxg-hero__art::before { content: ""; position: absolute; inset: -80px -60px auto auto; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.pxg-hero__art.has-image { background: var(--navy-900); }
.pxg-hero__art.has-image::before { display: none; }
.pxg-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pxg-hero__glyph { position: relative; opacity: .85; }
.pxg-hero__words { position: absolute; top: 20px; left: 22px; z-index: 1; display: grid; margin: 0; padding-right: 12px; border-right: 2px solid rgba(255, 255, 255, .6); color: var(--text-inverse); font-size: 1.25rem; font-style: italic; font-weight: 600; line-height: 1.3; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.pxg-hero__tagline { position: absolute; left: 22px; bottom: 18px; z-index: 1; max-width: 160px; margin: 0; color: var(--text-inverse); font-size: 1.125rem; font-weight: 700; font-style: italic; line-height: 1.2; text-align: left; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }

/* Sections */
.pxg-main { display: grid; gap: 40px; padding-top: 28px; }
.pxg-main--more { padding-top: 40px; }
.pxg-section { scroll-margin-top: calc(var(--header-height) + 16px); }
.pxg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pxg-more { min-height: 38px; padding: 8px 14px; border-color: var(--border-strong); background: var(--bg-card); color: var(--text-heading); font-size: 13px; }
.pxg-more:hover { border-color: var(--color-primary); color: var(--color-primary); }

.pxg-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: var(--radius-lg); background: var(--tone, var(--color-primary)); color: var(--text-inverse); box-shadow: 0 6px 18px color-mix(in srgb, var(--tone, var(--color-primary)) 40%, transparent); }
.pxg-icon--sm { width: 46px; height: 46px; }

.pxg-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; color: var(--text-secondary); font-size: 14px; }
.pxg-counts--sm { font-size: 12px; }
.pxg-dot { color: var(--text-muted); }

/* Featured categories */
.pxg-featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.pxg-feature { position: relative; display: flex; min-height: 180px; overflow: hidden; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-sm); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.pxg-feature:hover { border-color: var(--tone); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pxg-feature:not(.has-image) { background: linear-gradient(-135deg, var(--tone-bg) 0%, var(--bg-card) 70%); }
.pxg-feature__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pxg-feature:hover .pxg-feature__img { transform: scale(1.04); }
.pxg-feature.has-image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(-90deg, rgba(17, 24, 39, .88) 0%, rgba(17, 24, 39, .55) 55%, rgba(17, 24, 39, .15) 100%), linear-gradient(0deg, rgba(17, 24, 39, .75) 0%, transparent 60%); }
.pxg-feature__body { position: relative; z-index: 2; display: flex; flex: 1; flex-direction: column; padding: 18px 18px 16px; }
.pxg-feature__body .pxg-icon { margin-bottom: 14px; }
.pxg-feature__name { margin: 0 0 4px; font-size: 1.1875rem; font-weight: 700; color: var(--text-heading); }
.pxg-feature__name a { color: inherit; }
.pxg-feature__name a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.pxg-feature__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.pxg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pxg-chips li { padding: 3px 12px; border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--bg-subtle); color: var(--text-body); font-size: 12px; }
.pxg-go { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-right: auto; border-radius: 50%; background: var(--tone); color: var(--text-inverse); transition: transform .2s ease; }
.pxg-feature:hover .pxg-go { transform: translateX(-3px); }

/* Over a photo the text stays light in both colour schemes. */
.pxg-feature.has-image .pxg-feature__name { color: var(--text-inverse); }
.pxg-feature.has-image .pxg-counts,
.pxg-feature.has-image .pxg-dot { color: rgba(255, 255, 255, .82); }
.pxg-feature.has-image .pxg-chips li { border-color: rgba(255, 255, 255, .25); background: rgba(17, 24, 39, .55); color: var(--text-inverse); backdrop-filter: blur(4px); }

/* All categories */
.pxg-sort select { min-width: 190px; min-height: 38px; padding: 6px 12px; font-size: 13px; color: var(--text-heading); }
.pxg-all { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pxg-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-xs); transition: border-color .2s ease, box-shadow .2s ease; }
.pxg-row:hover { border-color: var(--tone); box-shadow: var(--shadow-md); }
.pxg-row[hidden] { display: none; }
.pxg-row__text { display: grid; flex: 1; min-width: 0; gap: 4px; }
.pxg-row__name { overflow: hidden; color: var(--text-heading); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pxg-row__name::after { content: ""; position: absolute; inset: 0; }
.pxg-row__go { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text-secondary); transition: color .2s ease, border-color .2s ease, transform .2s ease; }
.pxg-row:hover .pxg-row__go { border-color: var(--tone); color: var(--tone); transform: translateX(-2px); }
.pxg-empty { margin: 14px 0 0; color: var(--text-secondary); }

/* Tags */
.pxg-tags { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 20px; list-style: none; }
.pxg-tag { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 18px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); color: var(--text-heading); font-size: 13px; font-weight: 500; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.pxg-tag:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pxg-tag.is-hot { border-color: var(--tone); background: var(--tone-bg); color: var(--tone-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 14%, transparent); }

/* Call to action */
.pxg-cta-wrap { margin-top: 44px; }
.pxg-cta { position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 28px; align-items: center; overflow: hidden; padding: 0 0 0 32px; border: 1px solid transparent; border-radius: var(--radius-xl); background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box, linear-gradient(-90deg, var(--color-purple), var(--color-primary), var(--color-cyan)) border-box; box-shadow: var(--shadow-lg); }
.pxg-cta::before { content: ""; position: absolute; inset: 0; background: var(--gradient-soft); pointer-events: none; }
.pxg-cta > * { position: relative; }
.pxg-cta__art { display: grid; place-items: center; align-self: stretch; min-height: 180px; background: var(--gradient-primary); color: var(--text-inverse); }
.pxg-cta__art.has-image { background: transparent; }
.pxg-cta__art img { width: 100%; height: 100%; object-fit: cover; }
.pxg-cta__copy { padding-block: 24px; }
.pxg-cta__copy .pxg-badge { margin-bottom: 8px; }
.pxg-cta__title { margin: 0 0 8px; font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 800; font-style: italic; line-height: 1.15; color: var(--text-heading); }
.pxg-cta__text { max-width: 460px; margin: 0; color: var(--text-body); }
.pxg-cta__side { display: grid; justify-items: center; gap: 22px; padding-block: 24px; }
.pxg-cta__btn { min-height: 46px; padding: 10px 26px; background: var(--gradient-cyan); color: var(--text-inverse); box-shadow: 0 8px 22px color-mix(in srgb, var(--color-cyan) 35%, transparent); }
.pxg-cta__btn:hover { color: var(--text-inverse); transform: translateY(-1px); }
.pxg-cta__stats { display: flex; flex-wrap: wrap; gap: 22px; margin: 0; padding: 0; list-style: none; }
.pxg-cta__stats li { display: flex; align-items: center; gap: 10px; }
.pxg-cta__stat-icon { display: flex; color: var(--cycle-fg); }
.pxg-cta__stats strong { display: block; color: var(--text-heading); font-size: 1rem; line-height: 1.2; }
.pxg-cta__stats small { color: var(--text-secondary); font-size: 12px; }

.pxg-extra { margin-top: 40px; }

@media (max-width: 1199px) {
	.pxg-all { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pxg-cta { grid-template-columns: 200px minmax(0, 1fr); padding-left: 0; }
	.pxg-cta__side { grid-column: 1 / -1; justify-items: start; padding: 0 24px 24px; }
}

@media (max-width: 991px) {
	.pxg-hero__grid { grid-template-columns: 1fr; }
	.pxg-hero__art { min-height: 240px; }
	.pxg-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pxg-all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.pxg-featured, .pxg-all { grid-template-columns: 1fr; }
	.pxg-cta { grid-template-columns: 1fr; }
	.pxg-cta__art { min-height: 140px; }
	.pxg-cta__copy { padding: 20px 20px 0; }
	.pxg-cta__side { padding: 0 20px 20px; }
	.pxg-hero__words { font-size: 1rem; }
	.pxg-tags { padding: 16px; gap: 8px; }
}
