:root {
	--winery-card-background: var(--winery-shop-color-surface);
	--winery-card-border-color: var(--winery-shop-color-border);
	--winery-card-border-radius: var(--winery-shop-radius-md);
	--winery-card-shadow: var(--winery-shop-shadow-card);
	--winery-card-shadow-hover: 0 12px 28px -14px rgba(15, 23, 42, 0.34);
	--winery-card-padding: var(--winery-shop-space-4);
	--winery-card-content-gap: var(--winery-shop-space-3);
	--winery-card-media-aspect-ratio: 3 / 4;
	--winery-card-media-background: var(--winery-shop-color-surface-subtle);
	--winery-card-media-inset: var(--winery-shop-space-4);
	--winery-card-image-fit: contain;
	--winery-card-image-hover-scale: 1.04;
	--winery-card-hover-lift: -2px;
	--winery-card-badge-background: var(--winery-shop-color-surface-emphasis);
	--winery-card-badge-color: var(--winery-shop-color-text);
	--winery-card-cta-background: var(--winery-shop-color-accent);
	--winery-card-cta-background-hover: var(--winery-shop-color-accent-hover);
	--winery-card-cta-color: var(--winery-shop-color-accent-contrast);
	--winery-card-member-preview-order: 1;
	--winery-card-member-popover-padding-block-end: var(--winery-shop-space-3);
	--winery-card-sale-label-order: 2;
	--winery-card-price-row-order: 3;
}

.winery-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: visible;
	color: var(--winery-shop-color-text);
	font-family: var(--winery-shop-font-family-body);
	font-size: var(--winery-shop-font-size-base);
	line-height: var(--winery-shop-line-height-base);
	background: var(--winery-card-background);
	border: var(--winery-shop-border-width) solid var(--winery-card-border-color);
	border-radius: var(--winery-card-border-radius);
	box-shadow: var(--winery-card-shadow);
	transition: box-shadow var(--winery-shop-transition), transform var(--winery-shop-transition);
}

.winery-product-card:hover,
.winery-product-card:focus-within {
	z-index: 5;
	box-shadow: var(--winery-card-shadow-hover);
	transform: translateY(var(--winery-card-hover-lift));
}

/* Bottle shots vary in intrinsic ratio and in how much whitespace they carry.
   A fixed tall box, a shared neutral fill, and a uniform inset make `contain`
   letterbox the same way in every cell instead of reading as an accident.
   The inset lives on the media rather than the link so it moves the images
   without moving the badges, whose containing block is this padding box; the
   explicit box-sizing keeps the ratio describing the visible frame whatever
   reset the consuming theme ships. */
.winery-product-card__media {
	position: relative;
	display: grid;
	box-sizing: border-box;
	aspect-ratio: var(--winery-card-media-aspect-ratio);
	padding: var(--winery-card-media-inset);
	overflow: hidden;
	background: var(--winery-card-media-background);
	border-radius: var(--winery-card-border-radius) var(--winery-card-border-radius) 0 0;
}

.winery-product-card__media-link {
	position: relative;
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
}

.winery-product-card__image,
.winery-product-card__secondary-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--winery-card-image-fit);
	object-position: center;
	transition: opacity var(--winery-shop-transition), transform var(--winery-shop-transition);
}

.winery-product-card__secondary-image {
	position: absolute;
	inset: 0;
	opacity: 0;
}

.winery-product-card:hover .winery-product-card__image,
.winery-product-card:focus-within .winery-product-card__image,
.winery-product-card:hover .winery-product-card__secondary-image,
.winery-product-card:focus-within .winery-product-card__secondary-image {
	transform: scale(var(--winery-card-image-hover-scale));
}

.winery-product-card--has-secondary-image:hover .winery-product-card__image,
.winery-product-card--has-secondary-image:focus-within .winery-product-card__image {
	opacity: 0;
}

.winery-product-card--has-secondary-image:hover .winery-product-card__secondary-image,
.winery-product-card--has-secondary-image:focus-within .winery-product-card__secondary-image {
	opacity: 1;
}

.winery-product-card__image-placeholder {
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
	color: var(--winery-shop-color-muted);
	font-size: var(--winery-shop-font-size-sm);
	text-align: center;
}

.winery-product-card__badges {
	position: absolute;
	z-index: 2;
	top: var(--winery-shop-space-3);
	left: var(--winery-shop-space-3);
	display: flex;
	max-width: calc(100% - (2 * var(--winery-shop-space-3)));
	flex-wrap: wrap;
	gap: var(--winery-shop-space-2);
}

.winery-product-card__badge,
.winery-product-card__availability,
.winery-product-card__vintage {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: var(--winery-shop-space-1) var(--winery-shop-space-2);
	border-radius: var(--winery-shop-radius-pill);
	font-size: var(--winery-shop-font-size-xs);
	font-weight: var(--winery-shop-font-weight-medium);
	line-height: var(--winery-shop-line-height-tight);
}

.winery-product-card__abv {
	color: var(--winery-card-muted-color, var(--winery-shop-color-muted));
	font-size: var(--winery-shop-font-size-xs);
}

.winery-product-card__badge {
	color: var(--winery-card-badge-color);
	background: var(--winery-card-badge-background);
}

.winery-product-card__badge--sale {
	color: var(--winery-shop-color-accent-contrast);
	background: var(--winery-card-sale-color);
}

.winery-product-card__badge--member {
	color: var(--winery-shop-color-accent-contrast);
	background: var(--winery-shop-color-accent);
}

.winery-product-card__availability {
	position: absolute;
	z-index: 2;
	right: var(--winery-shop-space-3);
	bottom: var(--winery-shop-space-3);
	background: var(--winery-shop-color-surface);
}

.winery-product-card--low-stock .winery-product-card__availability {
	color: var(--winery-shop-color-warning);
}

.winery-product-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--winery-card-content-gap);
	padding: var(--winery-card-padding);
}

.winery-product-card__eyebrow,
.winery-product-card__teaser {
	display: flex;
	flex-wrap: wrap;
	gap: var(--winery-shop-space-2);
	margin: 0;
}

.winery-product-card__eyebrow {
	color: var(--winery-shop-color-muted);
	font-size: var(--winery-shop-font-size-xs);
	font-weight: var(--winery-shop-font-weight-medium);
	letter-spacing: var(--winery-shop-letter-spacing-eyebrow);
	text-transform: var(--winery-shop-text-transform-eyebrow);
}

.winery-product-card__eyebrow-item + .winery-product-card__eyebrow-item::before,
.winery-product-card__teaser-term + .winery-product-card__teaser-term::before {
	margin-right: var(--winery-shop-space-2);
	content: "·";
}

.winery-product-card__vintage {
	align-self: flex-start;
	color: var(--winery-shop-color-text);
	background: var(--winery-card-badge-background);
}

.winery-product-card__title,
.winery-product-card__varietal,
.winery-product-card__excerpt,
.winery-product-card__bundle-count,
.winery-product-card__bundle-value,
.winery-product-card__member-preview-title,
.winery-product-card__member-preview-note {
	margin: 0;
}

.winery-product-card__title {
	font-family: var(--winery-shop-font-family-heading);
	font-size: var(--winery-shop-font-size-lg);
	font-weight: var(--winery-shop-font-weight-semibold);
	line-height: var(--winery-shop-line-height-tight);
}

.winery-product-card__title-link {
	color: inherit;
	text-decoration: none;
}

.winery-product-card__title-link:hover {
	color: var(--winery-shop-color-accent-hover);
}

.winery-product-card__title-link:focus-visible,
.winery-product-card__member-preview-toggle:focus-visible,
.winery-product-card__member-preview-join:focus-visible,
.winery-product-card__cta:focus-visible {
	outline: var(--winery-shop-focus-ring);
	outline-offset: var(--winery-shop-space-1);
}

.winery-product-card__teaser,
.winery-product-card__varietal,
.winery-product-card__excerpt,
.winery-product-card__bundle-contents,
.winery-product-card__member-preview-note {
	color: var(--winery-shop-color-muted);
	font-size: var(--winery-shop-font-size-sm);
}

.winery-product-card__bundle-contents {
	display: grid;
	gap: var(--winery-shop-space-2);
}

.winery-product-card__bundle-count {
	color: var(--winery-shop-color-text);
	font-weight: var(--winery-shop-font-weight-semibold);
}

.winery-product-card__bundle-items {
	display: grid;
	gap: var(--winery-shop-space-1);
	padding: 0;
	margin: 0;
	list-style: none;
}

.winery-product-card__member-preview {
	position: relative;
	order: var(--winery-card-member-preview-order);
	margin: 0;
	border-top: var(--winery-shop-border-width) solid var(--winery-card-border-color);
	border-bottom: var(--winery-shop-border-width) solid var(--winery-card-border-color);
}

.winery-product-card__member-preview-toggle {
	display: flex;
	width: 100%;
	min-height: var(--winery-shop-control-min-height);
	align-items: center;
	gap: var(--winery-shop-space-2);
	padding: 0;
	color: inherit;
	cursor: pointer;
	font-size: var(--winery-shop-font-size-sm);
	font-weight: var(--winery-shop-font-weight-medium);
	text-align: start;
	background: transparent;
	border: 0;
}

.winery-product-card__member-preview-popover {
	position: absolute;
	z-index: 4;
	top: auto;
	right: 0;
	bottom: 100%;
	left: 0;
	display: block;
	padding: var(--winery-shop-space-3);
	padding-block-end: var(--winery-card-member-popover-padding-block-end);
	color: var(--winery-shop-color-muted);
	pointer-events: none;
	visibility: hidden;
	background: var(--winery-shop-color-surface);
	border: var(--winery-shop-border-width) solid var(--winery-card-border-color);
	border-radius: var(--winery-shop-radius-md);
	box-shadow: var(--winery-shop-shadow-popover);
	opacity: 0;
	transform: translateY(var(--winery-shop-space-1));
	transition: opacity var(--winery-shop-transition), transform var(--winery-shop-transition), visibility var(--winery-shop-transition);
}

.winery-product-card__member-preview:hover:not(.is-closed) .winery-product-card__member-preview-popover,
.winery-product-card__member-preview:focus-within:not(.is-closed) .winery-product-card__member-preview-popover,
.winery-product-card__member-preview.is-open .winery-product-card__member-preview-popover {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
}

.winery-product-card__member-preview-tiers {
	display: grid;
	gap: var(--winery-shop-space-1);
	margin: var(--winery-shop-space-2) 0;
	padding: 0;
	list-style: none;
}

.winery-product-card__member-preview-tier {
	display: flex;
	justify-content: space-between;
	gap: var(--winery-shop-space-3);
	font-size: var(--winery-shop-font-size-sm);
}

.winery-product-card__member-preview-savings {
	margin: var(--winery-shop-space-2) 0;
	font-size: var(--winery-shop-font-size-sm);
	font-weight: var(--winery-shop-font-weight-medium);
}

.winery-product-card__member-preview-title {
	color: var(--winery-shop-color-text);
	font-weight: var(--winery-shop-font-weight-semibold);
}

/* The shared block-end token keeps theme padding and the hit-area bridge in
   lockstep while the equal padding and margin preserve the visible layout. */
.winery-product-card__member-preview-join {
	display: block;
	margin-block-end: calc(-1 * (var(--winery-card-member-popover-padding-block-end) + var(--winery-shop-border-width)));
	padding-block-end: calc(var(--winery-card-member-popover-padding-block-end) + var(--winery-shop-border-width));
	pointer-events: auto;
}

.winery-product-card__sale-label {
	display: flex;
	order: var(--winery-card-sale-label-order);
	flex-wrap: wrap;
	gap: var(--winery-shop-space-1);
	margin: 0;
	color: var(--winery-sale-label-color);
	font-size: var(--winery-sale-label-font-size);
	font-weight: var(--winery-shop-font-weight-semibold);
	letter-spacing: var(--winery-shop-letter-spacing-eyebrow);
	text-transform: var(--winery-shop-text-transform-eyebrow);
}

.winery-product-card__sale-savings {
	color: var(--winery-sale-savings-color);
}

.winery-product-card__price-row {
	display: flex;
	order: var(--winery-card-price-row-order);
	align-items: center;
	flex-wrap: wrap;
	gap: var(--winery-shop-space-2);
	margin-top: auto;
}

.winery-product-card__price-row > .winery-c7-cart-add-status {
	flex-basis: 100%;
}

.winery-product-card__price {
	display: inline-flex;
	align-items: baseline;
	gap: var(--winery-shop-space-1);
}

.winery-product-card__price-now {
	font-size: var(--winery-shop-font-size-lg);
	font-weight: var(--winery-shop-font-weight-semibold);
}

.winery-product-card__price--member {
	color: var(--winery-shop-color-muted);
}

.winery-product-card__price-was-label,
.winery-product-card__price-was {
	color: var(--winery-sale-was-strike-color);
	font-size: var(--winery-shop-font-size-sm);
}

.winery-product-card__price-was {
	position: relative;
}

.winery-product-card__price-was::after {
	position: absolute;
	top: 50%;
	right: 0;
	left: 0;
	height: var(--winery-sale-was-strike-thickness);
	content: "";
	background: var(--winery-sale-was-strike-color);
	transform: translateY(-50%);
}

.winery-product-card__actions {
	display: flex;
	flex: 1 1 100%;
	flex-wrap: wrap;
	gap: var(--winery-shop-space-2);
}

.winery-product-card__cta {
	display: inline-flex;
	min-height: var(--winery-shop-control-min-height);
	align-items: center;
	justify-content: center;
	padding: var(--winery-shop-button-padding);
	border: 0;
	border-radius: var(--winery-shop-radius-sm);
	cursor: pointer;
	font: inherit;
	font-weight: var(--winery-shop-font-weight-semibold);
	line-height: var(--winery-shop-line-height-tight);
	text-decoration: none;
	transition: color var(--winery-shop-transition), background var(--winery-shop-transition), border-color var(--winery-shop-transition), box-shadow var(--winery-shop-transition);
}

.winery-product-card__cta--buy,
.winery-product-card__cta--claim {
	color: var(--winery-card-cta-color);
	background: var(--winery-card-cta-background);
}

.winery-product-card__cta--buy:hover,
.winery-product-card__cta--claim:hover {
	background: var(--winery-card-cta-background-hover);
}

.winery-product-card__cta--join {
	color: var(--winery-shop-color-accent);
	background: var(--winery-shop-color-surface);
	border: var(--winery-shop-border-width) solid var(--winery-shop-color-accent);
}

.winery-product-card__cta--join:hover {
	color: var(--winery-shop-color-accent-contrast);
	background: var(--winery-shop-color-accent-hover);
	border-color: var(--winery-shop-color-accent-hover);
}

.winery-product-card__cta--disabled {
	color: var(--winery-shop-color-disabled);
	cursor: not-allowed;
	background: var(--winery-shop-color-surface);
	border: var(--winery-shop-border-width) solid var(--winery-shop-color-disabled);
}

.winery-product-card[hidden],
.winery-product-card__media[hidden],
.winery-product-card__media-link[hidden],
.winery-product-card__image[hidden],
.winery-product-card__secondary-image[hidden],
.winery-product-card__image-placeholder[hidden],
.winery-product-card__badges[hidden],
.winery-product-card__badge[hidden],
.winery-product-card__availability[hidden],
.winery-product-card__body[hidden],
.winery-product-card__eyebrow[hidden],
.winery-product-card__teaser[hidden],
.winery-product-card__vintage[hidden],
.winery-product-card__bundle-contents[hidden],
.winery-product-card__bundle-count[hidden],
.winery-product-card__bundle-items[hidden],
.winery-product-card__bundle-item[hidden],
.winery-product-card__bundle-item-image[hidden],
.winery-product-card__bundle-item-eyebrow[hidden],
.winery-product-card__bundle-item-vintage[hidden],
.winery-product-card__bundle-item-varietal[hidden],
.winery-product-card__bundle-item-teaser[hidden],
.winery-product-card__bundle-value[hidden],
.winery-product-card__member-preview[hidden],
.winery-product-card__member-preview-toggle[hidden],
.winery-product-card__member-preview-popover[hidden],
.winery-product-card__member-preview-tiers[hidden],
.winery-product-card__member-preview-tier[hidden],
.winery-product-card__member-preview-savings[hidden],
.winery-product-card__sale-label[hidden],
.winery-product-card__sale-savings[hidden],
.winery-product-card__price-row[hidden],
.winery-product-card__price[hidden],
.winery-product-card__price--member[hidden],
.winery-product-card__price-now[hidden],
.winery-product-card__price-was[hidden],
.winery-product-card__actions[hidden],
.winery-product-card__cta[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.winery-product-card,
	.winery-product-card *,
	.winery-product-card *::before,
	.winery-product-card *::after {
		transition: none;
	}

	.winery-product-card:hover,
	.winery-product-card:focus-within,
	.winery-product-card:hover .winery-product-card__image,
	.winery-product-card:focus-within .winery-product-card__image,
	.winery-product-card:hover .winery-product-card__secondary-image,
	.winery-product-card:focus-within .winery-product-card__secondary-image {
		transform: none;
	}
}
