/*
 * HARCHI KOLO Core — Catalog / physical tablet final layer.
 * Catalog owns its cards. This stylesheet is intentionally enqueued after
 * Tablet System so legacy tablet geometry cannot override page-owned card rules.
 */

/* Core 2.0.98.289 — Tablet Portrait Uniform Catalog Cards.
 * Physical tablet + Catalog + portrait only. Landscape remains untouched.
 */
@media (min-width:783px) and (max-width:1024px) and (orientation:portrait) {
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listings-grid {
		align-items:stretch!important;
		align-content:start!important;
		grid-auto-rows:1fr!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listings-grid > .hk-catalog-listing-item {
		display:flex!important;
		align-self:stretch!important;
		height:auto!important;
		min-height:0!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item :is(.hp-listing,.hp-listing--view-block) {
		display:flex!important;
		flex:1 1 auto!important;
		flex-direction:column!important;
		width:100%!important;
		height:100%!important;
		min-height:0!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__content {
		display:flex!important;
		flex:1 1 auto!important;
		flex-direction:column!important;
		min-height:0!important;
	}

	/* Keep short labels/titles from shifting the commercial content upward. */
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item :is(.hp-listing__categories,.hp-listing__category) {
		min-height:25px!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__title {
		min-height:38px!important;
	}

	/* Price/message footer always lands on the same baseline inside equal cards. */
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer {
		margin-top:auto!important;
	}
}

/* ======================================================================
 * Core 2.0.98.316 — Tablet Landscape Catalog Four Compact Cards 1.0
 * Scope: physical tablet + Catalog + landscape only, regardless of the CSS
 * viewport width reported by Android/Samsung browsers.
 *
 * Portrait keeps the approved three-card composition. Landscape gets four
 * compact marketplace cards per row, using the portrait-proven 16:9 media
 * proportion and denser typography/metadata. This rule intentionally lives in
 * Catalog's final tablet layer so desktop/compact-desktop cascades cannot turn
 * a physical landscape tablet back into the oversized three-card desktop grid.
 * ====================================================================== */
@media (min-width:783px) and (orientation:landscape) {
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-results {
		box-sizing:border-box!important;
		width:100%!important;
		max-width:1180px!important;
		margin-left:auto!important;
		margin-right:auto!important;
		min-width:0!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listings-grid,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-listings.hp-grid,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-listings .hp-grid {
		display:grid!important;
		grid-template-columns:repeat(4,minmax(0,1fr))!important;
		align-items:stretch!important;
		align-content:start!important;
		gap:12px!important;
		box-sizing:border-box!important;
		width:100%!important;
		max-width:1180px!important;
		margin-left:auto!important;
		margin-right:auto!important;
		padding:0!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listings-grid > .hk-catalog-listing-item,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-listings .hp-grid__item,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-listings.hp-grid > .hp-grid__item {
		display:flex!important;
		align-self:stretch!important;
		box-sizing:border-box!important;
		width:auto!important;
		min-width:0!important;
		max-width:none!important;
		height:auto!important;
		margin:0!important;
		padding:0!important;
		flex:none!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item :is(.hp-listing,.hp-listing--view-block),
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item :is(.hp-listing,.hp-listing--view-block) {
		display:flex!important;
		flex:1 1 auto!important;
		flex-direction:column!important;
		box-sizing:border-box!important;
		width:100%!important;
		height:100%!important;
		min-width:0!important;
		min-height:0!important;
		max-width:none!important;
		overflow:hidden!important;
		border-radius:14px!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__header > :is(.hp-listing__image,.hp-listing__images),
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__header > :is(.hp-listing__image,.hp-listing__images) {
		aspect-ratio:16/9!important;
		width:100%!important;
		min-height:0!important;
		max-height:none!important;
		overflow:hidden!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__header img,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__header img {
		display:block!important;
		width:100%!important;
		height:100%!important;
		min-height:0!important;
		object-fit:cover!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__content,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__content {
		display:flex!important;
		flex:1 1 auto!important;
		flex-direction:column!important;
		min-height:0!important;
		padding:9px 10px 6px!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item :is(.hp-listing__categories,.hp-listing__category),
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item :is(.hp-listing__categories,.hp-listing__category) {
		display:block!important;
		min-height:0!important;
		margin:0 0 3px!important;
		overflow:hidden!important;
		font-size:8.8px!important;
		line-height:1.22!important;
		text-overflow:ellipsis!important;
		white-space:nowrap!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__title,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__title {
		display:-webkit-box!important;
		min-height:33px!important;
		margin:0 0 4px!important;
		overflow:hidden!important;
		-webkit-box-orient:vertical!important;
		-webkit-line-clamp:2!important;
		font-size:14px!important;
		font-weight:800!important;
		line-height:1.17!important;
		letter-spacing:-.006em!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item :is(.hp-listing__created-date,.hp-listing__details--primary,.hp-listing__details--secondary,.hk-listing-location--card),
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item :is(.hp-listing__created-date,.hp-listing__details--primary,.hp-listing__details--secondary,.hk-listing-location--card) {
		margin-top:2px!important;
		font-size:8.6px!important;
		line-height:1.25!important;
	}

	html.hk-tablet body.hk-catalog-page .hk-catalog-listing-item .hk-trust-card-badge,
	html.hk-tablet body.hk-catalog-page .hp-grid__item .hk-trust-card-badge {
		gap:3px!important;
		margin:3px 0!important;
		padding:3px 5px!important;
		font-size:7.2px!important;
	}

	html.hk-tablet body.hk-catalog-page .hk-catalog-listing-item :is(.hk-listing-views,.hk-listing-rating,.hk-listing-vendor-status),
	html.hk-tablet body.hk-catalog-page .hp-grid__item :is(.hk-listing-views,.hk-listing-rating,.hk-listing-vendor-status) {
		margin-top:2px!important;
		margin-bottom:0!important;
		font-size:8.5px!important;
		line-height:1.18!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer {
		grid-template-columns:minmax(0,1fr) 30px!important;
		gap:6px!important;
		min-height:38px!important;
		margin-top:auto!important;
		padding:6px 9px 7px!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer .hp-listing__attributes--primary,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer .hp-listing__details--primary,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer > :first-child,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer .hp-listing__attributes--primary,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer .hp-listing__details--primary,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer > :first-child {
		font-size:12.8px!important;
		line-height:1.12!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer .hp-listing__actions--primary,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer .hp-listing__actions,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer > :last-child,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer .hp-listing__actions--primary,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer .hp-listing__actions,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer > :last-child {
		width:30px!important;
		min-width:30px!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer .hp-listing__action--message,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listing-item .hp-listing__footer a[href*="message"],
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer .hp-listing__action--message,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-grid__item .hp-listing__footer a[href*="message"] {
		width:28px!important;
		height:28px!important;
		min-width:28px!important;
		min-height:28px!important;
	}
}

/* ======================================================================
 * Core 2.0.98.317 — Tablet Landscape Catalog Workspace Root Recovery 1.1
 * Scope: physical tablet + Catalog + landscape only.
 *
 * Root cause of 2.0.98.316 regression: the final landscape layer replaced the
 * measured tablet workspace width with width:100%, so results inherited the
 * narrow HivePress content column and all four cards collapsed into slivers.
 * Restore the proven toolbar-measured workspace width while keeping the new
 * four-column compact card geometry.
 * ====================================================================== */
@media (min-width:783px) and (orientation:landscape) {
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-results {
		box-sizing:border-box!important;
		width:var(--hk-tablet-catalog-workspace-width,100%)!important;
		max-width:none!important;
		min-width:0!important;
		margin-left:0!important;
		margin-right:0!important;
		overflow:visible!important;
	}

	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hk-catalog-listings-grid,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-listings.hp-grid,
	html.hk-tablet body.hk-catalog-page.hk-catalog-enhanced .hp-listings .hp-grid {
		display:grid!important;
		grid-template-columns:repeat(4,minmax(0,1fr))!important;
		align-items:stretch!important;
		align-content:start!important;
		gap:12px!important;
		box-sizing:border-box!important;
		width:var(--hk-tablet-catalog-workspace-width,100%)!important;
		max-width:none!important;
		min-width:0!important;
		margin-left:0!important;
		margin-right:0!important;
		padding:0!important;
	}
}
