/* Luniva — product listings (shop, category, search). Builds on home.css (tokens, cards, grid) and stays scoped under .lnv. */

/* ---- Heading band ---- */

.lnv-shop__head {
	padding-block: clamp(18px, 2.4vw, 30px) clamp(26px, 3.6vw, 46px);
	border-bottom: 1px solid var(--lnv-line);
	background: var(--lnv-sand);
}

.lnv .lnv-shop__count {
	margin-top: 8px;
	color: var(--lnv-muted);
	font-size: 17px;
}

.lnv-shop__desc {
	max-width: 70ch;
	margin-top: 12px;
	color: var(--lnv-muted);
}

/* ---- Layout ---- */

.lnv .lnv-shop {
	display: grid;
	grid-template-columns: 264px minmax(0, 1fr);
	align-items: start;
	gap: clamp(24px, 4vw, 56px);
	padding-block: clamp(28px, 4vw, 52px) clamp(56px, 7vw, 96px);
}

/* ---- Sidebar: every category ---- */

.lnv-shop__side {
	position: sticky;
	top: 108px; /* Clears the sticky header. */
}

.lnv .lnv-shop__side-title {
	margin-bottom: 12px;
	font-family: var(--lnv-display);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--lnv-text);
}

.lnv .lnv-shop__cats li + li {
	margin-top: 4px;
}

.lnv .lnv-shop__cats a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px 10px;
	border-radius: 12px;
	color: var(--lnv-text);
	font-size: 16.5px;
	font-weight: 500;
	line-height: 1.35;
	transition: background-color .2s, color .2s;
}

.lnv:lang(ar) .lnv-shop__cats a {
	padding-block: 11px;
}

.lnv .lnv-shop__cats a:hover {
	background: var(--lnv-sand);
	color: var(--lnv-text);
}

.lnv .lnv-shop__cats a.is-current {
	background: var(--lnv-ink);
	color: #fff;
	font-weight: 600;
}

.lnv-shop__cat-count {
	min-width: 32px;
	padding: 3px 9px 1px;
	border-radius: 999px;
	background: var(--lnv-sand);
	color: var(--lnv-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
}

.lnv-shop__cats a.is-current .lnv-shop__cat-count {
	background: rgba(255, 255, 255, .16);
	color: #fff;
}

/* ---- Toolbar ---- */

.lnv-shop__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin-bottom: 24px;
}

.lnv .lnv-shop__showing {
	color: var(--lnv-muted);
	font-size: 15.5px;
}

.lnv .lnv-shop__sort {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.lnv .lnv-shop__sort select {
	width: auto;
	max-width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 18px;
	padding-inline-end: 42px;
	border: 1px solid var(--lnv-line);
	border-radius: 999px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%231c1b19' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px;
	box-shadow: none;
	color: var(--lnv-text);
	font-family: var(--lnv-body);
	font-size: 15.5px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

[dir="rtl"] .lnv .lnv-shop__sort select {
	background-position: left 16px center;
}

.lnv .lnv-shop__sort select:focus {
	border-color: var(--lnv-ink);
	outline: none;
}

/* ---- Notices ---- */

.lnv-shop__notices .woocommerce-notices-wrapper:empty {
	display: none;
}

.lnv .lnv-shop__notices .wc-block-components-notice-banner {
	margin: 0 0 18px;
	border-radius: 14px;
	font-size: 15.5px;
}

/* ---- Grid: three across beside the sidebar ---- */

@media (min-width: 641px) {
	.lnv .lnv-grid--shop {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---- Page links ---- */

.lnv-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: clamp(32px, 4vw, 52px);
}

.lnv .lnv-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	height: 46px;
	padding: 2px 12px 0;
	border: 1px solid var(--lnv-line);
	border-radius: 999px;
	background: #fff;
	color: var(--lnv-text);
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1;
	transition: border-color .2s, background-color .2s, color .2s;
}

.lnv .lnv-pager a.page-numbers:hover {
	border-color: var(--lnv-ink);
}

.lnv .lnv-pager .page-numbers.current {
	border-color: var(--lnv-ink);
	background: var(--lnv-ink);
	color: #fff;
}

.lnv .lnv-pager .page-numbers.dots {
	min-width: 24px;
	padding-inline: 0;
	border-color: transparent;
	background: none;
}

.lnv .lnv-pager[hidden],
.lnv .lnv-more[hidden] {
	display: none;
}

/* Shown under the grid while the next products load on scroll, and once there are no more. */
.lnv .lnv-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 56px;
	margin-top: clamp(28px, 4vw, 44px);
	color: var(--lnv-muted);
	font-size: 15.5px;
}

.lnv-more__spinner {
	width: 22px;
	height: 22px;
	border: 2px solid var(--lnv-line);
	border-top-color: var(--lnv-gold);
	border-radius: 50%;
	animation: lnv-spin .8s linear infinite;
}

@keyframes lnv-spin {
	to {
		transform: rotate(360deg);
	}
}

/* The arrow icon points forward by default; "previous" points back. */
.lnv .lnv-pager .prev .lnv-ico--arrow {
	transform: scaleX(-1);
}

[dir="rtl"] .lnv .lnv-pager .prev .lnv-ico--arrow {
	transform: none;
}

/* ---- Nothing to show ---- */

.lnv-shop__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: clamp(40px, 6vw, 80px) 20px;
	border: 1px solid var(--lnv-line);
	border-radius: var(--lnv-radius);
	background: #fff;
	text-align: center;
}

.lnv-shop__empty > .lnv-ico {
	width: 56px;
	height: 56px;
	color: var(--lnv-gold);
}

.lnv .lnv-shop__empty h2 {
	margin-top: 18px;
	font-family: var(--lnv-display);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 600;
	line-height: 1.2;
	color: var(--lnv-text);
}

.lnv .lnv-shop__empty p {
	margin-top: 8px;
	color: var(--lnv-muted);
}

.lnv .lnv-shop__empty .lnv-btn {
	width: auto;
	margin-top: 26px;
}

/* ---- Responsive: the sidebar becomes a row of chips ---- */

@media (max-width: 1000px) {
	.lnv .lnv-shop {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.lnv-shop__side {
		position: static;
		min-width: 0;
	}

	.lnv .lnv-shop__side-title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.lnv .lnv-shop__cats {
		display: flex;
		gap: 8px;
		margin-inline: -20px;
		padding: 2px 20px 6px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.lnv .lnv-shop__cats::-webkit-scrollbar {
		display: none;
	}

	.lnv .lnv-shop__cats li + li {
		margin-top: 0;
	}

	.lnv .lnv-shop__cats a {
		padding: 10px 16px 8px;
		border: 1px solid var(--lnv-line);
		border-radius: 999px;
		background: #fff;
		font-size: 15.5px;
		white-space: nowrap;
	}

	.lnv .lnv-shop__cats a.is-current {
		border-color: var(--lnv-ink);
		background: var(--lnv-ink);
	}

	.lnv-shop__cat-count {
		min-width: 0;
		padding: 0;
		background: none;
		font-size: 13.5px;
	}

	.lnv-shop__cats a.is-current .lnv-shop__cat-count {
		background: none;
		opacity: .8;
	}
}

@media (max-width: 640px) {
	.lnv-shop__bar {
		margin-bottom: 18px;
	}

	.lnv .lnv-shop__sort select {
		height: 42px;
		font-size: 14.5px;
	}
}
