/* Pikkuvihreä 2027 — Phase 2: category pages (design 2a/2b, card background 3a).
 * Loaded on product archives only (inc/enqueue.php). Uses tokens.css and the
 * shared components (.pv-btn, .pv-chip, .pv-arrow-link, .pv-eyebrow) from pv2027.css.
 */
.pv-cat { font: var(--pv-body); color: #000; }
.pv-cat ul { list-style: none; margin: 0; padding: 0; }
.pv-cat ul li::before { content: none !important; }
.pv-cat button { all: unset; box-sizing: border-box; cursor: pointer; font-family: var(--pv-font); }
.pv-cat a { text-decoration: none; }
.pv-cat :focus-visible { outline: 3px solid var(--pv-green-dark); outline-offset: 2px; }
.woocommerce-page.archive #masthead.pv-header, .post-type-archive-product #masthead.pv-header { margin-bottom: 0; }

/* breadcrumb */
.pv-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font: 400 13px var(--pv-font); color: #444; }
.pv-crumbs li::before { content: none !important; }
.pv-crumbs li + li::before { content: "\203A" !important; display: inline-block; margin-right: 8px; color: #777; font-size: 15px; line-height: 1; }
.pv-crumbs a, .pv-crumbs a:visited { color: var(--pv-green-dark); text-decoration: underline; }

/* intro */
.pv-cat__intro { padding-top: 18px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 20px; }
.pv-cat__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.pv-cat__head.has-rec { grid-template-columns: minmax(0, 1fr) 520px; }
.pv-cat__title { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pv-cat__title h1 { font: 700 44px/1.1 var(--pv-font); letter-spacing: -1.2px; color: var(--pv-green-dark); margin: 0; padding: 0; text-align: left; }
.pv-cat__lead, .pv-cat__lead p { font: 400 16px/1.6 var(--pv-font); max-width: 700px; text-align: left !important; margin: 0; }
.pv-cat__lead p + p { margin-top: 8px; }
.pv-cat__lead a { color: var(--pv-green-dark); text-decoration: underline; }
.pv-reccard, .pv-reccard:visited { display: grid; grid-template-columns: 180px minmax(0, 1fr); background: var(--pv-beige); color: #000; }
.pv-reccard:hover { background: #EFDFC9; color: #000; }
@media (min-width: 992px) { .pv-reccard:not(:has(.pv-reccard__img)) { grid-template-columns: minmax(0, 1fr); } }
/* The photo fills the card's full height whatever the text length (review #3: a
   150 px thumbnail sat at the top of a taller card and looked unscaled). */
.pv-reccard__img { display: block; position: relative; min-height: 160px; overflow: hidden; }
.pv-reccard__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-reccard__body { padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.pv-reccard__title { font: 700 19px/1.25 var(--pv-font); color: var(--pv-green-dark); }
.pv-reccard__text { font: 400 13px/1.5 var(--pv-font); }
.pv-reccard__cta { font: 700 14px var(--pv-font); display: inline-flex; gap: 8px; align-items: center; margin-top: 2px; }
.pv-reccard__cta i { color: var(--pv-green-dark); }
.pv-catchips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pv-catchips__label { font: 500 13px var(--pv-font); color: #444; margin-right: 4px; }
.pv-cat .pv-chip { background: #fff; }
.pv-cat .pv-chip.is-active, .pv-cat .pv-chip.is-active:visited { background: var(--pv-green-dark); border-color: var(--pv-green-dark); color: #fff; font-weight: 600; }

/* sort bar */
.pv-sortbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 0; border-top: 2px solid #000; margin-bottom: 20px; }
.pv-sortbar__count { font: 600 15px var(--pv-font); }
.pv-sort { display: flex; gap: 10px; align-items: center; margin: 0; font: 500 14px var(--pv-font); }
.pv-sort label { color: #444; margin: 0; }
.pv-sort select { font: 500 14px var(--pv-font); border: 1px solid #CFCFCF; border-radius: 0; padding: 10px 36px 10px 14px; min-width: 210px; background-color: #fff; color: #000; height: auto; }

/* grid + card */
.pv-cat__products { padding-bottom: 56px; }
.pv-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; margin: 0 !important; }
.pv-grid > .pv-card { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; flex: none !important; display: flex; flex-direction: column; gap: 12px; position: relative; }
.pv-card__media { display: block; aspect-ratio: 1 / 1; position: relative; overflow: hidden; background: var(--pv-grey); }
.pv-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.pv-card__media.is-cutout { background: conic-gradient(from 0deg at 50% 64%, #CFE2C7 0deg 107.7deg, #EBDDC7 107.7deg 252.3deg, #E2EFDC 252.3deg 360deg); }
.pv-card__media.is-cutout.is-plain { background: var(--pv-beige); }
.pv-card__shadow { position: absolute; left: 24%; right: 24%; top: 83%; height: 9%; background: radial-gradient(ellipse at center, rgba(40,30,20,.3) 0%, rgba(40,30,20,0) 70%); }
.pv-card__cut { position: absolute; left: 50%; bottom: 13%; width: auto !important; max-width: 88%; object-fit: contain; transform: translateX(-50%); transition: transform .2s; }
.pv-card:hover .pv-card__cut { transform: translateX(-50%) translateY(-3px); }
.pv-card:hover .pv-card__img { transform: scale(1.02); }
.pv-card__badge { position: absolute; top: 14px; right: 14px; width: 66px; height: 66px; border-radius: 50%; background: var(--pv-green-ink); color: #fff; font: 700 10px/1.15 var(--pv-font); display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; hyphens: manual; }
.pv-card__badge.is-long { font-size: 8.5px; padding: 4px; }
.pv-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pv-card__title { font: 600 15px/1.4 var(--pv-font) !important; margin: 0 !important; letter-spacing: 0; }
.pv-card__title a, .pv-card__title a:visited { color: #000; }
.pv-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.pv-card:hover .pv-card__title a { text-decoration: underline; }
.pv-card__rating { display: flex; gap: 6px; align-items: center; font: 500 13px var(--pv-font); }
.pv-card__rating i { color: var(--pv-green-dark); }
.pv-card__rating span { color: #555; white-space: nowrap; }
.pv-card__facts { display: flex !important; gap: 6px; flex-wrap: wrap; font: 500 12px var(--pv-font); }
.pv-card__facts li { background: var(--pv-grey); padding: 4px 8px; display: flex; gap: 6px; align-items: center; }
.pv-card__facts i { color: var(--pv-green-dark); }
.pv-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.pv-card__foot > div { display: flex; flex-direction: column; gap: 2px; }
.pv-card__price { font: 700 19px var(--pv-font); color: #000; }
.pv-card__price del { font-size: 14px; font-weight: 400; color: #666; }
.pv-card__price ins { text-decoration: none; color: var(--pv-sale); }
/* B2BKing shows B2B customers and admins both prices: keep the retail price
   as the card price and the B2B line small underneath. */
.pv-card__price .b2bking_both_prices_text { font-weight: 500; font-size: 12px; color: #555; }
.pv-card__price .b2bking_retail_price_text { display: none; }
.pv-card__price .b2bking_b2b_price_text { display: block; margin-top: 4px; }
.pv-card__price .b2bking_b2b_price_price { font-size: 12px; font-weight: 500; color: #555; }
.pv-card__price .b2bking_b2b_price_price del { font-size: 11px; }
.pv-card__price .b2bking_b2b_price_price ins { color: #555; }
.pv-card__price .b2bking_retail_price_price br { display: none; }
.pv-card__delivery { font: 400 12px var(--pv-font); color: var(--pv-green-dark); display: flex; gap: 6px; align-items: center; }
.pv-card .add_to_cart_button { position: relative; z-index: 2; } /* above the card-wide link */
.pv-card .added_to_cart { display: none; }
.pv-card .add_to_cart_button.loading { opacity: .6; }

/* help box in the grid */
.pv-contactbox { grid-column: 1 / -1; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 28px; align-items: center; background: var(--pv-beige); padding: 24px 32px 24px 24px; margin: 8px 0; }
.pv-contactbox:not(:has(.pv-contactbox__img)) { grid-template-columns: minmax(0, 1fr) auto; padding-left: 32px; }
.pv-contactbox__img img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; display: block; }
.pv-contactbox__body { display: flex; flex-direction: column; gap: 6px; }
.pv-contactbox__body h2 { font: 700 21px/1.25 var(--pv-font) !important; color: #000; margin: 0 !important; }
.pv-contactbox__body p { font: 400 14px/1.55 var(--pv-font); margin: 0; }
.pv-contactbox__actions { display: flex; flex-direction: column; gap: 8px; min-width: 250px; }
.pv-contactbox__actions .pv-btn { justify-content: flex-start; }

/* load more (BeRocket) and pagination */
.pv-cat .woocommerce-pagination { margin-top: 32px; text-align: center; }
.pv-cat .lmp_load_more_button { text-align: center; padding-top: 16px; }
.pv-cat .lmp_load_more_button .lmp_button,
.pv-cat .lmp_load_more_button .lmp_button:visited { display: inline-block; border: 2px solid var(--pv-green-dark) !important; color: var(--pv-green-dark) !important; background: #fff !important; font: 700 15px var(--pv-font) !important; padding: 14px 32px !important; border-radius: 0 !important; box-shadow: none !important; }
.pv-cat .lmp_load_more_button .lmp_button:hover { background: var(--pv-green-dark) !important; color: #fff !important; }

/* extra highlights (img_hl rows after the first) */
.pv-cat__extras { display: grid; gap: 24px; padding-bottom: 56px; }
.pv-extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--pv-beige); }
.pv-extra__img img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; display: block; }
.pv-extra__body { padding: 40px 44px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; justify-content: center; }
.pv-extra__body h2 { font: 700 28px/1.2 var(--pv-font) !important; color: var(--pv-green-dark); margin: 0 !important; }

/* SEO text */
.pv-seo { background: var(--pv-grey); padding: 56px 0 64px; }
.pv-seo__row { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 40px; }
/* "Lisätietoa" reads as the section's heading, not a small label under the body size (review #28). */
.pv-seo .pv-seo__eyebrow { font: 700 24px/1.25 var(--pv-font); letter-spacing: -.3px; text-transform: none; color: var(--pv-green-dark); padding-top: 0; margin: 0; }
.pv-seo__text { columns: 2; column-gap: 48px; font: 400 15px/1.75 var(--pv-font); color: #111; }
.pv-seo__text > *:first-child { margin-top: 0 !important; }
.pv-seo__text p, .pv-seo__text li { text-align: left !important; break-inside: avoid-column; }
.pv-seo__text p { margin: 0 0 14px; }
.pv-seo__text h2, .pv-seo__text h3, .pv-seo__text h4 { font: 700 19px/1.3 var(--pv-font) !important; color: var(--pv-green-dark); text-align: left !important; margin: 18px 0 10px !important; break-after: avoid; }
.pv-seo__text a { color: var(--pv-green-dark); text-decoration: underline; }
.pv-seo__text ul { padding-left: 20px; margin: 0 0 14px; list-style: disc; }

@media (max-width: 1199px) {
	.pv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pv-cat__head.has-rec { grid-template-columns: minmax(0, 1fr) 420px; }
}
@media (max-width: 991px) {
	.pv-cat__intro { padding-top: 4px; padding-bottom: 0; gap: 10px; }
	.pv-crumbs ol { font-size: 12px; }
	.pv-crumbs li:first-child { display: none; }
	.pv-crumbs li:nth-child(2)::before { content: none !important; }
	.pv-crumbs li { margin: 0; padding: 0; }
	/* Top-level category: "Etusivu ›" is hidden, the rest would only repeat the h1. */
	.pv-crumbs:not(:has(li:nth-child(3))) { display: none; }
	.pv-cat__head, .pv-cat__head.has-rec { grid-template-columns: 1fr; gap: 12px; }
	.pv-cat__title { gap: 8px; }
	.pv-cat__title h1 { font-size: 30px; letter-spacing: -.8px; }
	.pv-cat__lead, .pv-cat__lead p { font-size: 14px; line-height: 1.55; }
	.pv-cat__lead p:not(:first-child) { display: none; }
	.pv-reccard, .pv-reccard:visited { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; }
	.pv-reccard > i { color: var(--pv-green-dark); font-size: 18px; }
	.pv-reccard__body { padding: 0; gap: 0; }
	.pv-reccard__title { font-size: 14px; color: #000; }
	.pv-reccard__text { font-size: 12px; }
	.pv-catchips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding: 4px 16px 0 0; scrollbar-width: none; }
	.pv-catchips .pv-chip { white-space: nowrap; font-size: 13px; padding: 9px 13px; }
	.pv-sortbar { position: sticky; top: 0; z-index: 50; background: #fff; border-top: 1px solid #ECE7E0; border-bottom: 1px solid #ECE7E0; margin: 14px -16px 12px; padding: 10px 16px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
	.pv-sortbar__count { font-size: 14px; align-self: center; }
	.pv-sort label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
	.pv-sort, .pv-sort select { width: 100%; min-width: 0; }
	.pv-sort select { height: 46px; padding: 0 12px; }
	.pv-grid { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
	.pv-grid > .pv-card { gap: 8px; }
	.pv-card__badge { top: 8px; right: 8px; width: 56px; height: 56px; font-size: 8.5px; padding: 4px; }
	.pv-card__badge.is-long { font-size: 7.5px; padding: 3px; }
	.pv-card__title { font-size: 13px !important; line-height: 1.35 !important; }
	.pv-card__rating { font-size: 12px; gap: 5px; }
	.pv-card__facts { font-size: 11px; }
	.pv-card__facts li { background: none; padding: 0; }
	.pv-card__foot { flex-direction: column; align-items: stretch; gap: 8px; }
	.pv-card__price { font-size: 16px; }
	.pv-card .pv-btn--sm { width: 100%; }
	.pv-contactbox, .pv-contactbox:not(:has(.pv-contactbox__img)) { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 20px; margin: 2px 0; }
	.pv-contactbox__img img { width: 60px; height: 60px; }
	.pv-contactbox__body h2 { font-size: 16px !important; line-height: 1.3 !important; }
	.pv-contactbox__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; min-width: 0; }
	.pv-contactbox__actions .pv-btn { justify-content: center; height: 48px; padding: 0 8px; }
	.pv-cat__products { padding-bottom: 24px; }
	.pv-extra { grid-template-columns: 1fr; }
	.pv-extra__body { padding: 22px; }
	.pv-extra__body h2 { font-size: 21px !important; }
	.pv-seo { padding: 28px 0; }
	.pv-seo__row { grid-template-columns: 1fr; gap: 10px; }
	.pv-seo__text { columns: 1; font-size: 14px; line-height: 1.7; }
	.pv-seo__text.is-collapsed { max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
	.pv-seo__more { font: 600 14px var(--pv-font) !important; color: var(--pv-green-dark) !important; text-decoration: underline !important; }
	.pv-seo__text h2, .pv-seo__text h3, .pv-seo__text h4 { font-size: 21px !important; }
}
@media (min-width: 992px) { .pv-seo__text.is-collapsed { max-height: none; } }

/* ---------- 0.7.3: production review 2026-10-21 ---------- */
/* #9 every card has one button: "Lisää" (simple), "Valitse" (needs a choice), "Katso tuote" (out of stock) */
.pv-card .pv-card__btn { position: relative; z-index: 2; white-space: nowrap; }
