/**
 * OptConnect product card row (PR 3.5).
 *
 * The only pattern of PR 3.5's family that needs a stylesheet at all.
 * `optconnect/media-text-cta` reuses PR 3.4's `.oc-media-text` shell and
 * `optconnect/cta-band-logos` reuses PR 3.2's `.oc-cta` shell, and both add **zero**
 * lines of CSS between them — their `--cta` and `--logos` modifiers exist as hooks
 * and currently style nothing. That is the useful result of PR 3.5, not an accident:
 * two of its three shapes are an existing family plus a button, or plus an image.
 *
 * Same no-margins convention as `card-grid.css` (PR 3.1), `cta-band.css` (PR 3.2),
 * `hero.css` (PR 3.3) and `media-text.css` (PR 3.4): nothing inside a block-gapped
 * group gets a `margin` declaration here. Spacing between blocks is `blockGap` in
 * the pattern markup, where the Site Editor can see it. The one exception below is
 * labelled as one, and is the same technique `.oc-card__body > .oc-card__link` uses.
 *
 * No media query. The columns are core's grid layout with
 * `minimumColumnWidth: 19rem` — `repeat(auto-fill, minmax(19rem, 1fr))`, which is
 * 3-up at the theme's 1140px content width, 2-up on a tablet and 1-up on a phone,
 * with no breakpoint of ours to keep in step with core's.
 */

/* --------------------------------------------------------------------------
 * Card
 *
 * The card group is the grid item, so it stretches to the row height on its own —
 * no `height: 100%`, which would resolve against an auto row and fight the stretch.
 * `min-width: 0` stops a long unbroken product name from widening the track past
 * `1fr`. Everything else about the card's box — `display: flex`,
 * `flex-direction: column`, `align-items: center` — comes from the block's own
 * `layout: {type: flex, orientation: vertical, justifyContent: center}`, so the
 * editor draws the same card the front end does.
 *
 * Centering is one rule on the card rather than a `textAlign` attribute on each
 * block inside it, matching `optconnect/hero-title` and `.oc-media-text--stacked`.
 * ---------------------------------------------------------------------- */
.oc-product-card {
	min-width: 0;
	text-align: center;
}

/* --------------------------------------------------------------------------
 * Card media
 *
 * A fixed-height contain box, which is the first half of the alignment fix this
 * pattern exists for: the family's product photos run 600x429 to 800x619, so
 * letting each one size its own cell is what puts a row of product names on three
 * different baselines on the live page. `object-fit` is deliberately absent and
 * `max-height` deliberately used instead — these are transparent-background device
 * shots where a crop would cut the hardware, so they letterbox inside the box
 * rather than filling it.
 *
 * No `margin: 0` here. Unlike PR 3.1's cards, this card group uses core's flex
 * layout, which emits its own `> * { margin: 0 }` — there is nothing left to clear.
 * ---------------------------------------------------------------------- */
.oc-product-card__media {
	display: flex;
	min-height: 180px;
	align-items: center;
	justify-content: center;
}

.oc-product-card__media img {
	max-height: 180px;
	width: auto;
}

/* --------------------------------------------------------------------------
 * Card text
 * ---------------------------------------------------------------------- */
.oc-product-card__title {
	font-size: 1.25rem;
	line-height: 1.35;
}

.oc-product-card__spec {
	color: var(--wp--preset--color--accent-6, #454545);
	font-size: 1rem;
}

/* A card's label: the platform it belongs to (services batch 2), or "Coming soon"
   where a product has no page yet (the product hubs, PR 6.1). */
.oc-product-card__label {
	color: var(--wp--preset--color--accent-1, #0081c2);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* The partner logo board over the partners' cards (12760). */
.oc-product-row__logos img {
	width: 100%;
	max-width: 760px;
	height: auto;
}

/* --------------------------------------------------------------------------
 * Card action
 *
 * The exception to the no-margins rule, and the second half of the alignment fix:
 * `margin-block-start: auto` pins the button to the card's bottom edge, so a row of
 * cards lines its buttons up however long the product names and spec lines run.
 * Written at two classes rather than one, and as the SAME logical property core's
 * flex layout resets — replacing that reset here is the point, and doing it at a
 * higher specificity means it does not depend on this file loading last.
 * ---------------------------------------------------------------------- */
.oc-product-card > .oc-product-card__actions {
	margin-block-start: auto;
	padding-top: var(--wp--preset--spacing--20, 10px);
}
