@charset "UTF-8";

/*
 * Ported from wp-content/themes/swell_child/assets/sale-index.css. The
 * source file's #breadcrumb/#sidebar hide rules for this page are
 * dropped entirely (not scope-adjusted): they existed only to hide
 * SWELL's own duplicate breadcrumb and default sidebar, neither of
 * which this theme renders. CSS custom properties from the source file
 * are retargeted to this theme's own tokens (prefixed hd-c- instead of
 * c-, e.g. --c-main becomes --hd-c-main; defined in style.css); the
 * source's 599px SP breakpoint is retargeted to this theme's common
 * 900px boundary. See
 * release-records/theme-independent-1.0.0-phase4-sale-index.md for the
 * two PR #53 corrections layered on top of this otherwise-unchanged port.
 */

.hd-sale-index-page {
	background: var(--hd-page-bg);
}

.hd-sale-index {
	padding: 24px 14px 70px;
	color: #333;
	font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
	line-height: 1.7;
}

.hd-sale-index .sale-page {
	width: min(100%, 1080px);
	min-height: 70vh;
	margin: 0 auto;
	background: #fff;
}

.hd-sale-index .num {
	font-family: "Inter", "Noto Sans JP", sans-serif;
}

.hd-sale-index .breadcrumb {
	padding: 14px 28px 0;
	color: #999;
	font-size: 11.5px;
}

.hd-sale-index .breadcrumb a {
	color: var(--hd-c-dark);
	text-decoration: underline;
	text-decoration-thickness: 1.2px;
	text-underline-offset: 2px;
}

.hd-sale-index .page-head {
	padding: 16px 28px 20px;
	border-bottom: 1px solid var(--hd-c-border);
}

.hd-sale-index .page-head h1 {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	color: #333;
	font-size: 21px;
	font-weight: 700;
}

.hd-sale-index .h1-sale-tag {
	padding: 3px 10px;
	border-radius: 4px;
	background: #e24b4a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.hd-sale-index .filter-wrap {
	padding: 18px 28px 0;
}

.hd-sale-index .filter-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hd-sale-index .filter-chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border: 1px solid var(--hd-c-border-strong);
	border-radius: 20px;
	background: #fff;
	color: var(--hd-c-dark);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
}

.hd-sale-index .filter-chip:hover {
	background: var(--hd-c-light2);
}

.hd-sale-index .filter-chip.on {
	border-color: var(--hd-c-main);
	background: var(--hd-c-main);
	color: #fff;
}

.hd-sale-index .result-line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 14px 28px 0;
	color: #555;
	font-size: 11.5px;
}

.hd-sale-index .result-line b {
	color: #333;
	font-size: 13px;
}

.hd-sale-index .sale-section {
	padding: 28px;
}

/*
 * 1.0.25: 4-column (PC) / 2-column (SP) grid, columns split the available
 * grid width evenly via minmax(0,1fr) instead of 1.0.24's minmax(0,240px)/
 * minmax(0,170px) column cap + justify-content:center. The 240px/170px cap
 * left unused space inside .sale-section's 28px/16px padding (e.g. ~1024px
 * of grid width only used ~960px at 4x240px+3x10px); 1fr columns instead
 * consume the full 1024px (PC) / 358px (SP) available width every time, so
 * the outer card edges land flush with .sale-section's own padding edge.
 * gap stays a fixed 10px, not redistributed into column width.
 * This same .sale-grid/.work-card scope also covers search.php's results
 * grid (search.php reuses this file's classes directly, see
 * functions.php's hdtheme_enqueue_assets()).
 */
/*
 * Shared by search.php, taxonomy-work_genre.php, and
 * taxonomy-bust_highlight.php via paimori_theme_work_archive_body_html()
 * (inc/sale-index.php).
 */
.hd-sale-index .result-count {
	margin: 0 0 14px;
	font-size: 14px;
	color: #555;
}

.hd-sale-index .result-count .num {
	font-size: 16px;
	font-weight: bold;
	color: var(--hd-c-dark);
}

.hd-sale-index .sale-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

@media (max-width: 900px) {
	.hd-sale-index .sale-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/*
 * Card body (.work-card and everything inside it, including its :hover/
 * :focus-within states) is styled once, shared across every page, by
 * assets/css/common-work-card.css (enqueued as a dependency of this file
 * -- see functions.php's hdtheme_enqueue_assets()). 1.0.22 kept an
 * independent copy here; 1.0.23 removed it in favor of the shared file --
 * see
 * release-records/theme-independent-1.0.23-common-work-card-css-consolidation.md.
 */

/*
 * Pagination (1.0.12): ported from the v9 creator-page design, i.e. its
 * existing implementation -- wp-content/themes/swell_child's
 * hdchild_entity_pagination() (inc/entity-pages.php, WordPress core's own
 * paginate_links(), type=>'list') and the matching .entity-pagination CSS
 * (assets/entity-pages.css) -- replacing the previous "load more" AJAX
 * button. Values (box size, border, radius, colors) are carried over
 * unchanged; --c-main/--c-border-strong there are the exact same hex
 * values as this theme's own --hd-c-main/--hd-c-border-strong tokens, so
 * no new color is introduced. paginate_links() with no current/previous
 * page simply omits that link (no separate ".disabled" state to style,
 * matching the source, which has none either). No SP-specific override
 * exists in the source and none is added here either -- one PC/SP design,
 * per the v9 source itself.
 */
.hd-sale-index .sale-pagination {
	margin-top: 28px;
	padding: 0 28px 30px;
}

.hd-sale-index .sale-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hd-sale-index .sale-pagination a,
.hd-sale-index .sale-pagination span {
	display: grid;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	place-items: center;
	border: 1px solid var(--hd-c-border-strong);
	border-radius: 5px;
	color: #333;
	font-size: 12px;
	text-decoration: none;
}

.hd-sale-index .sale-pagination .current {
	border-color: var(--hd-c-main);
	background: var(--hd-c-main);
	color: #fff;
}

.hd-sale-index .sale-empty {
	padding: 42px 20px;
	border: 1px solid var(--hd-c-border);
	border-radius: 10px;
	background: var(--hd-c-light2);
	text-align: center;
}

.hd-sale-index .sale-empty h2 {
	margin: 0 0 8px;
	font-size: 17px;
}

.hd-sale-index .sale-empty p {
	margin: 0;
	font-size: 13px;
}

@media (max-width: 900px) {
	.hd-sale-index {
		padding: 14px 0 48px;
	}

	.hd-sale-index .breadcrumb {
		padding: 12px 16px 0;
	}

	.hd-sale-index .page-head {
		padding: 14px 16px 16px;
	}

	.hd-sale-index .page-head h1 {
		font-size: 17px;
	}

	.hd-sale-index .filter-wrap {
		padding: 16px 16px 0;
	}

	.hd-sale-index .filter-chip {
		padding: 8px 13px;
		font-size: 12px;
	}

	.hd-sale-index .result-line {
		gap: 12px;
		padding: 12px 16px 0;
	}

	.hd-sale-index .sale-section {
		padding: 20px 16px;
	}

	/* .sale-grid's own card-width switch (163px) is set by the dedicated
	   @media(max-width:900px) block declared with .sale-grid above. Card
	   body's own SP typography/FANZA-button overrides now live in
	   common-work-card.css's @media(max-width:900px) block -- neither is
	   redeclared here. */

	.hd-sale-index .sale-pagination {
		padding: 0 16px 30px;
	}
}
