/**
 * Store Kit — product archive and cards.
 *
 * Card appearance is driven entirely by body classes and custom properties
 * written from the settings, so one stylesheet covers every skin.
 */

/* -------------------------------------------------------------------------
 * Grid
 * ---------------------------------------------------------------------- */

.sk-archive-page .woocommerce-products-header {
	margin-bottom: var(--sk-space-6);
}

.sk-archive-page .woocommerce-products-header__title {
	margin: 0 0 var(--sk-space-2);
	font-size: var(--sk-t-h1);
	font-weight: var(--sk-fw-h1);
	line-height: var(--sk-lh-h1);
	letter-spacing: var(--sk-tracking-tight);
}

.sk-archive-page .term-description {
	max-width: 70ch;
	color: var(--sk-muted);
	font-size: var(--sk-t-body);
	line-height: var(--sk-lh-body);
}

.sk-shop-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--sk-space-3);
	margin-bottom: var(--sk-space-6);
	padding-bottom: var(--sk-space-4);
	border-bottom: 1px solid var(--sk-border);
}

.sk-archive-page .woocommerce-result-count {
	margin: 0;
	color: var(--sk-muted);
	font-size: var(--sk-fs-sm);
}

.sk-archive-page .woocommerce-ordering {
	margin: 0;
}

.sk-archive-page .woocommerce-ordering select {
	width: auto;
	max-width: 100%;
	min-height: 42px;
	padding: 0 38px 0 14px;
	border: 1px solid var(--sk-border-strong);
	border-radius: var(--sk-radius-btn);
	background-color: var(--sk-card);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	/* A single dimension keeps the chevron square. Giving both axes a length
	 * lets a stretched select distort it. */
	background-size: 15px;
	color: var(--sk-primary);
	font-size: var(--sk-fs-sm);
	line-height: 1.2;
	text-overflow: ellipsis;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
}

/* Themes wrap the ordering form and draw a chevron of their own, which then
 * sits on top of this one. */
.sk-archive-page .woocommerce-ordering::before,
.sk-archive-page .woocommerce-ordering::after,
.sk-archive-page .woocommerce-ordering .select2-selection__arrow,
.sk-archive-page .woocommerce-ordering .ct-select-arrow,
.sk-archive-page .woocommerce-ordering > *::before,
.sk-archive-page .woocommerce-ordering > *::after {
	content: none !important;
	display: none !important;
	background-image: none !important;
}

.sk-archive-page .woocommerce-ordering select::-ms-expand {
	display: none;
}

.sk-archive-page ul.products {
	display: grid;
	grid-template-columns: repeat(var(--sk-cols, 4), minmax(0, 1fr));
	gap: var(--sk-card-gap, 28px);
	margin: 0 0 var(--sk-space-10);
	padding: 0;
	list-style: none;
}

.sk-archive-page ul.products::before,
.sk-archive-page ul.products::after {
	content: none;
}

.sk-archive-page ul.products li.product {
	width: auto;
	margin: 0;
	padding: 0;
	float: none;
	clear: none;
	list-style: none;
	text-align: inherit;
}

/* -------------------------------------------------------------------------
 * Card
 * ---------------------------------------------------------------------- */

.sk-card-product {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--sk-radius);
	background: transparent;
	transition: transform var(--sk-duration) var(--sk-ease), box-shadow var(--sk-duration) var(--sk-ease), border-color var(--sk-duration) var(--sk-ease);
}

.sk-card-filled .sk-card-product {
	background: var(--sk-card-bg, var(--sk-card));
	overflow: hidden;
}

.sk-card-bordered .sk-card-product {
	border: 1px solid var(--sk-border);
	background: var(--sk-card-bg, var(--sk-card));
	overflow: hidden;
}

.sk-card-elevated .sk-card-product {
	border: 1px solid var(--sk-border);
	background: var(--sk-card-bg, var(--sk-card));
	box-shadow: var(--sk-shadow-sm);
	overflow: hidden;
}

.sk-card-elevated .sk-card-product:hover,
.sk-card-bordered .sk-card-product:hover {
	border-color: var(--sk-border-strong);
	box-shadow: var(--sk-shadow);
}

.sk-hover-lift .sk-card-product:hover {
	transform: translateY(-4px);
}

/* Media */
/* A theme that renders the loop thumbnail outside the standard hook leaves
 * this wrapper empty; reserving an aspect ratio for nothing would punch a
 * hole in the card. */
.sk-card-product__media:empty {
	display: none;
}

.sk-card-product__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--sk-radius);
	background: var(--sk-card-alt);
}

.sk-card-filled .sk-card-product__media,
.sk-card-bordered .sk-card-product__media,
.sk-card-elevated .sk-card-product__media {
	border-radius: 0;
}

.sk-archive-page ul.products li.product a img,
.sk-card-product__media img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	transition: transform 400ms var(--sk-ease), opacity var(--sk-duration) var(--sk-ease);
}

/* Fixed ratios */
/* The ratio is applied to the image rather than the wrapper. Absolutely
 * positioning the image resolves it against whichever ancestor the theme has
 * made position:relative — Blocksy's media anchor, for one — which collapses
 * that ancestor to zero height and hides the image entirely. */
.sk-ratio-square .sk-card-product__media img,
.sk-ratio-portrait .sk-card-product__media img,
.sk-ratio-landscape .sk-card-product__media img {
	width: 100%;
	height: auto;
	aspect-ratio: var(--sk-card-ratio, 1 / 1);
	object-fit: var(--sk-card-fit, cover);
}

.sk-card-product__media figure {
	margin: 0;
}

.sk-card-product__media > a,
.sk-card-product__media figure > a {
	display: block;
}

.sk-fit-contain .sk-card-product__media {
	background: var(--sk-card);
}

.sk-fit-contain .sk-card-product__media img {
	padding: var(--sk-space-3);
}

/* Hover behaviour */
.sk-hover-zoom .sk-card-product:hover .sk-card-product__img {
	transform: scale(1.05);
}

.sk-card-product__hover {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	object-fit: var(--sk-card-fit, cover);
	opacity: 0;
	transition: opacity 300ms var(--sk-ease);
}

.sk-hover-second_image .sk-card-product:hover .sk-card-product__hover {
	opacity: 1;
}

/* Badges */
.sk-card-product__badges {
	position: absolute;
	top: var(--sk-space-3);
	left: var(--sk-space-3);
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	pointer-events: none;
}

.sk-card-product .sk-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 9px;
	border-radius: var(--sk-radius-pill);
	background: var(--sk-primary);
	color: #ffffff;
	font-size: 11px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: 0.01em;
}

.sk-card-product .sk-badge--sale {
	background: var(--sk-danger);
}

.sk-card-product .sk-badge--out {
	background: var(--sk-muted);
}

.sk-archive-page span.onsale {
	display: none;
}

/* Body */
.sk-card-product__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	padding: var(--sk-space-4) 0 0;
}

.sk-card-filled .sk-card-product__body,
.sk-card-bordered .sk-card-product__body,
.sk-card-elevated .sk-card-product__body {
	padding: var(--sk-card-pad, 16px) var(--sk-card-pad, 16px) 0;
}

.sk-align-center .sk-card-product__body {
	align-items: center;
	text-align: center;
}

.sk-card-product__eyebrow {
	display: block;
	align-self: flex-start;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--sk-faint);
	font-size: var(--sk-fs-xs);
	font-weight: 600;
	letter-spacing: var(--sk-tracking-wide);
	line-height: 1.3;
	text-decoration: none;
	text-transform: uppercase;
}

.sk-card-product__eyebrow:hover {
	color: var(--sk-primary-soft);
}

/* Overlay positions sit on the image as a pill. */
.sk-card-product__eyebrow--over-left,
.sk-card-product__eyebrow--over-right {
	position: absolute;
	top: var(--sk-space-3);
	z-index: 4;
	padding: 5px 10px;
	border-radius: var(--sk-radius-pill);
	background: var(--sk-card);
	color: var(--sk-primary);
	box-shadow: var(--sk-shadow-sm);
}

.sk-card-product__eyebrow--over-left {
	left: var(--sk-space-3);
}

.sk-card-product__eyebrow--over-right {
	right: var(--sk-space-3);
}

/* The badge stack moves aside when a pill shares the top left corner. */
.sk-cat-over-left .sk-card-product__badges {
	top: calc(var(--sk-space-3) + 32px);
}

.sk-card-product__eyebrow--below-title {
	order: 2;
}

.sk-hide-theme-meta .sk-card-product .entry-meta,
.sk-hide-theme-meta .sk-card-product .ct-product-categories {
	display: none;
}

.sk-archive-page ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	margin: 0;
	padding: 0;
	overflow: hidden;
	color: var(--sk-primary);
	font-size: var(--sk-t-card_title);
	font-weight: var(--sk-fw-card_title);
	line-height: var(--sk-lh-card_title);
	-webkit-line-clamp: var(--sk-card-lines, 2);
	-webkit-box-orient: vertical;
}

.sk-archive-page ul.products li.product a {
	text-decoration: none;
}

.sk-archive-page ul.products li.product .price {
	margin: 0;
	color: var(--sk-primary);
	font-size: var(--sk-t-card_price);
	font-weight: var(--sk-fw-card_price);
	line-height: var(--sk-lh-card_price);
}

.sk-archive-page ul.products li.product .price del {
	margin-right: 6px;
	color: var(--sk-faint);
	font-size: var(--sk-fs-sm);
	font-weight: 500;
	opacity: 1;
}

.sk-archive-page ul.products li.product .price ins {
	background: transparent;
	text-decoration: none;
}

.sk-archive-page ul.products li.product .star-rating {
	margin: 0;
	font-size: 0.8em;
	color: var(--sk-warning);
}

.sk-align-center .star-rating {
	margin-inline: auto;
}

/* Swatch preview placement. The sizing lives in swatches.css, which loads
 * after this file and would otherwise win at equal specificity. */
.sk-swatches--preview {
	margin: 2px 0 0;
	padding: 0;
}

.sk-card-filled .sk-swatches--preview,
.sk-card-bordered .sk-swatches--preview,
.sk-card-elevated .sk-swatches--preview {
	padding-inline: var(--sk-card-pad, 16px);
}

.sk-align-center .sk-swatches--preview {
	justify-content: center;
}

/* Add to cart */
.sk-archive-page ul.products li.product .button,
.sk-archive-page ul.products li.product .added_to_cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	margin: var(--sk-space-3) 0 0;
	padding: 0 var(--sk-space-4);
	border: 1px solid var(--sk-primary);
	border-radius: var(--sk-radius-btn);
	background: var(--sk-primary);
	color: #ffffff;
	font-size: var(--sk-t-button);
	font-weight: var(--sk-fw-button);
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	transition: var(--sk-transition);
}

.sk-card-filled .sk-card-product .button,
.sk-card-bordered .sk-card-product .button,
.sk-card-elevated .sk-card-product .button {
	width: calc(100% - (var(--sk-card-pad, 16px) * 2));
	margin-inline: var(--sk-card-pad, 16px);
	margin-bottom: var(--sk-card-pad, 16px);
}

.sk-card-filled .sk-card-product__body .ct-woo-card-actions,
.sk-card-bordered .sk-card-product__body .ct-woo-card-actions,
.sk-card-elevated .sk-card-product__body .ct-woo-card-actions {
	padding-bottom: var(--sk-card-pad, 16px);
}

.sk-archive-page ul.products li.product .button:hover {
	background: #000000;
	border-color: #000000;
	color: #ffffff;
}

.sk-btn-outline .sk-card-product .button {
	background: transparent;
	color: var(--sk-primary);
}

.sk-btn-outline .sk-card-product .button:hover {
	background: var(--sk-primary);
	color: #ffffff;
}

.sk-btn-accent .sk-card-product .button {
	border-color: var(--sk-accent);
	background: var(--sk-accent);
	color: var(--sk-accent-contrast);
}

.sk-btn-accent .sk-card-product .button:hover {
	border-color: var(--sk-accent-hover);
	background: var(--sk-accent-hover);
}

/* Reveal on hover, pointer devices only. */
@media (hover: hover) and (min-width: 783px) {
	.sk-btn-reveal .sk-card-product .button,
	.sk-btn-reveal .sk-card-product .added_to_cart {
		opacity: 0;
		transform: translateY(4px);
		transition: opacity var(--sk-duration) var(--sk-ease), transform var(--sk-duration) var(--sk-ease), background var(--sk-duration) var(--sk-ease);
	}

	.sk-btn-reveal .sk-card-product:hover .button,
	.sk-btn-reveal .sk-card-product:focus-within .button,
	.sk-btn-reveal .sk-card-product:hover .added_to_cart,
	.sk-btn-reveal .sk-card-product:focus-within .added_to_cart {
		opacity: 1;
		transform: translateY(0);
	}
}

.sk-archive-page ul.products li.product .added_to_cart {
	background: var(--sk-success);
	border-color: var(--sk-success);
}

.sk-archive-page ul.products li.product .button.loading {
	opacity: 0.6;
}

/* -------------------------------------------------------------------------
 * Pagination
 * ---------------------------------------------------------------------- */

.sk-archive-page .woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--sk-space-2);
	margin: 0 0 var(--sk-space-12);
	padding: 0;
	border: 0;
	list-style: none;
}

.sk-archive-page .woocommerce-pagination ul li {
	margin: 0;
	border: 0;
	overflow: visible;
}

.sk-archive-page .woocommerce-pagination ul li a,
.sk-archive-page .woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 var(--sk-space-3);
	border: 1px solid var(--sk-border);
	border-radius: var(--sk-radius-btn);
	background: var(--sk-card);
	color: var(--sk-primary-soft);
	font-size: var(--sk-fs-sm);
	font-weight: 600;
	text-decoration: none;
	transition: var(--sk-transition);
}

.sk-archive-page .woocommerce-pagination ul li span.current {
	border-color: var(--sk-primary);
	background: var(--sk-primary);
	color: #ffffff;
}

.sk-archive-page .woocommerce-pagination ul li a:hover {
	border-color: var(--sk-primary-soft);
	background: var(--sk-card-alt);
}

/* -------------------------------------------------------------------------
 * Responsive columns
 * ---------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.sk-archive-page ul.products {
		grid-template-columns: repeat(var(--sk-cols-tablet, 3), minmax(0, 1fr));
		gap: var(--sk-space-5);
	}
}

@media (max-width: 640px) {
	.sk-archive-page ul.products {
		grid-template-columns: repeat(var(--sk-cols-mobile, 2), minmax(0, 1fr));
		gap: var(--sk-space-4);
	}

	.sk-shop-toolbar {
		gap: var(--sk-space-2);
	}

	.sk-archive-page .woocommerce-ordering {
		width: 100%;
	}

	.sk-archive-page .woocommerce-ordering select {
		width: 100%;
		background-position: right 14px center;
	}

	.sk-archive-page ul.products li.product .button {
		min-height: 38px;
		font-size: var(--sk-fs-xs);
	}
}

/* -------------------------------------------------------------------------
 * Theme rendered card parts
 *
 * Themes that build the whole card on one hook contribute their own meta list
 * and action row. These are moved into the card body by common.js; the rules
 * below stop them inheriting absolute positioning or list styling meant for a
 * different layout.
 * ---------------------------------------------------------------------- */

.sk-card-product__body .entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--sk-fs-xs);
}

.sk-card-product__body .entry-meta li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sk-card-product__body .entry-meta a {
	color: var(--sk-faint);
	font-weight: 600;
	letter-spacing: var(--sk-tracking-wide);
	text-decoration: none;
	text-transform: uppercase;
}

.sk-card-product__body .ct-woo-card-actions {
	position: static;
	display: flex;
	flex-direction: column;
	gap: var(--sk-space-2);
	width: 100%;
	margin-top: auto;
	padding-top: var(--sk-space-3);
	opacity: 1;
	transform: none;
	visibility: visible;
}

.sk-align-center .sk-card-product__body .entry-meta {
	justify-content: center;
}

@media (max-width: 782px) {
	.sk-archive-page ul.products,
	.sk-archive-page .sk-shop-toolbar,
	.sk-archive-page .woocommerce-products-header {
		padding-left: var(--sk-edge, 0px);
		padding-right: var(--sk-edge, 0px);
	}
}
