/* WooCommerce, in the theme's vocabulary. WooCommerce's own stylesheets are off
   (inc/shop.php); the cart and checkout blocks keep theirs and are tuned here. */

/* ── category head ─────────────────────────────────────────────────── */
.shop-head { padding-top: 40px; }
.crumbs { margin-bottom: 36px; color: var(--faint); font-size: 14px; }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--spot); }
.shop .entry-meta dl:empty { display: none; }

/* ── intro, picks, comparison ──────────────────────────────────────── */
.shop-intro, .shop-guide { min-width: 0; }
.shop-intro { padding: 44px var(--gut) 56px; border-bottom: 1px solid var(--line2); }
.shop-intro > * { max-width: none; }
.shop-intro .term-description { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.6; }
.shop-intro .term-description p { margin: 0 0 1em; }
.shop-intro h2 { margin-top: 2.2em; }
.shop-intro .advia-cx { margin: 0 0 1.6em; }

.picks { list-style: none; padding: 0 !important; border-top: 1px solid var(--ink); }
.picks li {
	display: grid; grid-template-columns: minmax(0, 22em) minmax(0, 1fr); gap: 2px 40px;
	margin: 0 !important; padding: 14px 0; border-bottom: 1px solid var(--line2);
}
.picks b { grid-row: span 2; font-weight: 600; font-size: 15.5px; line-height: 1.45; color: var(--dim); }
.picks a { font-family: var(--disp); font-weight: 700; font-size: 19px; letter-spacing: -0.015em; color: var(--ink); text-decoration: none; }
.picks a:hover { color: var(--spot); }
.picks span { color: var(--dim); font-size: 15.5px; line-height: 1.5; }
@media (max-width: 600px) {
	.picks li { grid-template-columns: 1fr; }
	.picks b { grid-row: auto; font-size: 14px; color: var(--faint); }
}

/* The table outgrows the reading column: it runs the width of the frame. */
.shop-intro > .shop-versus { margin-bottom: 0; contain: paint; }
.shop-versus table { min-width: 860px; font-size: 15px; }
.shop-versus tbody tr > :first-child, .shop-versus thead tr > :first-child { width: 150px; min-width: 150px; }
.shop-versus thead th { vertical-align: bottom; }
.shop-versus thead a { display: block; color: var(--ink); text-decoration: none; }
.shop-versus thead a:hover { color: var(--spot); }
.shop-versus thead img {
	display: block; width: 100%; max-width: 132px; aspect-ratio: 1; margin-bottom: 12px;
	object-fit: contain; background: var(--panel); border: 1px solid var(--line);
}
.shop-versus thead span { display: block; font-size: 16.5px; }
.shop-versus thead tr > :first-child { background: var(--bg); }
.shop-versus tbody th { font-weight: 400; font-size: 14px; }
.shop-versus td { font-family: var(--mono); font-size: 13.5px; }
.shop-versus del { color: var(--faint); }
.shop-versus ins { text-decoration: none; }

/* ── ranked grid: each product is a plate ──────────────────────────── */
.shop .woocommerce-notices-wrapper:empty { display: none; }
ul.products {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0; padding: 0; list-style: none;
	border-bottom: 1px solid var(--line2);
}
@media (max-width: 1000px) { ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { ul.products { grid-template-columns: 1fr; } }

.plate { display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plate-link { flex: 1; display: block; padding: 28px var(--gut) 0; color: inherit; text-decoration: none; }
.plate-link:focus-visible { outline-offset: -2px; }

.plate-fig {
	position: relative; margin: 0 0 22px; aspect-ratio: 1;
	border: 1px solid var(--line2);
	background-color: var(--panel);
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 24px 24px; background-position: center;
	overflow: hidden;
}
.plate-fig img {
	display: block; width: 100%; height: 100%; object-fit: contain;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.plate-link:hover .plate-fig img { transform: scale(1.04); }
.plate-rank {
	position: absolute; left: 14px; top: 6px;
	font-family: var(--disp); font-weight: 800; font-size: 64px; line-height: 1;
	letter-spacing: -0.05em; color: var(--line2); font-variant-numeric: tabular-nums;
	transition: color .15s ease;
}
.plate:first-child .plate-rank,
.plate-link:hover .plate-rank { color: var(--spot); }
.plate-flag {
	position: absolute; right: 12px; top: 12px;
	padding: 4px 10px; background: var(--spot); color: var(--spot-ink);
	font-size: 13px; font-weight: 600;
}
.plate-flag--out { background: var(--ink); color: var(--bg); }

.plate-name {
	margin: 0; font-family: var(--disp); font-weight: 700;
	font-size: 23px; line-height: 1.15; letter-spacing: -0.025em;
	transition: color .15s ease; text-wrap: balance;
}
.plate-link:hover .plate-name { color: var(--spot); }
.plate-best { margin: 6px 0 0; color: var(--dim); font-size: 15px; }

.plate-specs { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 18px 0 0; }
.plate-specs > div { padding: 0 18px; border-left: 1px solid var(--line2); }
.plate-specs > div:first-child { padding-left: 0; border-left: 0; }
.plate-specs dt { color: var(--faint); font-size: 12.5px; }
.plate-specs dd { margin: 2px 0 0; font-family: var(--mono); font-size: 13.5px; color: var(--ink); }

.plate-buy {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	margin-top: 22px; padding: 16px var(--gut) 28px;
	border-top: 1px dashed var(--line2);
}

/* ── prices and buttons ────────────────────────────────────────────── */
.price { font-family: var(--disp); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price del { margin-right: 8px; color: var(--faint); font-family: var(--body); font-weight: 400; font-size: 15px; letter-spacing: 0; }
.price ins { text-decoration: none; }

.woocommerce a.button,
.woocommerce button.button,
.single_add_to_cart_button {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 11px 18px; border: 1px solid var(--ink); border-radius: 0;
	background: transparent; color: var(--ink);
	font: inherit; font-size: 14.5px; font-weight: 500; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover { border-color: var(--spot); background: var(--spot); color: var(--spot-ink); }
.woocommerce button.single_add_to_cart_button { background: var(--spot); border-color: var(--spot); color: var(--spot-ink); padding: 13px 24px; font-size: 15px; }
.woocommerce button.single_add_to_cart_button:hover { background: var(--ink); border-color: var(--ink); }
.woocommerce a.button.loading { opacity: .6; }
.woocommerce a.added_to_cart { color: var(--spot); font-size: 14px; }

/* ── buying guide ──────────────────────────────────────────────────── */
.shop-guide { padding: 56px var(--gut) 72px; }
.shop-guide > :first-child { margin-top: 0; }
/* Full width, in columns so lines stay readable. */
@media (min-width: 1100px) {
	.shop-guide { column-count: 2; column-gap: 72px; }
	.shop-guide h2 { column-span: all; }
	.shop-guide h2:not(:first-child) { margin-top: 1.6em; }
	.shop-guide h3, .shop-guide h4 { break-after: avoid; }
	.shop-guide h3:first-child { margin-top: 0; }
	.shop-guide ul, .shop-guide ol, .shop-guide p { break-inside: avoid; }
}

/* ── single product, shop page ─────────────────────────────────────── */
.shop-board { padding: 40px var(--gut) 72px; }
.shop-board .woocommerce-breadcrumb { margin-bottom: 28px; color: var(--faint); font-size: 14px; }
.shop-board .woocommerce-breadcrumb a { color: var(--dim); text-decoration: none; }
.shop-board .page-title { margin: 0 0 32px; font-family: var(--disp); font-weight: 800; font-size: clamp(34px, 4.6vw, 60px); letter-spacing: -0.045em; line-height: 1; }
.shop-board ul.products { margin: 0 calc(-1 * var(--gut)); border-top: 1px solid var(--line2); }
.shop-board .woocommerce-result-count { color: var(--faint); font-size: 14px; }
.shop-board .woocommerce-ordering select { width: auto; }

.shop-board div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 64px; }
.shop-board div.product > * { grid-column: 1 / -1; }
.shop-board div.product .woocommerce-product-gallery { grid-column: 1; position: relative; }
.shop-board div.product .summary { grid-column: 2; }
.woocommerce-product-gallery { margin: 0; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image {
	border: 1px solid var(--line2); background: var(--panel);
	background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 24px 24px; background-position: center;
}
.woocommerce-product-gallery__image img { display: block; width: 100%; }
.woocommerce-product-gallery__trigger { display: none; }
.shop-board .onsale { position: absolute; z-index: 2; left: 14px; top: 14px; padding: 4px 10px; background: var(--spot); color: var(--spot-ink); font-size: 13px; font-weight: 600; }
.summary .product_title { margin: 0 0 14px; font-family: var(--disp); font-weight: 800; font-size: clamp(32px, 3.6vw, 48px); line-height: 1; letter-spacing: -0.04em; }
.summary .price { display: block; margin: 0 0 18px; font-size: 28px; }
.summary .woocommerce-product-details__short-description { color: var(--dim); font-size: 18px; }
.summary form.cart { display: flex; gap: 12px; margin: 28px 0; }
.summary .quantity input { width: 72px; height: 100%; text-align: center; }
.summary .stock { color: var(--dim); }
.product_meta { padding-top: 16px; border-top: 1px solid var(--line2); color: var(--faint); font-size: 14px; }
.product_meta > span { display: block; }
.product_meta a { color: var(--dim); }

.woocommerce-tabs { margin-top: 56px; border-top: 1px solid var(--ink); }
.woocommerce-tabs ul.tabs { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line2); }
.woocommerce-tabs ul.tabs a { display: block; padding: 14px 20px 12px 0; margin-right: 20px; color: var(--dim); text-decoration: none; }
.woocommerce-tabs ul.tabs li.active a { color: var(--ink); box-shadow: inset 0 -2px 0 var(--spot); }
.woocommerce-tabs .panel { max-width: var(--measure); padding-top: 24px; font-size: 17px; }
.woocommerce-tabs .panel > h2:first-child { display: none; }
.woocommerce-product-attributes { width: 100%; border-collapse: collapse; }
.woocommerce-product-attributes th,
.woocommerce-product-attributes td { padding: 10px 0; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: top; }
.woocommerce-product-attributes th { width: 40%; color: var(--faint); font-weight: 400; font-size: 15px; }
.woocommerce-product-attributes td { font-family: var(--mono); font-size: 14.5px; }
.woocommerce-product-attributes td p { margin: 0; }
.related.products { margin-top: 64px; }
.related.products > h2 { font-family: var(--disp); font-weight: 700; font-size: 26px; letter-spacing: -0.025em; }

@media (max-width: 800px) {
	.shop-board div.product { grid-template-columns: 1fr; }
	.shop-board div.product .woocommerce-product-gallery,
	.shop-board div.product .summary { grid-column: 1; }
	.shop-board div.product .summary { margin-top: 28px; }
}

.woocommerce-message, .woocommerce-info, .woocommerce-error {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; justify-content: space-between;
	margin: 0 0 24px; padding: 14px 18px; list-style: none;
	border: 1px solid var(--line2); border-left: 3px solid var(--spot); background: var(--panel);
}
.woocommerce-error { border-left-color: #b3261e; }

/* ── cart and checkout blocks ──────────────────────────────────────── */
.prose .wp-block-woocommerce-cart a,
.prose .wp-block-woocommerce-checkout a { color: var(--ink); }
.prose .wc-block-components-product-name { font-family: var(--disp); font-weight: 700; font-size: 18px; letter-spacing: -0.015em; text-decoration: none; }
.prose .wc-block-components-product-name:hover { color: var(--spot); }
.prose .wc-block-cart-item__image img {
	border: 1px solid var(--line2); background: var(--panel);
}
.prose .wc-block-components-button:not(.is-link),
.prose a.wc-block-components-button:not(.is-link) {
	border-radius: 0; background: var(--spot); color: var(--spot-ink);
	font-family: var(--body); font-weight: 600; text-decoration: none;
}
.prose .wc-block-components-button:not(.is-link):hover { background: var(--ink); color: var(--bg); }
.prose .wc-block-components-button:not(.is-link) .wc-block-components-button__text { color: inherit; }
.prose .wc-block-components-product-badge,
.prose .wc-block-components-sale-badge {
	border-radius: 0; border: 0; background: var(--spot-wash); color: var(--spot); font-weight: 600;
}
.prose .wc-block-components-quantity-selector,
.prose .wc-block-components-text-input input,
.prose .wc-blocks-components-select .wc-blocks-components-select__select { border-radius: 0 !important; }
.prose .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.prose .wc-block-components-product-price { font-variant-numeric: tabular-nums; }
.prose .wc-block-components-totals-wrapper { border-color: var(--line2); }
.prose .wp-block-woocommerce-empty-cart-block h2 { text-align: left; }
.woocommerce-cart .entry-grid--page .prose,
.woocommerce-checkout .entry-grid--page .prose { max-width: none; }
