/*
 * NUÁURA — catalog: the one product card + shop filter rail.
 * Card styles are deliberately global so shop, category, search, related
 * products and homepage widgets all render identically.
 * Light-first. No prefers-color-scheme block — see note at end.
 */

:root {
	--nu-primary:      #141414;
	--nu-primary-dark: #000000;
	--nu-accent:       #cbcbcb;
	--nu-accent-deep:  #a9a9a9;
	--nu-ink:          #1a1a1a;
	--nu-ink-soft:     #55524e;
	--nu-ivory:        #f5f3ef;
	--nu-surface:      #ffffff;
	--nu-line:         #e4e1db;

	--nu-font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--nu-font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

	--nu-btn-h:  54px;
	--nu-btn-r:  2px;
	--nu-btn-fs: 13px;
	--nu-btn-fw: 500;
	--nu-btn-ls: 0.12em;
}

/* ===============================================================
   THE PRODUCT CARD — used everywhere
   =============================================================== */
/*
 * Card grid: 2 columns on phone, 3 on tablet, 4 on desktop.
 *
 * Three container shapes have to be supported, because XStore does not use
 * WooCommerce's <ul class="products"> consistently:
 *   1. ul.products                       — WooCommerce default + our related grid
 *   2. .products > .ajax-content         — XStore's loop-start.php on archives
 *   3. .products-loop (cards direct)     — XStore's product Elementor widgets
 * Case 3 is matched only when there is no .ajax-content child, otherwise the
 * shop archive would get a nested grid and collapse to a single column.
 */
:root { --nu-cols: 2; --nu-gap: 18px; }
@media (min-width: 700px)  { :root { --nu-cols: 3; --nu-gap: 22px; } }
@media (min-width: 1100px) { :root { --nu-cols: 4; --nu-gap: 24px; } }

ul.products,
.products .ajax-content,
.products-loop:not(:has(.ajax-content)) {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--nu-cols), minmax(0, 1fr));
	gap: var(--nu-gap);
	float: none;
}
.products .ajax-content::before,
.products .ajax-content::after,
.products-loop::before,
.products-loop::after { display: none !important; }

/* the theme's ajax spinner must not occupy a grid cell */
.products-loop > .et-loader { position: absolute; pointer-events: none; }
.products-loop { position: relative; }

/*
 * The theme adds float/width helpers to loop items — neutralise them.
 *
 * XStore's own column-count setting (row-count-2, row-count-4, ...) writes
 * a percentage width straight onto .product, sized for a FLOAT layout where
 * the percentage resolves against the whole row. Once the parent is CSS
 * Grid instead, that same percentage resolves against the grid TRACK —
 * e.g. width:50% of a 171px track is 85.5px, leaving the other half of the
 * cell empty. grid-template-columns above already controls sizing
 * completely, so this must be neutralised on every path a card can be a
 * direct child through: the shop archive nests one level deeper inside
 * .ajax-content, but Elementor's own product widgets (used on the
 * homepage) put the card directly under .products-loop with no
 * .ajax-content wrapper at all.
 */
ul.products > li,
ul.products > li.product,
.ajax-content > li,
.ajax-content > li.product,
.products-loop > li,
.products-loop > li.product,
.products-grid .product {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	clear: none !important;
	list-style: none;
}

li.np-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--nu-surface);
	border: 1px solid var(--nu-line);
	font-family: var(--nu-font-body);
	transition: border-color .25s ease, box-shadow .25s ease;
}
li.np-card:hover {
	border-color: var(--nu-accent-deep);
	box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

.np-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--nu-surface);
	aspect-ratio: 1 / 1;
}
.np-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 14px;
	display: block;
	transition: opacity .35s ease, transform .5s ease;
}
.np-card__img--hover { opacity: 0; }
li.np-card:hover .np-card__img--hover { opacity: 1; }
li.np-card:hover .np-card__img:not(.np-card__img--hover) { opacity: 0; }
li.np-card:hover .np-card__img { transform: scale(1.03); }

.np-card__badge {
	position: absolute;
	top: 10px; left: 10px;
	z-index: 2;
	padding: 4px 9px;
	border-radius: 2px;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	background: var(--nu-primary);
	color: #fff;
	-webkit-text-fill-color: #fff;
}
.np-card__badge--out { background: var(--nu-accent-deep); }

.np-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	padding: 16px 14px 18px;
	flex: 1 1 auto;
}

.np-card__title {
	margin: 0;
	font-family: var(--nu-font-head);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: .03em;
}
.np-card__title a {
	color: var(--nu-primary) !important;
	-webkit-text-fill-color: var(--nu-primary);
	text-decoration: none;
}
.np-card__title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.np-card__sub {
	margin: 0;
	font-size: 10.5px;
	font-weight: 400;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--nu-accent-deep) !important;
	-webkit-text-fill-color: var(--nu-accent-deep);
}

/* .star-rating draws grey stars via ::before and the gold fill via
 * span::before. Both pseudos are position:static in this theme, so the
 * "Rated 5.00 out of 5" text that follows them must be clipped
 * HORIZONTALLY (nowrap + overflow:hidden on a star-width box). Adding
 * padding-top would push the gold fill out of view along with the text. */
.np-card__rating { line-height: 1; }
.np-card__rating .star-rating {
	font-size: 12px;
	color: var(--nu-primary);
	margin: 0 auto;
	position: relative;
	height: 1em;
	line-height: 1;
	overflow: hidden;
	white-space: nowrap;
}
.np-card__rating .star-rating > span {
	position: absolute;
	top: 0;
	left: 0;
	height: 1em;
	line-height: 1;
	overflow: hidden;
	white-space: nowrap;
	padding-top: 0;
}
.np-card__rating .woocommerce-review-link { display: none; }

/* flex + wrap + gap instead of inline text flow: on a narrow card the MRP
 * and sale price cannot always sit on one line, and plain inline wrapping
 * (margin-right on del only) left uneven, cramped spacing when that
 * happened. This keeps both a consistent gap whichever way it wraps.
 * justify-content:center matters specifically when it DOES wrap to two
 * lines: without it, justify-content defaults to flex-start, so the
 * shorter line (usually the struck-through MRP) sits flush left while the
 * sale price sits centred as a block — the two lines read as misaligned
 * rather than as one centred unit. */
.np-card__price {
	display: flex;
	align-items: baseline;
	justify-content: center;
	flex-wrap: wrap;
	gap: 2px 8px;
	width: 100%;
	font-size: 16px;
	font-weight: 500;
	color: var(--nu-primary) !important;
	-webkit-text-fill-color: var(--nu-primary);
	margin-top: 2px;
}
.np-card__price .woocommerce-Price-amount { color: var(--nu-primary); -webkit-text-fill-color: var(--nu-primary); }
.np-card__price del,
.np-card__price del .woocommerce-Price-amount {
	color: var(--nu-accent-deep);
	-webkit-text-fill-color: var(--nu-accent-deep);
	font-size: 13.5px;
	font-weight: 400;
	margin: 0;
	opacity: 1;
}
.np-card__price ins { text-decoration: none; background: none; }

/* button — same geometry language as the rest of the site, smaller scale.
 * margin-top:auto pins it to the card bottom so buttons line up across a row
 * even when some products have no price to show. */
.np-card__action { width: 100%; margin-top: auto; padding-top: 12px; }
.np-card__action .button,
.np-card__action a.button,
.np-card__action .added_to_cart {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	height: 46px;
	padding: 0 14px;
	margin: 0;
	border: 1px solid var(--nu-primary) !important;
	border-radius: var(--nu-btn-r) !important;
	background: var(--nu-surface) !important;
	color: var(--nu-primary) !important;
	-webkit-text-fill-color: var(--nu-primary);
	font-family: var(--nu-font-body);
	font-size: 11.5px;
	font-weight: var(--nu-btn-fw);
	letter-spacing: var(--nu-btn-ls);
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	text-align: center;
	transition: background .22s ease, color .22s ease;
}
.np-card__action .button:hover,
.np-card__action a.button:hover {
	background: var(--nu-primary) !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff;
}
.np-card__action .button::before,
.np-card__action .button::after { display: none !important; }
.np-card__action .added_to_cart { margin-top: 8px; }
.np-card__action .button.loading { opacity: .6; }

/* ===============================================================
   SHOP LAYOUT
   =============================================================== */
.np-shop {
	max-width: 1300px;
	margin: 0 auto;
	padding: 0 20px 70px;
	font-family: var(--nu-font-body);
	color: var(--nu-ink);
	-webkit-text-fill-color: var(--nu-ink);
}

.np-crumbs {
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 22px 0 16px;
	color: var(--nu-ink-soft);
	-webkit-text-fill-color: var(--nu-ink-soft);
}
.np-crumbs a { color: var(--nu-ink-soft) !important; -webkit-text-fill-color: var(--nu-ink-soft); text-decoration: none; }
.np-crumbs a:hover { color: var(--nu-primary) !important; -webkit-text-fill-color: var(--nu-primary); }
.np-crumbs__sep { margin: 0 8px; color: var(--nu-accent-deep); -webkit-text-fill-color: var(--nu-accent-deep); }
.np-crumbs__current { color: var(--nu-primary); -webkit-text-fill-color: var(--nu-primary); }

.np-shop__head { text-align: center; padding: 6px 0 30px; }
.np-shop__title {
	font-family: var(--nu-font-head);
	font-size: clamp(30px, 4.4vw, 46px);
	font-weight: 600;
	line-height: 1.1;
	margin: 0 0 10px;
	color: var(--nu-primary);
	-webkit-text-fill-color: var(--nu-primary);
}
.np-shop__desc {
	max-width: 60ch;
	margin: 0 auto;
	font-size: 14.5px;
	line-height: 1.75;
	color: var(--nu-ink-soft);
	-webkit-text-fill-color: var(--nu-ink-soft);
}
.np-shop__desc p { color: var(--nu-ink-soft); -webkit-text-fill-color: var(--nu-ink-soft); }

.np-shop__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 26px;
	align-items: start;
}
@media (min-width: 992px) {
	.np-shop__layout { grid-template-columns: 262px minmax(0, 1fr); gap: 36px; }
}

/* ---- top bar ---- */
.np-shop__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding-bottom: 18px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--nu-line);
}
.np-shop__count {
	margin: 0;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--nu-ink-soft);
	-webkit-text-fill-color: var(--nu-ink-soft);
}
.np-shop__sort form { margin: 0; }
.np-shop__sort select,
.np-shop__sort .orderby {
	height: 44px;
	min-width: 190px;
	padding: 0 34px 0 14px;
	border: 1px solid var(--nu-line);
	border-radius: var(--nu-btn-r);
	background: var(--nu-surface);
	color: var(--nu-ink) !important;
	-webkit-text-fill-color: var(--nu-ink);
	font-family: var(--nu-font-body);
	font-size: 13px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px;
	cursor: pointer;
}
.np-shop__sort .woocommerce-ordering { margin: 0; }

/* ===============================================================
   FILTER RAIL
   =============================================================== */
.np-filters__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 18px;
	margin-bottom: 18px;
	border: 1px solid var(--nu-primary);
	border-radius: var(--nu-btn-r);
	background: var(--nu-surface);
	color: var(--nu-primary);
	-webkit-text-fill-color: var(--nu-primary);
	font-family: var(--nu-font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
}
@media (min-width: 992px) { .np-filters__toggle { display: none; } }

.np-filters {
	border: 1px solid var(--nu-line);
	background: var(--nu-surface);
	padding: 20px 18px;
}
@media (max-width: 991px) {
	.np-filters { display: none; }
	.np-filters.is-open { display: block; margin-bottom: 22px; }
}

.np-filters__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 14px;
	margin-bottom: 6px;
	border-bottom: 1px solid var(--nu-line);
}
.np-filters__title {
	margin: 0;
	font-family: var(--nu-font-head);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--nu-primary);
	-webkit-text-fill-color: var(--nu-primary);
}
.np-filters__reset {
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--nu-ink-soft) !important;
	-webkit-text-fill-color: var(--nu-ink-soft);
	text-decoration: underline;
}
.np-filters__reset:hover { color: var(--nu-primary) !important; -webkit-text-fill-color: var(--nu-primary); }

.np-fgroup { border-bottom: 1px solid var(--nu-line); }
.np-fgroup:last-of-type { border-bottom: 0; }
.np-fgroup__h {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--nu-primary);
	-webkit-text-fill-color: var(--nu-primary);
}
.np-fgroup__h::-webkit-details-marker { display: none; }
.np-fgroup__i { position: relative; width: 11px; height: 11px; flex: 0 0 11px; }
.np-fgroup__i::before,
.np-fgroup__i::after {
	content: "";
	position: absolute;
	background: var(--nu-primary);
	transition: transform .25s ease, opacity .25s ease;
}
.np-fgroup__i::before { left: 0; top: 5px; width: 11px; height: 1.4px; }
.np-fgroup__i::after  { left: 5px; top: 0; width: 1.4px; height: 11px; }
.np-fgroup[open] .np-fgroup__i::after { transform: rotate(90deg); opacity: 0; }
.np-fgroup__body { padding: 0 0 16px; }

.np-flist { list-style: none; margin: 0; padding: 0; max-height: 230px; overflow-y: auto; }
.np-flist li { list-style: none; }

.np-check {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 0;
	cursor: pointer;
	font-size: 13.5px;
	color: var(--nu-ink);
	-webkit-text-fill-color: var(--nu-ink);
}
.np-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.np-check__box {
	flex: 0 0 16px;
	width: 16px; height: 16px;
	border: 1px solid var(--nu-accent-deep);
	border-radius: 2px;
	position: relative;
	transition: background .2s ease, border-color .2s ease;
}
.np-check input:checked + .np-check__box { background: var(--nu-primary); border-color: var(--nu-primary); }
.np-check input:checked + .np-check__box::after {
	content: "";
	position: absolute;
	left: 5px; top: 1.5px;
	width: 4px; height: 9px;
	border-right: 1.6px solid #fff;
	border-bottom: 1.6px solid #fff;
	transform: rotate(45deg);
}
.np-check input:focus-visible + .np-check__box { box-shadow: 0 0 0 3px rgba(20,20,20,.15); }
.np-check__label { flex: 1 1 auto; }
.np-check__count {
	font-size: 11px;
	color: var(--nu-accent-deep);
	-webkit-text-fill-color: var(--nu-accent-deep);
}

/* price range */
.np-range { position: relative; height: 26px; margin: 6px 0 2px; }
.np-range__track {
	position: absolute;
	top: 12px; left: 0; right: 0;
	height: 2px;
	background: var(--nu-line);
	border-radius: 2px;
}
.np-range__fill {
	position: absolute;
	top: 0; bottom: 0;
	background: var(--nu-primary);
	border-radius: 2px;
}
.np-range__input {
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 26px;
	margin: 0;
	background: none;
	pointer-events: none;
	appearance: none;
	-webkit-appearance: none;
}
.np-range__input::-webkit-slider-thumb {
	pointer-events: auto;
	appearance: none;
	-webkit-appearance: none;
	width: 15px; height: 15px;
	border-radius: 50%;
	background: var(--nu-surface);
	border: 2px solid var(--nu-primary);
	cursor: pointer;
}
.np-range__input::-moz-range-thumb {
	pointer-events: auto;
	width: 15px; height: 15px;
	border-radius: 50%;
	background: var(--nu-surface);
	border: 2px solid var(--nu-primary);
	cursor: pointer;
}

.np-range__fields {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 10px;
}
.np-range__cur { font-size: 13px; color: var(--nu-ink-soft); -webkit-text-fill-color: var(--nu-ink-soft); }
.np-range__dash { color: var(--nu-accent-deep); -webkit-text-fill-color: var(--nu-accent-deep); }
.np-range__fields input {
	width: 100%;
	min-width: 0;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--nu-line);
	border-radius: var(--nu-btn-r);
	background: var(--nu-surface);
	color: var(--nu-ink);
	-webkit-text-fill-color: var(--nu-ink);
	font-family: var(--nu-font-body);
	font-size: 13px;
}
.np-range__fields input::placeholder { color: var(--nu-accent-deep); -webkit-text-fill-color: var(--nu-accent-deep); }

.np-filters__apply {
	width: 100%;
	min-height: 46px;
	margin-top: 16px;
	border: 1px solid var(--nu-primary);
	border-radius: var(--nu-btn-r);
	background: var(--nu-primary);
	color: #fff;
	-webkit-text-fill-color: #fff;
	font-family: var(--nu-font-body);
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .22s ease;
}
.np-filters__apply:hover { background: var(--nu-primary-dark); }

/* ===============================================================
   Empty state + pagination
   =============================================================== */
.np-empty { text-align: center; padding: 60px 20px 70px; }
.np-empty__title {
	font-family: var(--nu-font-head);
	font-size: clamp(24px, 3.4vw, 34px);
	margin: 0 0 10px;
	color: var(--nu-primary);
	-webkit-text-fill-color: var(--nu-primary);
}
.np-empty__text { font-size: 14.5px; color: var(--nu-ink-soft); -webkit-text-fill-color: var(--nu-ink-soft); margin: 0 0 22px; }
.np-empty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 28px;
	background: var(--nu-primary);
	color: #fff !important;
	-webkit-text-fill-color: #fff;
	border-radius: var(--nu-btn-r);
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none !important;
}
.np-empty__btn:hover { background: var(--nu-primary-dark); }

.np-shop .woocommerce-pagination { margin-top: 34px; text-align: center; }
.np-shop .woocommerce-pagination ul { display: inline-flex; gap: 6px; border: 0 !important; margin: 0; padding: 0; }
.np-shop .woocommerce-pagination li { border: 0 !important; margin: 0; }
.np-shop .woocommerce-pagination a,
.np-shop .woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px; height: 40px;
	padding: 0 10px;
	border: 1px solid var(--nu-line);
	border-radius: var(--nu-btn-r);
	font-size: 13px;
	color: var(--nu-ink) !important;
	-webkit-text-fill-color: var(--nu-ink);
	text-decoration: none;
	background: var(--nu-surface);
}
.np-shop .woocommerce-pagination .current {
	background: var(--nu-primary);
	border-color: var(--nu-primary);
	color: #fff !important;
	-webkit-text-fill-color: #fff;
}

body.np-filters-open { overflow: hidden; }
@media (max-width: 991px) { body.np-filters-open { overflow: auto; } }

/*
 * Deliberately NO @media (prefers-color-scheme: dark) block.
 * Card and filter text are pinned with both `color` and
 * `-webkit-text-fill-color`, so a device in dark mode cannot repaint
 * dark ink onto these white surfaces.
 */
