/* =============================================================================
   SHOP — product cards, [nova_products] slider/grid, [nova_shop] catalog
   Markup: inc/woocommerce/shop.php · Behaviour: assets/js/nova-shop.js,
   assets/js/nova-products-slider.js · Tokens: base.css
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Product card — shared by slider, featured grid and shop grid
   ----------------------------------------------------------------------------- */

.nova-products {
	display: flex;
	flex-direction: column;
	gap: var(--space-7);
	width: 100%;
}

.nova-products__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-5);
	width: 100%;
}

.nova-products__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card, 12px);
	background: var(--color-card);
	transition: box-shadow var(--transition), border-color var(--transition);
}

.nova-products__card:hover {
	border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
	box-shadow: var(--shadow-md);
}

.nova-products__img-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--color-surface-alt);
	line-height: 0;
}

/* Two classes: beats `.elementor img { height: auto }` when the grid sits in a widget. */
.nova-products__img-wrap .nova-products__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nova-products__img--placeholder {
	background: var(--color-surface-alt);
}

.nova-products__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--space-4);
	padding: var(--space-4) var(--space-4) var(--space-5);
}

.nova-products__text-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.nova-products__card .nova-products__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: var(--text-lg);
	font-weight: var(--weight-heading);
	line-height: 1.3;
	color: var(--color-heading);
	overflow-wrap: anywhere;
}

body .nova-products__title a {
	color: inherit;
	text-decoration: none;
}

body .nova-products__title a:hover {
	color: var(--color-primary);
}

.nova-products__price {
	font-family: var(--font-body);
	font-size: var(--text-base);
	font-weight: 600;
	color: var(--color-text);
}

.nova-products__price del {
	margin-right: var(--space-1);
	font-weight: 400;
	color: var(--color-muted);
}

.nova-products__price-suffix {
	font-weight: 400;
	color: var(--color-muted);
}

/* Card CTA — mirrors the kit button (link, so the kit's <button> rule doesn't reach it). */
body a.nova-products__btn,
body a.nova-products__view-all,
body a.nova-shop__cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	padding: 12px var(--space-5);
	border-radius: var(--radius-button, 6px);
	background: var(--color-primary);
	color: var(--color-on-dark);
	font-family: var(--font-body);
	font-size: var(--button-font-size);
	font-weight: var(--button-font-weight);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--transition);
}

body a.nova-products__btn:hover,
body a.nova-products__btn:focus-visible,
body a.nova-products__view-all:hover,
body a.nova-products__view-all:focus-visible,
body a.nova-shop__cta-btn:hover,
body a.nova-shop__cta-btn:focus-visible {
	background: var(--color-primary-hover);
	color: var(--color-on-dark);
}

.nova-products__btn {
	width: 100%;
}

.nova-products__actions {
	display: flex;
	justify-content: center;
}

.nova-products__empty {
	margin: 0;
	color: var(--color-muted);
	text-align: center;
}

/* Linked card (featured slider): whole card is the link, no button. */
body a.nova-products__card--link {
	color: inherit;
	text-decoration: none;
}

a.nova-products__card--link:hover .nova-products__title {
	color: var(--color-primary);
}

/* -----------------------------------------------------------------------------
   Slider — [nova_products slides="4"]
   ----------------------------------------------------------------------------- */

.nova-products--slider {
	--nova-products-visible: 4;
	--nova-products-gap: var(--space-5);
	gap: 0;
}

.nova-products__viewport {
	overflow: hidden;
	min-width: 0;
}

.nova-products__track {
	display: flex;
	gap: var(--nova-products-gap);
	transition: transform 0.5s ease;
	will-change: transform;
}

.nova-products__slide {
	flex: 0 0 calc((100% - var(--nova-products-gap) * (var(--nova-products-visible) - 1)) / var(--nova-products-visible));
	min-width: 0;
}

.nova-products__nav {
	display: flex;
	justify-content: center;
	gap: var(--space-4);
	margin-top: var(--space-6);
}

body button.nova-products__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--color-primary);
	box-shadow: none;
	cursor: pointer;
	transition: color var(--transition), opacity var(--transition);
}

body button.nova-products__arrow:hover:not(:disabled),
body button.nova-products__arrow:focus-visible:not(:disabled) {
	background: none;
	color: var(--color-primary-hover);
}

body button.nova-products__arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.nova-products__arrow svg {
	width: 100%;
	height: 100%;
}

.nova-products__arrow svg path {
	fill: var(--color-on-dark);
}

.nova-products__arrow--prev svg {
	transform: scaleX(-1);
}

/* Bar navigation: progress · status · Previous/Next (nav="text" progress="yes" status="yes") */
.nova-products__nav--bar {
	justify-content: space-between;
	align-items: center;
	gap: var(--space-5);
	margin-top: var(--space-5);
}

.nova-products__controls {
	display: flex;
	gap: var(--space-2);
}

.nova-products__progress {
	width: 200px;
	max-width: 30%;
	height: 2px;
	overflow: hidden;
	background: var(--color-border);
}

.nova-products__progress span {
	display: block;
	height: 100%;
	background: var(--color-primary);
	transition: transform 0.4s ease, width 0.4s ease;
}

.nova-products__status {
	font-size: var(--text-sm);
	color: var(--color-muted);
	font-variant-numeric: tabular-nums;
}

body button.nova-products__nav-btn {
	min-width: 72px;
	min-height: 44px;
	padding: var(--space-2) var(--space-4);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-button, 6px);
	color: var(--color-primary);
	font-size: var(--text-sm);
	cursor: pointer;
}

body button.nova-products__nav-btn:hover:not(:disabled) {
	background: var(--color-surface-alt);
	color: var(--color-primary);
}

body button.nova-products__nav-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

@media (prefers-reduced-motion: reduce) {
	.nova-products__track {
		transition: none;
	}
}

@media (max-width: 1100px) {
	.nova-products--slider {
		--nova-products-visible: 3;
	}
}

@media (max-width: 1024px) {
	.nova-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.nova-products--slider {
		--nova-products-visible: 2;
		--nova-products-gap: var(--space-4);
	}

	body button.nova-products__arrow {
		width: 44px;
		height: 44px;
	}
}

@media (max-width: 480px) {
	.nova-products--slider {
		--nova-products-visible: 1.25;
	}

	.nova-products__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* -----------------------------------------------------------------------------
   Loop Item product card (Loop Carousel) — built by the design importer:
   .peptide-card › .peptide-card__media (Image) + .peptide-card__info
   (Heading, Product Price .peptide-card__price, Button .peptide-card__button).
   Sizes, colors and type are Elementor settings; this is only what they can't set.
   ----------------------------------------------------------------------------- */

/* The linked image fills the media box (Elementor's link wrapper shrinks to the image). */
.peptide-card__media .elementor-widget-image a {
	display: block;
}

.peptide-card .elementor-heading-title a {
	color: inherit;
}

/* The widget's margin spaces the price, not the paragraph's. */
.peptide-card__price .price {
	margin: 0;
}

/* -----------------------------------------------------------------------------
   Catalog — [nova_shop]: toolbar, sidebar filters, results, pagination
   ----------------------------------------------------------------------------- */

.nova-shop-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--space-5);
	width: 100%;
}

/* The shop page's container centers its children, so the widget shrank to its content: a search
   without results narrowed the whole shop to the sidebar plus the "No products found" box. */
.elementor-widget:has(> .elementor-shortcode > .nova-shop-wrap),
.elementor-widget:has(> .elementor-widget-container > .elementor-shortcode > .nova-shop-wrap) {
	align-self: stretch;
	width: 100%;
}

.nova-shop {
	display: grid;
	grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
	gap: var(--space-5);
	align-items: start;
}

.nova-shop__main,
.nova-shop__results {
	min-width: 0;
}

.nova-shop__results {
	transition: opacity var(--transition);
}

.nova-shop__results.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.nova-products--shop {
	gap: var(--space-6);
}

.nova-products--shop .nova-products__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1360px) {
	.nova-products--shop .nova-products__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Toolbar */
.nova-shop__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.nova-shop__toolbar-left {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-width: 0;
}

.nova-shop__search {
	position: relative;
	width: min(320px, 100%);
	margin: 0;
}

.nova-shop__search-icon {
	position: absolute;
	top: 50%;
	left: 14px;
	display: flex;
	color: var(--color-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.nova-shop-wrap .nova-shop__search input[type="search"].nova-shop__search-input {
	width: 100%;
	height: 44px;
	padding: 0 var(--space-4) 0 42px;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-card);
	font-size: var(--text-sm);
	color: var(--color-text);
}

.nova-shop-wrap .nova-shop__search input[type="search"].nova-shop__search-input:focus {
	border-color: var(--color-primary);
	box-shadow: var(--focus-ring);
	outline: none;
}

.nova-shop__sort {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.nova-shop__sort-label {
	font-size: var(--text-sm);
	color: var(--color-muted);
	white-space: nowrap;
}

.nova-shop__sort-select-wrap {
	position: relative;
}

body select.nova-shop__sort-select {
	height: 44px;
	min-width: 170px;
	padding: 0 40px 0 var(--space-4);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-card);
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--color-heading);
	cursor: pointer;
	appearance: none;
}

.nova-shop__sort-chevron,
.nova-shop__filter-chevron {
	width: 8px;
	height: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	pointer-events: none;
}

.nova-shop__sort-chevron {
	position: absolute;
	top: 50%;
	right: 18px;
	color: var(--color-muted);
	transform: translateY(-70%) rotate(45deg);
}

.nova-shop__count {
	margin: 0;
	font-size: var(--text-sm);
	color: var(--color-muted);
}

.nova-shop__count strong {
	font-weight: 600;
	color: var(--color-heading);
}

/* Sidebar */
.nova-shop__sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--space-5);
}

.nova-shop__filters,
.nova-shop__cta {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card, 12px);
	background: var(--color-card);
}

.nova-shop__filters {
	overflow: hidden;
}

.nova-shop__filters .nova-shop__filters-title {
	margin: 0;
	padding: var(--space-4) var(--space-5);
	border-bottom: 1px solid var(--color-border);
	font-size: var(--text-base);
	line-height: 1.3;
}

.nova-shop__filter-group + .nova-shop__filter-group {
	border-top: 1px solid var(--color-border);
}

.nova-shop__filter-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-4) var(--space-5);
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--color-heading);
	list-style: none;
	cursor: pointer;
}

.nova-shop__filter-heading::-webkit-details-marker {
	display: none;
}

.nova-shop__filter-chevron {
	color: var(--color-muted);
	transform: rotate(225deg);
	transition: transform var(--transition);
}

.nova-shop__filter-group:not([open]) .nova-shop__filter-chevron {
	transform: rotate(45deg);
}

.nova-shop__filter-options {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: 0 var(--space-5) var(--space-4);
}

.nova-shop__filter-option {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
	color: var(--color-text);
	cursor: pointer;
}

.nova-shop__filters .nova-shop__filter-option input[type="checkbox"][data-filter-group] {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--color-border);
	border-radius: 4px;
	background: var(--color-card) center / 11px 9px no-repeat;
	cursor: pointer;
	appearance: none;
	transition: background-color var(--transition), border-color var(--transition);
}

.nova-shop__filters .nova-shop__filter-option input[type="checkbox"][data-filter-group]:checked {
	border-color: var(--color-primary);
	background-color: var(--color-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='white' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
}

.nova-shop__cta {
	padding: var(--space-5);
}

.nova-shop__cta .nova-shop__cta-title {
	margin: 0 0 var(--space-2);
	font-size: var(--text-h6);
}

.nova-shop__cta-text {
	margin: 0 0 var(--space-4);
	font-size: var(--text-sm);
	color: var(--color-muted);
}

.nova-shop__cta-btn {
	width: 100%;
}

/* Empty state */
.nova-shop__empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-4);
	min-height: 320px;
	padding: var(--space-7) var(--space-5);
	border: 1px dashed var(--color-border);
	border-radius: var(--radius-card, 12px);
}

/* Pagination — set apart from the last row of cards (it sat right under them). */
.nova-shop__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	margin-top: var(--space-7);
}

.nova-shop__page-list {
	display: flex;
	gap: var(--space-2);
}

body button.nova-shop__page {
	min-width: 40px;
	height: 40px;
	padding: 0 var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-button, 6px);
	background: var(--color-card);
	color: var(--color-heading);
	font-size: var(--text-sm);
	font-weight: 600;
	box-shadow: none;
	cursor: pointer;
}

body button.nova-shop__page:hover:not(:disabled) {
	border-color: var(--color-primary);
	background: var(--color-card);
	color: var(--color-primary);
}

body button.nova-shop__page.is-active,
body button.nova-shop__page.is-active:hover {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: var(--color-on-dark);
}

body button.nova-shop__page:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

@media (max-width: 1024px) {
	.nova-shop {
		grid-template-columns: minmax(0, 1fr);
	}

	.nova-products--shop .nova-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.nova-shop__pagination {
		margin-top: var(--space-6);
	}

	.nova-shop__toolbar,
	.nova-shop__toolbar-left {
		flex-direction: column;
		align-items: stretch;
	}

	.nova-shop__search {
		width: 100%;
	}

	body select.nova-shop__sort-select {
		width: 100%;
	}

	.nova-products--shop .nova-products__grid {
		gap: var(--space-3);
	}

	.nova-products--shop .nova-products__body {
		padding: var(--space-3);
	}
}
