/* --------------------------------------------------------------------------
   Product card — Figma "Dosh-web" (homepage flavors + shop loop)
   -------------------------------------------------------------------------- */
.ap-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	font-family: var(--font-body);
}

.ap-card__media {
	display: block;
	aspect-ratio: 1;
	padding: 0 20px;
}

.ap-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.ap-card__media:hover .ap-card__img {
	transform: scale(1.04);
}

.ap-card__options {
	min-height: 81px;
	padding: 25px 0;
	border-bottom: 1px solid var(--ap-border);
}

.ap-card__pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.ap-card__pill {
	min-width: 64px;
	height: 30px;
	padding: 0 14px;
	border: 1px solid var(--ap-border);
	border-radius: 15px;
	background: var(--ap-white);
	color: var(--ap-grey);
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ap-card__pill:hover:not(:disabled) {
	border-color: var(--ap-grey);
	color: var(--ap-black);
}

.ap-card__pill.is-active {
	border-color: var(--ap-grey);
	background: var(--ap-grey);
	color: var(--ap-white);
}

.ap-card__pill:disabled {
	opacity: 0.45;
	text-decoration: line-through;
	cursor: not-allowed;
}

.ap-card__body {
	flex: 1;
	padding: 25px 0;
	border-bottom: 1px solid var(--ap-border);
}

.ap-card__title {
	margin: 0 0 8px;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.5;
}

.ap-card__title a {
	color: var(--ap-black);
}

.ap-card__title a:hover {
	color: var(--ap-pink);
}

.ap-card__desc {
	margin: 0;
	color: var(--ap-text);
	font-size: 12px;
	line-height: 1.4;
}

.ap-card__rating {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 15px;
}

.ap-card__rating .ap-icon {
	width: 24px;
	height: 24px;
}

.ap-card__rating-value {
	color: var(--ap-text-muted);
	font-size: 12px;
}

.ap-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 25px;
}

.ap-card__view,
.ap-card__cart {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 5px;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ap-card__view {
	border: 1px solid var(--ap-border);
	color: var(--ap-border);
}

.ap-card__view:hover {
	border-color: var(--ap-black);
	color: var(--ap-black);
}

.ap-card__view .ap-icon {
	width: 21px;
	height: 17px;
}

.ap-card__price {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 88px;
	height: 40px;
	margin-left: auto;
	padding: 0 16px;
	border-radius: 20px;
	background: var(--ap-pill-bg);
	color: var(--ap-black);
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
}

.ap-card__cart {
	background: var(--ap-black);
	color: var(--ap-white);
}

.ap-card__cart:hover {
	background: var(--ap-pink);
	color: var(--ap-white);
}

.ap-card__cart .ap-icon {
	width: 21px;
	height: 20px;
}

.ap-card__cart.loading {
	opacity: 0.6;
	cursor: wait;
}

.ap-card__cart[aria-disabled="true"] {
	background: var(--ap-border);
	pointer-events: none;
}

/* WooCommerce appends a "View cart" link after AJAX add — the drawer replaces it. */
.ap-card .added_to_cart {
	display: none;
}

@media (max-width: 767px) {
	.ap-card__options,
	.ap-card__body {
		padding: 20px 0;
	}

	.ap-card__pills {
		gap: 6px;
	}

	.ap-card__pill {
		min-width: 0;
		height: 28px;
		padding: 0 10px;
		font-size: 12px;
	}

	.ap-card__footer {
		padding-top: 20px;
	}

	.ap-card__price {
		min-width: 0;
		padding: 0 12px;
		font-size: 13px;
	}
}
