/**
 * Tahm Printer Compatibility — frontend styles
 * v1.3.1
 */

/* ================================================================
 * 1. ARCHIVE PAGE (/printerimudel/{slug}/)
 * ================================================================ */

.tahm-pc-archive {
	max-width: 1240px;
	margin: 2rem auto 3rem;
	padding: 0 1rem;
	box-sizing: border-box;
}

.tahm-pc-header {
	margin: 0 0 1.5rem;
	padding: 0 0 1rem;
	border-bottom: 2px solid #1e3a5f;
}

/* HERO: printer image + title side by side (stacks on mobile) */
.tahm-pc-hero {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 1.75rem;
	margin-top: 1rem;
}

.tahm-pc-hero-image {
	flex: 0 0 auto;
	width: 200px;
}

.tahm-pc-hero-text {
	flex: 1 1 auto;
	min-width: 0;
}

.tahm-pc-printer-image,
.tahm-pc-printer-placeholder {
	display: block;
	width: 100%;
	max-width: 200px;
	background: #fff;
	border: 1px solid #ece9e3;
	border-radius: 10px;
	padding: 8px;
	box-sizing: border-box;
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.tahm-pc-printer-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #faf9f7;
}

.tahm-pc-printer-placeholder svg {
	width: 65%;
	height: 65%;
}

.tahm-pc-printer-image.tahm-pc-image-large,
.tahm-pc-printer-placeholder.tahm-pc-image-large {
	max-width: 200px;
}

@media (max-width: 720px) {
	.tahm-pc-hero {
		flex-direction: column;
		gap: 1rem;
	}
	.tahm-pc-hero-image {
		width: 100%;
		max-width: 160px;
		align-self: center;
	}
	.tahm-pc-printer-image,
	.tahm-pc-printer-placeholder {
		max-width: 160px;
	}
}

.tahm-pc-title {
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
	line-height: 1.25;
	margin: 0 0 .5rem;
	color: #1e3a5f;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.tahm-pc-intro {
	font-size: 1rem;
	line-height: 1.55;
	color: #444;
	max-width: 820px;
	margin: 0 0 .5rem;
}

.tahm-pc-intro strong {
	color: #1e3a5f;
}

.tahm-pc-description {
	font-size: .95rem;
	line-height: 1.6;
	color: #555;
	max-width: 820px;
	margin-top: .5rem;
}

/* ===== FILTER BAR ===== */
.tahm-pc-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	align-items: center;
	margin: 1.25rem 0 1.5rem;
	padding: 1rem 1.1rem;
	background: #faf9f7;
	border: 1px solid #ece9e3;
	border-radius: 10px;
}

.tahm-pc-filter-group {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	align-items: center;
}

.tahm-pc-filter-label {
	font-size: .85rem;
	font-weight: 600;
	color: #1e3a5f;
	margin-right: .3rem;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.tahm-pc-filter-btn,
.tahm-pc-filter-pill {
	font: inherit;
	font-size: .88rem;
	padding: .38rem .85rem;
	border: 1px solid #d6d2c8;
	background: #fff;
	color: #333;
	border-radius: 20px;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
	line-height: 1.2;
}

.tahm-pc-filter-btn:hover,
.tahm-pc-filter-pill:hover {
	border-color: #b8860b;
	color: #b8860b;
}

.tahm-pc-filter-btn.is-active,
.tahm-pc-filter-pill.is-active {
	background: #1e3a5f;
	border-color: #1e3a5f;
	color: #fff;
	box-shadow: 0 2px 4px rgba(30, 58, 95, .2);
}

.tahm-pc-filter-pill {
	position: relative;
	padding-left: 1.85rem;
}

.tahm-pc-filter-pill[data-filter-color="all"] {
	padding-left: .85rem;
}

.tahm-pc-filter-pill::before {
	content: '';
	position: absolute;
	left: .6rem;
	top: 50%;
	transform: translateY(-50%);
	width: .85rem;
	height: .85rem;
	border-radius: 50%;
	border: 1px solid rgba(0,0,0,.15);
	box-sizing: border-box;
}

.tahm-pc-filter-pill[data-filter-color="all"]::before { display: none; }
.tahm-pc-color-black::before   { background: #222; }
.tahm-pc-color-cyan::before    { background: #29abe2; }
.tahm-pc-color-magenta::before { background: #d63384; }
.tahm-pc-color-yellow::before  { background: #ffcc00; }

.tahm-pc-filter-sort select {
	font: inherit;
	font-size: .88rem;
	padding: .35rem .65rem;
	border: 1px solid #d6d2c8;
	background: #fff;
	color: #333;
	border-radius: 6px;
	cursor: pointer;
}

.tahm-pc-filter-sort select:hover,
.tahm-pc-filter-sort select:focus {
	border-color: #b8860b;
	outline: none;
}

.tahm-pc-filter-count {
	margin-left: auto;
	font-size: .85rem;
	color: #666;
	font-style: italic;
}

@media (max-width: 640px) {
	.tahm-pc-filters {
		gap: .9rem;
		padding: .8rem;
		flex-direction: column;
		align-items: stretch;
	}
	.tahm-pc-filter-count {
		margin-left: 0;
		text-align: center;
	}
}

/* FORCE grid layout — overrides Storefront block/float fallback. */
.tahm-pc-archive ul.products,
.tahm-pc-archive .products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.5rem;
	list-style: none !important;
	padding: 0 !important;
	margin: 1rem 0 2rem !important;
}

.tahm-pc-archive ul.products::before,
.tahm-pc-archive ul.products::after {
	content: none !important;
	display: none !important;
}

.tahm-pc-archive ul.products li.product,
.tahm-pc-archive .products > .product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 1rem !important;
	list-style: none !important;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

.tahm-pc-archive ul.products li.product:hover {
	box-shadow: 0 6px 16px rgba(30, 58, 95, .1);
	transform: translateY(-2px);
	border-color: #b8860b;
}

.tahm-pc-archive ul.products li.product img,
.tahm-pc-archive ul.products li.product .attachment-woocommerce_thumbnail {
	max-width: 100% !important;
	height: auto !important;
	width: auto !important;
	max-height: 180px;
	object-fit: contain;
	margin: 0 auto .75rem !important;
	display: block;
}

.tahm-pc-archive ul.products li.product .woocommerce-loop-product__title,
.tahm-pc-archive ul.products li.product h2,
.tahm-pc-archive ul.products li.product h3 {
	font-size: .95rem !important;
	line-height: 1.35 !important;
	font-weight: 500 !important;
	color: #222 !important;
	margin: 0 0 .5rem !important;
	padding: 0 !important;
	flex: 1;
}

.tahm-pc-archive ul.products li.product .price {
	color: #1e3a5f !important;
	font-weight: 700 !important;
	font-size: 1.1rem !important;
	margin: 0 0 .75rem !important;
}

.tahm-pc-archive ul.products li.product .button,
.tahm-pc-archive ul.products li.product .added_to_cart {
	margin-top: auto !important;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

.tahm-pc-empty {
	font-size: 1rem;
	padding: 1.5rem;
	background: #fff8e6;
	border-left: 4px solid #d4740e;
	border-radius: 0 6px 6px 0;
}

/* Pagination */
.tahm-pc-pagination {
	margin: 2.5rem 0 0;
	text-align: center;
}

.tahm-pc-pagination .page-numbers {
	display: inline-block;
	padding: .5rem .9rem;
	margin: 0 .15rem;
	border: 1px solid #d6d6d6;
	border-radius: 4px;
	color: #1e3a5f;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease;
}

.tahm-pc-pagination .page-numbers:hover,
.tahm-pc-pagination .page-numbers.current {
	background: #1e3a5f;
	border-color: #1e3a5f;
	color: #fff;
}

.tahm-pc-footer {
	margin-top: 3rem;
	padding: 1.5rem 1.25rem;
	background: #faf9f7;
	border: 1px solid #ece9e3;
	border-radius: 10px;
	text-align: center;
	color: #555;
	font-size: .95rem;
}

.tahm-pc-footer a {
	color: #b8860b;
	text-decoration: underline;
	font-weight: 500;
}

@media (max-width: 640px) {
	.tahm-pc-archive { margin: 1rem auto 2rem; padding: 0 .75rem; }
	.tahm-pc-title { font-size: 1.4rem; }
	.tahm-pc-intro { font-size: .95rem; }
	.tahm-pc-archive ul.products,
	.tahm-pc-archive .products {
		grid-template-columns: repeat(2, 1fr);
		gap: .75rem;
	}
	.tahm-pc-archive ul.products li.product { padding: .6rem !important; }
	.tahm-pc-archive ul.products li.product .price { font-size: 1rem !important; }
}

/* ================================================================
 * 2. COMPATIBLE-PRINTERS BLOCK ON PRODUCT PAGES (PDP)
 * ================================================================ */

.tahm-pc-compat-block {
	margin: 2rem 0;
	padding: 1.5rem 1.75rem;
	background: #faf9f7;
	border: 1px solid #ece9e3;
	border-radius: 10px;
	clear: both;
}

.tahm-pc-compat-block h2 {
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0 0 .75rem;
	color: #1e3a5f;
	font-weight: 700;
	padding: 0;
	border: none;
}

.tahm-pc-compat-intro {
	margin: 0 0 .75rem;
	font-size: .98rem;
	line-height: 1.6;
	color: #333;
}

.tahm-pc-compat-intro strong {
	color: #1e3a5f;
	margin-right: .25rem;
}

.tahm-pc-compat-intro a {
	color: #1e3a5f;
	text-decoration: underline;
	text-decoration-color: rgba(30, 58, 95, .3);
	text-underline-offset: 2px;
}

.tahm-pc-compat-intro a:hover {
	text-decoration-color: #1e3a5f;
}

.tahm-pc-compat-details {
	margin-top: .75rem;
	border-top: 1px dashed #d6d2c8;
	padding-top: .5rem;
}

.tahm-pc-compat-details summary {
	cursor: pointer;
	color: #1e3a5f;
	font-weight: 500;
	padding: .5rem 0;
	list-style: none;
	font-size: .95rem;
	outline: none;
	user-select: none;
}

.tahm-pc-compat-details summary::-webkit-details-marker {
	display: none;
}

.tahm-pc-compat-details summary::before {
	content: '▸';
	display: inline-block;
	margin-right: .5rem;
	transition: transform .2s ease;
	color: #b8860b;
}

.tahm-pc-compat-details[open] summary::before {
	transform: rotate(90deg);
}

.tahm-pc-compat-list {
	column-count: 2;
	column-gap: 2rem;
	padding: 0 0 0 1.25rem;
	margin: .75rem 0 0;
	list-style: none;
}

@media (min-width: 768px) {
	.tahm-pc-compat-list { column-count: 3; }
}

@media (min-width: 1100px) {
	.tahm-pc-compat-list { column-count: 4; }
}

.tahm-pc-compat-list li {
	padding: .18rem 0;
	break-inside: avoid-column;
	font-size: .92rem;
	line-height: 1.4;
	list-style: none;
	position: relative;
}

.tahm-pc-compat-list li::before {
	content: '•';
	color: #b8860b;
	font-weight: bold;
	display: inline-block;
	width: 1em;
	margin-left: -1em;
}

.tahm-pc-compat-list a {
	color: #1e3a5f;
	text-decoration: underline;
	text-decoration-color: rgba(30, 58, 95, .4);
	text-underline-offset: 2px;
	transition: color .15s, text-decoration-color .15s;
}

.tahm-pc-compat-list a:hover {
	color: #b8860b;
	text-decoration-color: #b8860b;
}

@media (max-width: 640px) {
	.tahm-pc-compat-block { padding: 1rem; margin: 1.5rem 0; }
	.tahm-pc-compat-block h2 { font-size: 1.1rem; }
	.tahm-pc-compat-list { column-count: 1 !important; }
}
