/* =========================================================
   SHOP CABINETS & CATALOG UX
   Loads across WooCommerce product archives and single product pages.
   Pairs with modern.css tokens.
   ========================================================= */

/* ---------- 1. Shop Hero ---------- */
.shop-hero {
	background: var(--sand);
	border-bottom: 1px solid var(--line);
}
.shop-hero__grid {
	align-items: center;
	display: grid;
	gap: clamp(28px, 4vw, 64px);
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	padding-bottom: clamp(32px, 4vw, 56px);
	padding-top: clamp(32px, 4vw, 56px);
}
.shop-hero__content {
	align-self: center;
}
.shop-hero h1 {
	font-size: clamp(28px, 3.2vw, 44px);
	line-height: 1.1;
	margin: 0 0 14px;
}
.shop-hero__copy {
	color: var(--muted);
	font-size: 15.5px;
	line-height: 1.65;
	margin: 0;
	max-width: 480px;
}
.shop-hero__media {
	border-radius: 14px;
	overflow: hidden;
}
.shop-hero__image {
	aspect-ratio: 4 / 2.6;
	object-fit: cover;
	width: 100%;
}

/* ---------- 2. Collection navigation ---------- */
.shop-collections {
	padding-bottom: 50px;
	padding-top: 50px;
}
.shop-collections__grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.shop-collection-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.shop-collection-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-4px);
}
.shop-collection-card__media {
	background: var(--sand);
	display: block;
	overflow: hidden;
}
.shop-collection-card__image {
	aspect-ratio: 4 / 2.4;
	object-fit: cover;
	transition: transform 0.5s ease;
	width: 100%;
}
.shop-collection-card:hover .shop-collection-card__image {
	transform: scale(1.04);
}
.shop-collection-card__placeholder {
	aspect-ratio: 4 / 2.4;
	background: linear-gradient(135deg, var(--sand-deep), #d8d0bf);
	display: block;
}
.shop-collection-card__body {
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 20px 22px 24px;
}
.shop-collection-card__body h3 {
	font-size: 20px;
	margin: 0;
}
.shop-collection-card__body h3 a {
	color: var(--ink);
}
.shop-collection-card__body h3 a:hover {
	color: var(--clay);
}
.shop-collection-card__body p {
	color: var(--muted);
	font-size: 13.5px;
	line-height: 1.6;
	margin: 0;
}
.shop-collection-card__body .text-link {
	align-self: flex-start;
	font-size: 12px;
	letter-spacing: 0.06em;
	margin-top: 2px;
	text-transform: uppercase;
}

/* ---------- 3. Catalog section & toolbar ---------- */
.shop-catalog {
	background: var(--sand);
	padding-bottom: 76px;
	padding-top: 48px;
}
.shop-toolbar,
.collection-toolbar {
	align-items: center;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	margin-bottom: 16px;
	padding: 10px 16px;
}
.shop-toolbar__count {
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	margin: 0;
	text-transform: uppercase;
}
.shop-toolbar__sort,
.collection-toolbar .woocommerce-ordering {
	margin-left: auto;
}
.shop-toolbar__sort select,
.collection-toolbar .woocommerce-ordering select {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 6px;
	color: var(--ink);
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	padding: 7px 10px;
}
.button--small {
	padding: 8px 14px;
}

/* =========================================================
   HORIZONTAL CABINET TYPE QUICK NAV (ABOVE PRODUCT GRID)
   ========================================================= */
.rh-type-nav {
	margin-bottom: 14px;
	width: 100%;
}
.rh-type-nav__track {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.rh-type-nav__pill {
	align-items: center;
	background: #fff;
	border: 1px solid var(--line, #e8e4dc);
	border-radius: 999px;
	color: var(--ink, #1d1a16);
	display: inline-flex;
	font-size: 12.5px;
	font-weight: 600;
	padding: 6px 14px;
	text-decoration: none;
	transition: all 0.15s ease;
	user-select: none;
}
.rh-type-nav__pill:hover {
	border-color: var(--clay, #8b6f4e);
	color: var(--clay, #8b6f4e);
	transform: translateY(-1px);
}
.rh-type-nav__pill.is-active {
	background: var(--ink, #1d1a16);
	border-color: var(--ink, #1d1a16);
	color: #fff;
	font-weight: 700;
}

/* =========================================================
   CATALOG CONTAINER & LAYOUT (SHOWROOM PROPORTIONS)
   ========================================================= */
.collection-page.page-width,
.brand-archive.page-width,
.shop-catalog .page-width {
	max-width: 1480px;
	padding-left: clamp(20px, 2.5vw, 36px);
	padding-right: clamp(20px, 2.5vw, 36px);
	width: 100%;
}
.collection-page.section-space {
	padding-bottom: 64px;
}

.rh-catalog-layout {
	align-items: flex-start;
	display: grid;
	gap: 24px;
	grid-template-columns: 224px minmax(0, 1fr);
	margin-top: 14px;
	position: relative;
	width: 100%;
}
.rh-catalog-main {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

/* Natural-height Sticky Sidebar */
.rh-catalog-filter-sidebar {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px 14px;
	position: -webkit-sticky;
	position: sticky;
	top: 96px;
	width: 224px;
	z-index: 10;
}

.rh-filter-header {
	align-items: center;
	border-bottom: 1px solid var(--line);
	display: flex;
	justify-content: space-between;
	padding-bottom: 10px;
}
.rh-filter-header__title {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	margin: 0;
	text-transform: uppercase;
}
.rh-filter-header__clear {
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	text-decoration: underline;
	text-transform: uppercase;
}
.rh-filter-header__clear:hover {
	color: var(--clay);
}

.rh-filter-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rh-filter-group {
	border-bottom: 1px solid var(--line);
	padding-bottom: 12px;
}
.rh-filter-group:last-of-type {
	border-bottom: 0;
	padding-bottom: 0;
}
.rh-filter-group__heading {
	align-items: center;
	color: var(--ink);
	display: flex;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	margin-bottom: 8px;
	text-transform: uppercase;
}

.rh-filter-options--types {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.rh-filter-options--grid {
	display: grid;
	gap: 5px 6px;
	grid-template-columns: repeat(2, 1fr);
}

.rh-filter-checkbox {
	align-items: center;
	border-radius: 5px;
	cursor: pointer;
	display: flex;
	font-size: 12px;
	font-weight: 500;
	gap: 7px;
	padding: 4px 6px;
	position: relative;
	transition: background 0.15s ease;
	user-select: none;
}
.rh-filter-checkbox:hover {
	background: var(--sand, #f6f3ee);
}
.rh-filter-checkbox input {
	opacity: 0;
	position: absolute;
	z-index: -1;
}
.rh-filter-checkbox__box {
	background: #fff;
	border: 1.5px solid var(--line-dark, #c5bdb0);
	border-radius: 3px;
	display: inline-block;
	flex-shrink: 0;
	height: 14px;
	position: relative;
	transition: all 0.15s ease;
	width: 14px;
}
.rh-filter-checkbox input:checked + .rh-filter-checkbox__box,
.rh-filter-checkbox--active .rh-filter-checkbox__box {
	background: var(--ink, #1d1a16);
	border-color: var(--ink, #1d1a16);
}
.rh-filter-checkbox input:checked + .rh-filter-checkbox__box::after,
.rh-filter-checkbox--active .rh-filter-checkbox__box::after {
	border: solid #fff;
	border-width: 0 2px 2px 0;
	content: '';
	display: block;
	height: 6px;
	left: 4px;
	position: absolute;
	top: 1px;
	transform: rotate(45deg);
	width: 3.5px;
}
.rh-filter-checkbox__text {
	color: var(--ink);
	line-height: 1.2;
}
.rh-filter-checkbox input:checked ~ .rh-filter-checkbox__text,
.rh-filter-checkbox--active .rh-filter-checkbox__text {
	font-weight: 700;
}

.rh-filter-actions {
	display: none;
	margin-top: 6px;
}

/* Active Chips */
.rh-active-chips {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
	margin-bottom: 16px;
}
.rh-active-chips__label {
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.rh-active-chip {
	align-items: center;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	display: inline-flex;
	font-size: 11.5px;
	font-weight: 600;
	gap: 5px;
	padding: 3px 9px;
	text-decoration: none;
	transition: all 0.15s ease;
}
.rh-active-chip:hover {
	border-color: var(--clay);
	color: var(--clay);
}
.rh-active-chip__remove {
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
}
.rh-active-chips__clear {
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	margin-left: 4px;
	text-decoration: underline;
	text-transform: uppercase;
}
.rh-active-chips__clear:hover {
	color: var(--clay);
}

/* Mobile Filter Trigger */
.rh-mobile-filter-trigger {
	align-items: center;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 6px;
	color: var(--ink);
	cursor: pointer;
	display: none;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	gap: 6px;
	padding: 7px 12px;
	text-transform: uppercase;
}
.rh-mobile-filter-trigger:hover {
	border-color: var(--ink);
}
.rh-filter-count {
	background: var(--clay, #8b6f4e);
	border-radius: 999px;
	color: #fff;
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	min-width: 16px;
	padding: 1px 4px;
	text-align: center;
}

/* =========================================================
   REFINED COMPACT PRODUCT GRID & CARDS
   ========================================================= */
.rh-catalog-main .product-grid,
.shop-grid,
.product-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 12px;
	width: 100%;
}

.product-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	position: relative;
	transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.product-card:hover {
	border-color: #cdc3ae;
	box-shadow: 0 8px 20px rgba(34, 31, 28, 0.06);
	transform: translateY(-2px);
}

.product-card .product-image {
	aspect-ratio: 1 / 1;
	background: #fbfaf8;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
	width: 100%;
}
.product-card .product-image img {
	aspect-ratio: 1 / 1;
	height: 100%;
	object-fit: contain;
	padding: 8px;
	transition: transform 0.35s ease;
	width: 100%;
}
.product-card:hover .product-image img {
	transform: scale(1.04);
}

.product-card .product-details {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 12px 14px 14px;
}
.product-card .product-vendor {
	color: var(--muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 0 0 3px;
	text-transform: uppercase;
}
.product-card .product-details h3 {
	color: var(--ink);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-family: var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
	margin: 0 0 5px;
	min-height: 2.6em;
	overflow: hidden;
}
.product-card .product-details h3 a {
	color: var(--ink);
	text-decoration: none;
	transition: color 0.15s ease;
}
.product-card .product-details h3 a:hover {
	color: var(--clay);
}
.product-card .product-details .price {
	color: var(--clay, #8b6f4e);
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 8px;
}
.product-card .product-card__actions {
	align-items: center;
	display: flex;
	gap: 6px;
	margin-top: auto;
	padding-top: 4px;
}
.product-card .product-card__actions .button {
	align-items: center;
	background: var(--ink, #1d1a16);
	border: 0;
	border-radius: 5px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	height: 32px;
	justify-content: center;
	letter-spacing: 0.04em;
	line-height: 1;
	padding: 0 8px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background 0.15s ease;
	flex: 1 1 auto;
}
.product-card .product-card__actions .button:hover {
	background: var(--clay, #8b6f4e);
}
.product-card .product-card__actions .icon-action {
	align-items: center;
	background: var(--sand, #f6f3ee);
	border: 1px solid var(--line, #e8e4dc);
	border-radius: 5px;
	color: var(--ink, #1d1a16);
	display: inline-flex;
	font-size: 14px;
	font-weight: 700;
	height: 32px;
	justify-content: center;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	width: 32px;
	flex-shrink: 0;
}
.product-card .product-card__actions .icon-action:hover {
	background: var(--sand-deep, #ebe6dc);
	color: var(--clay, #8b6f4e);
}

/* =========================================================
   PRODUCT PAGE QUANTITY CONTROLS & ADD TO CART
   ========================================================= */
.product-template .cart {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 22px 0;
}
.product-template .single_add_to_cart_button {
	align-items: center;
	background: var(--ink, #1d1a16);
	border: 0;
	border-radius: 8px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	height: 48px;
	justify-content: center;
	letter-spacing: 0.06em;
	padding: 0 34px;
	text-transform: uppercase;
	transition: background 0.2s ease, transform 0.15s ease;
}
.product-template .single_add_to_cart_button:hover {
	background: var(--clay, #8b6f4e);
	color: #fff;
	transform: translateY(-1px);
}
.product-template .single_add_to_cart_button:active {
	transform: translateY(0);
}

/* Quantity Component */
.rh-quantity {
	align-items: center;
	background: #fff;
	border: 1.5px solid var(--line-dark, #d0c9bc);
	border-radius: 8px;
	display: inline-flex;
	height: 48px;
	overflow: hidden;
	position: relative;
	transition: border-color 0.15s ease;
	width: auto;
}
.rh-quantity:focus-within {
	border-color: var(--ink, #1d1a16);
}
.rh-qty-btn {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--ink, #1d1a16);
	cursor: pointer;
	display: inline-flex;
	height: 100%;
	justify-content: center;
	padding: 0 12px;
	transition: background 0.15s ease, color 0.15s ease;
	width: 40px;
}
.rh-qty-btn:hover {
	background: var(--sand, #f6f3ee);
	color: var(--clay, #8b6f4e);
}
.rh-qty-btn:active {
	background: var(--sand-deep, #ebe6dc);
}
.rh-qty-btn:disabled {
	cursor: not-allowed;
	opacity: 0.35;
}
.rh-qty-input {
	appearance: textfield;
	-moz-appearance: textfield;
	background: transparent;
	border: 0 !important;
	color: var(--ink, #1d1a16);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	height: 100%;
	margin: 0 !important;
	outline: 0 !important;
	padding: 0 !important;
	text-align: center;
	width: 44px;
}
.rh-qty-input::-webkit-outer-spin-button,
.rh-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ---------- 5. Pagination ---------- */
.shop-catalog .woocommerce-pagination,
.collection-page .woocommerce-pagination {
	margin-top: 32px;
}
.woocommerce-pagination ul {
	border: 0 !important;
	display: flex;
	gap: 8px;
	justify-content: center;
}
.woocommerce-pagination ul li {
	border: 0 !important;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--ink);
	font-weight: 700;
	min-width: 40px;
	padding: 9px 13px;
	text-align: center;
}
.woocommerce-pagination ul li span.current {
	background: var(--clay);
	border-color: var(--clay);
	color: #fff;
}
.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li a:focus-visible {
	background: var(--clay);
	border-color: var(--clay);
	color: #fff;
}

/* ---------- 6. Bottom CTAs ---------- */
.shop-ctas {
	padding-bottom: 80px;
	padding-top: 64px;
}
.shop-ctas__grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(2, 1fr);
}
.shop-cta-card {
	align-items: flex-start;
	background: var(--sand);
	border: 1px solid var(--line);
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 34px 36px;
}
.shop-cta-card h2 {
	font-size: clamp(21px, 2.2vw, 27px);
	margin: 0;
}
.shop-cta-card p {
	color: var(--muted);
	margin: 0 0 12px;
}
.shop-cta-card--accent {
	background: #1d1a16;
	border-color: #1d1a16;
}
.shop-cta-card--accent h2 {
	color: #fff;
}
.shop-cta-card--accent p {
	color: #c9c2b5;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px) {
	.rh-catalog-main .product-grid,
	.shop-grid,
	.product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.rh-catalog-layout {
		display: block;
	}
	.rh-mobile-filter-trigger {
		display: inline-flex;
	}
	.rh-catalog-filter-sidebar {
		background: #fff;
		border-radius: 0;
		bottom: 0;
		display: none;
		left: 0;
		max-height: none;
		overflow-y: auto;
		padding: 24px 20px;
		position: fixed;
		right: 0;
		top: 0;
		width: 100%;
		z-index: 9999;
	}
	.rh-catalog-filter-sidebar.rh-catalog-filter-sidebar--open {
		display: flex;
		flex-direction: column;
	}
	.rh-filter-actions {
		border-top: 1px solid var(--line);
		display: block;
		padding-top: 12px;
	}
	.rh-filter-actions .button {
		font-size: 14px;
		height: 44px;
		width: 100%;
	}
	.rh-catalog-main .product-grid,
	.shop-grid,
	.product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}
}

@media (max-width: 800px) {
	.collection-page.page-width,
	.brand-archive.page-width,
	.shop-catalog .page-width {
		padding-left: 16px;
		padding-right: 16px;
	}
	.rh-type-nav__pill {
		font-size: 11.5px;
		padding: 5px 11px;
	}
	.rh-catalog-main .product-grid,
	.shop-grid,
	.product-grid {
		gap: 10px;
		grid-template-columns: repeat(2, 1fr);
	}
	.product-card .product-details {
		padding: 10px 10px 12px;
	}
	.product-card .product-details h3 {
		font-size: 12px;
		min-height: 2.5em;
	}
	.product-card .product-details .price {
		font-size: 13px;
		margin-bottom: 6px;
	}
	.product-card .product-card__actions .button {
		font-size: 10px;
		height: 30px;
		padding: 0 6px;
	}
	.product-card .product-card__actions .icon-action {
		height: 30px;
		width: 30px;
	}
	.product-template .cart {
		align-items: stretch;
		flex-direction: column;
	}
	.product-template .rh-quantity {
		align-self: flex-start;
	}
	.product-template .single_add_to_cart_button {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.rh-catalog-main .product-grid,
	.shop-grid,
	.product-grid {
		gap: 8px;
		grid-template-columns: repeat(2, 1fr);
	}
}
