/* --------------------------------------------------------------------------
   Shop / product category list — Figma "Dosh-web" (Products)
   -------------------------------------------------------------------------- */
.ap-shop__header {
	padding-top: clamp(30px, 3vw, 60px);
}

.ap-shop__header .page-title {
	margin: 0;
	font-weight: 600;
	font-size: clamp(28px, 2.4vw, 48px);
	line-height: 1.2;
}

.ap-shop__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ap-shop-item {
	--ap-accent: var(--ap-pink);
	--ap-tone-color: color-mix(in srgb, var(--ap-black) var(--ap-tone, 0%), var(--ap-pink));
	padding: clamp(60px, 9.1vw, 180px) 0;
	scroll-margin-top: var(--header-height);
}

.ap-shop-item:nth-child(even) {
	background: var(--ap-bg-grey);
}

.ap-shop-item__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 265fr) minmax(0, 441fr) minmax(0, 172fr) minmax(0, 600fr);
	align-items: center;
}

/* Timeline: a dot + name per row, joined by a pink → black line across the list */
.ap-shop-item__marker {
	position: absolute;
	top: 50%;
	left: var(--ap-gutter);
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ap-tone-color);
	font-family: var(--font-heading);
	font-size: 12px;
	line-height: 1.5;
	transform: translateY(-50%);
	transition: color 0.2s ease;
}

.ap-shop-item__marker::before {
	content: "";
	flex-shrink: 0;
	width: 9px;
	height: 9px;
	margin-left: -3.5px;
	border-radius: 50%;
	background: var(--ap-tone-color);
}

.ap-shop-item.is-current .ap-shop-item__marker,
.ap-shop-item__marker:hover {
	color: var(--ap-black);
}

.ap-shop-item__inner::before {
	content: "";
	position: absolute;
	top: calc(-1 * clamp(60px, 9.1vw, 180px));
	bottom: calc(-1 * clamp(60px, 9.1vw, 180px));
	left: var(--ap-gutter);
	width: 2px;
	background: linear-gradient(
		to bottom,
		color-mix(in srgb, var(--ap-black) var(--ap-tone-start, 0%), var(--ap-pink)),
		color-mix(in srgb, var(--ap-black) var(--ap-tone-end, 0%), var(--ap-pink))
	);
}

.ap-shop-item:first-child .ap-shop-item__inner::before {
	top: 50%;
}

.ap-shop-item:last-child .ap-shop-item__inner::before {
	bottom: 50%;
}

.ap-shop-item:only-child .ap-shop-item__inner::before {
	display: none;
}

/* Media */
.ap-shop-item__media {
	grid-column: 2;
	display: block;
}

.ap-shop-item__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.ap-shop-item__media:hover .ap-shop-item__img {
	transform: scale(1.03);
}

/* Info */
.ap-shop-item__info {
	grid-column: 4;
	font-family: var(--font-heading);
}

.ap-shop-item__head {
	display: flex;
	justify-content: space-between;
	gap: 30px;
}

.ap-shop-item__heading {
	min-width: 0;
}

.ap-shop-item__title {
	margin: 0 0 10px;
	font-weight: 600;
	font-size: 32px;
	line-height: 1.2;
}

.ap-shop-item__title a {
	color: var(--ap-black);
}

.ap-shop-item__title a:hover {
	color: var(--ap-accent);
}

.ap-shop-item__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ap-shop-item__pill {
	min-width: 84px;
	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: 500;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ap-shop-item__pill:hover:not(:disabled) {
	border-color: var(--ap-accent);
	color: var(--ap-black);
}

.ap-shop-item__pill.is-active {
	border-color: var(--ap-accent);
	background: var(--ap-accent);
	color: var(--ap-white);
}

.ap-shop-item__pill:disabled {
	opacity: 0.45;
	text-decoration: line-through;
	cursor: not-allowed;
}

.ap-shop-item__prices {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	flex-shrink: 0;
	min-width: 150px;
	padding-left: 30px;
	border-left: 1px solid var(--ap-border-light);
	white-space: nowrap;
}

.ap-shop-item__price-old {
	color: var(--ap-text-light);
	font-size: 20px;
	line-height: 1.3;
}

.ap-shop-item__price {
	color: var(--ap-black);
	font-weight: 600;
	font-size: 32px;
	line-height: 1.2;
}

.ap-shop-item__desc-label {
	margin: 40px 0 12px;
	color: var(--ap-black);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.5;
}

.ap-shop-item__desc {
	margin: 0;
	color: var(--ap-text);
	font-size: 15px;
	line-height: 1.6;
}

.ap-shop-item__actions {
	display: flex;
	justify-content: flex-end;
	gap: 20px;
	margin-top: 25px;
}

/* The cart drawer replaces WooCommerce's "View cart" link */
.ap-shop-item .added_to_cart {
	display: none;
}

.ap-shop__pagination {
	padding-top: 60px;
	padding-bottom: 60px;
}

.ap-shop__empty {
	padding-top: 100px;
	padding-bottom: 100px;
}

/* SEO text below the list */
.ap-shop-seo {
	padding: 110px 0;
	background: var(--ap-bg-soft);
}

.ap-shop-seo__content {
	column-count: 2;
	column-gap: 60px;
	color: var(--ap-text);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.4;
}

.ap-shop-seo__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px 60px;
	color: var(--ap-text);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.4;
}

.ap-shop-seo__content > :first-child,
.ap-shop-seo__block > :first-child {
	margin-top: 0;
}

.ap-shop-seo__block > :last-child {
	margin-bottom: 0;
}

.ap-shop-seo__block h2,
.ap-shop-seo__block h3,
.ap-shop-seo__content h2,
.ap-shop-seo__content h3 {
	margin: 30px 0 10px;
	font-weight: 600;
	font-size: 22px;
	line-height: 1.4;
	break-after: avoid;
}

.ap-shop-seo__content h2 + *,
.ap-shop-seo__content h3 + * {
	break-before: avoid;
}

.ap-shop-seo__block p,
.ap-shop-seo__content p {
	margin: 0 0 12px;
}

@media (max-width: 1199px) {
	.ap-shop-item__inner {
		grid-template-columns: minmax(0, 200fr) minmax(0, 400fr) minmax(0, 60fr) minmax(0, 560fr);
	}

	.ap-shop-item__title,
	.ap-shop-item__price {
		font-size: 28px;
	}

	.ap-shop-item__head {
		gap: 20px;
	}

	.ap-shop-item__prices {
		min-width: 110px;
		padding-left: 20px;
	}

	.ap-shop-seo {
		padding: 80px 0;
	}
}

@media (max-width: 991px) {
	.ap-shop-item__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
		column-gap: 40px;
	}

	.ap-shop-item__marker,
	.ap-shop-item__inner::before {
		display: none;
	}

	.ap-shop-item__media {
		grid-column: 1;
	}

	.ap-shop-item__info {
		grid-column: 2;
	}

	.ap-shop-item__head {
		flex-direction: column;
		gap: 15px;
	}

	.ap-shop-item__prices {
		flex-direction: row;
		align-items: baseline;
		justify-content: flex-start;
		gap: 12px;
		min-width: 0;
		padding-left: 0;
		border-left: 0;
	}

	.ap-shop-item__desc-label {
		margin-top: 25px;
	}

	.ap-shop-seo__content {
		column-count: 1;
	}

	.ap-shop-seo__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.ap-shop-item {
		padding: 50px 0;
	}

	.ap-shop-item__inner {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 30px;
	}

	.ap-shop-item__media {
		width: min(280px, 80%);
		margin: 0 auto;
	}

	/* Figma mobile: price sits bottom-right, opposite the view / cart buttons */
	.ap-shop-item__info {
		grid-column: 1;
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas:
			"heading heading"
			"label label"
			"desc desc"
			"actions prices";
	}

	.ap-shop-item__head {
		display: contents;
	}

	.ap-shop-item__heading {
		grid-area: heading;
	}

	.ap-shop-item__desc-label {
		grid-area: label;
	}

	.ap-shop-item__desc {
		grid-area: desc;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;
	}

	.ap-shop-item__actions {
		grid-area: actions;
		align-self: end;
		justify-content: flex-start;
	}

	.ap-shop-item__prices {
		grid-area: prices;
		align-self: end;
		flex-direction: column;
		align-items: flex-end;
		gap: 0;
		margin-top: 25px;
	}

	.ap-shop-item__title,
	.ap-shop-item__price {
		font-size: 24px;
	}

	.ap-shop-item__price {
		font-size: 28px;
	}

	.ap-shop-item__price-old {
		font-size: 16px;
	}

	.ap-shop-item__pills {
		gap: 8px;
	}

	.ap-shop-item__pill {
		min-width: 70px;
	}

	.ap-shop-item__desc {
		font-size: 14px;
	}

	.ap-shop-seo {
		padding: 60px 0;
	}

	.ap-shop-seo__block h2,
	.ap-shop-seo__block h3,
	.ap-shop-seo__content h2,
	.ap-shop-seo__content h3 {
		font-size: 20px;
	}
}
