/**
 * Out-N-Out Product Card + Product Grid. Token-driven. No JS beyond WooCommerce's
 * own AJAX add-to-cart. Handle: oon-widget-product-card (shared by grid + card).
 */
.oon-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--oon-column-gap, 30px);
	row-gap: var(--oon-column-gap, 30px);
}

.oon-product-grid--single {
	display: block;
	max-width: 320px;
}

.oon-product-grid__notice {
	padding: 20px;
	border: 1px dashed var(--oon-color-border, #eee);
	color: var(--oon-color-text-secondary, #666);
	text-align: center;
	border-radius: var(--oon-radius-sm, 4px);
}

/* ---- Card ---- */
.oon-product-card {
	min-width: 0;
}

.oon-product-card__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--oon-radius-sm, 4px);
	background: var(--oon-color-bg, #fff); /* Live letterboxes the contained image on white. */
	aspect-ratio: 3 / 4; /* portrait product image, matching the live card */
}

.oon-product-card__media-link {
	display: block;
	width: 100%;
	height: 100%;
}

.oon-product-card__img,
.oon-product-card__img img {
	display: block;
	width: 100%;
	height: 100%;
}

.oon-product-card__img img {
	object-fit: contain; /* Live fits the full (square) product image inside the 3:4 card. */
}

/* Hover image cross-fade (verified live behavior). */
.oon-product-card__img--hover {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--oon-transition, 0.25s ease);
}

.oon-product-card__media:hover .oon-product-card__img--hover {
	opacity: 1;
}

/* ---- Badges ---- */
.oon-product-card__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.oon-product-card__badge {
	font-family: var(--oon-font-body);
	font-weight: var(--oon-fw-medium, 500);
	line-height: 1.4;
}

/* Live sale badge reads uppercase ("ON SALE"). */
.oon-product-card__badge--sale {
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.oon-product-card__badge--soldout {
	background: var(--oon-color-heading, #332d55);
	color: #fff;
}

/* ---- Hover action icons (wishlist / compare / quick view) ---- */
.oon-product-card__actions {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	z-index: 3;
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 10px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity var(--oon-transition, 0.25s ease), transform var(--oon-transition, 0.25s ease);
	pointer-events: none;
}
.oon-product-card__media:hover .oon-product-card__actions,
.oon-product-card__media:focus-within .oon-product-card__actions {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.oon-product-card__actions:empty {
	display: none;
}
.oon-product-card__action {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--oon-color-heading, #332d55);
	background: #fff;
	border: none;
	border-radius: var(--oon-radius-full, 9999px);
	box-shadow: 0 4px 14px rgba(var(--oon-color-heading-rgb, 51, 45, 85), 0.18);
	cursor: pointer;
	text-decoration: none;
	transition: background-color var(--oon-transition, 0.25s ease), color var(--oon-transition, 0.25s ease);
}
.oon-product-card__action:hover,
.oon-product-card__action:focus-visible {
	background: var(--oon-color-heading, #332d55);
	color: #fff;
}
.oon-product-card__action .oon-ico {
	width: 18px;
	height: 18px;
}

/* ---- Body ---- */
.oon-product-card__body {
	padding-top: 14px;
}

.oon-product-card__vendor {
	font-family: var(--oon-font-body);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--oon-color-text-secondary, #666);
	margin-bottom: 4px;
}

.oon-product-card__title {
	margin: 0 0 8px;
	font-family: var(--oon-font-heading);
	font-weight: var(--oon-fw-heading, 500);
	font-size: 1.05rem;
	line-height: 1.3;
}

.oon-product-card__title a {
	color: var(--oon-color-heading, #332d55);
	text-decoration: none;
	transition: color var(--oon-transition, 0.25s ease);
}

.oon-product-card__title a:hover,
.oon-product-card__title a:focus {
	color: var(--oon-color-accent, #9a84c8);
}

.oon-product-card__rating {
	margin-bottom: 6px;
	font-size: 0.85rem;
}

.oon-product-card__price {
	font-family: var(--oon-font-body);
	font-weight: var(--oon-fw-medium, 500);
	color: var(--oon-color-text, #212121);
	margin-bottom: 12px;
}

/* WooCommerce price markup: sale price + struck regular. */
.oon-product-card__price del {
	color: var(--oon-color-text-secondary, #666);
	opacity: 0.8;
	margin-right: 6px;
	font-weight: var(--oon-fw-regular, 400);
}

.oon-product-card__price ins {
	text-decoration: none;
	color: var(--oon-color-price-sale, #e84e4e);
}

/* ---- Buttons ---- */
.oon-product-card__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.oon-product-card__atc,
.oon-product-card__whatsapp,
.oon-product-card__shop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 24px;
	font-family: var(--oon-font-body);
	font-weight: var(--oon-fw-medium, 500);
	font-size: 0.9rem;
	line-height: var(--oon-btn-line-height, 26px);
	border-radius: var(--oon-btn-radius, 78px);
	border: var(--oon-btn-border-width, 1px) solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--oon-transition, 0.25s ease), color var(--oon-transition, 0.25s ease), border-color var(--oon-transition, 0.25s ease);
}

.oon-product-card__atc {
	background: var(--oon-color-btn, #332d55);
	border-color: var(--oon-color-btn, #332d55);
	color: #fff;
}

.oon-product-card__atc:hover,
.oon-product-card__atc:focus {
	background: var(--oon-color-accent, #9a84c8);
	border-color: var(--oon-color-accent, #9a84c8);
	color: #fff;
}

/* Shop Now — white pill with a light border (live featured card). */
.oon-product-card__shop {
	background: #fff;
	border-color: var(--oon-color-border, #e2e2e2);
	color: var(--oon-color-heading, #332d55);
}
.oon-product-card__shop:hover,
.oon-product-card__shop:focus {
	background: var(--oon-color-heading, #332d55);
	border-color: var(--oon-color-heading, #332d55);
	color: #fff;
}

/* WhatsApp Order — brand green (live). */
.oon-product-card__whatsapp {
	background: #25d366;
	border-color: #25d366;
	color: #fff;
}
.oon-product-card__whatsapp:hover,
.oon-product-card__whatsapp:focus {
	background: #1eb457;
	border-color: #1eb457;
	color: #fff;
}
.oon-product-card__whatsapp .oon-ico {
	width: 18px;
	height: 18px;
}

/* Added state from WooCommerce AJAX. */
.oon-product-card__atc.added {
	opacity: 0.85;
}
.oon-product-card__atc.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* =========================================================================
   LIST LAYOUT — horizontal product row (live collection page).
   Image left; vendor, title, price, description excerpt and CTAs on the right.
   ========================================================================= */
.oon-product-card--list {
	display: grid;
	grid-template-columns: minmax(220px, 270px) 1fr; /* Live collection tile image = 270px wide. */
	gap: clamp(18px, 3vw, 40px);
	align-items: center;
}
.oon-product-card--list .oon-product-card__media {
	width: 100%;
}
.oon-product-card--list .oon-product-card__body {
	padding-top: 0;
}
.oon-product-card--list .oon-product-card__title {
	font-size: 1.25rem;
}

/* Short-description excerpt (2 lines, like live). */
.oon-product-card__description {
	font-family: var(--oon-font-body);
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--oon-color-text-secondary, #666);
	margin: 6px 0 18px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.oon-product-card--list .oon-product-card__buttons {
	align-items: center;
	gap: 12px;
}
.oon-product-card--list .oon-product-card__shop {
	min-width: 150px;
}

/* Inline wishlist heart in the row (live). Reuses the circular action style
   but as a static inline button (not a hover overlay). */
.oon-product-card__wish {
	position: relative;
	flex: none;
}

@media (max-width: 680px) {
	.oon-product-card--list {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.oon-product-card--list .oon-product-card__media {
		max-width: 280px;
	}
}

@media (max-width: 480px) {
	.oon-product-card__buttons {
		flex-direction: column;
		align-items: stretch;
	}
	.oon-product-card__atc,
	.oon-product-card__whatsapp,
	.oon-product-card--list .oon-product-card__shop {
		width: 100%;
	}
	.oon-product-card--list .oon-product-card__wish {
		align-self: flex-start;
	}
}
