/* ==========================================================================
   Halva Nazareth — catalog, product page, inquiry UI
   ========================================================================== */

.hn-main--shop {
	display: block;
}

/* --------------------------------------------------------------------------
   Product grid
   -------------------------------------------------------------------------- */

.hn-products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1rem, 2.6vw, 2.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.hn-products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

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

.hn-card {
	display: flex;
	flex-direction: column;
	background: transparent;
	margin: 0;
}

.hn-card__media {
	display: block;
	aspect-ratio: 4 / 5;
	background: var(--hn-cream-200);
	overflow: hidden;
}

.hn-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms var(--hn-ease);
}

.hn-card:hover .hn-card__media img {
	transform: scale(1.05);
}

.hn-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding-top: 0.95rem;
	margin-top: 0.85rem;
	border-top: 1px solid var(--hn-line-gold);
	flex: 1;
}

.hn-card__eyebrow {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	color: var(--hn-gold-600);
	text-transform: uppercase;
}

html[lang^="ar"] .hn-card__eyebrow,
html[lang^="he"] .hn-card__eyebrow {
	text-transform: none;
	letter-spacing: 0.02em;
	font-size: var(--hn-step--1);
}

.hn-card__title {
	margin: 0;
	font-size: var(--hn-step-1);
	font-weight: 600;
	line-height: 1.35;
}

.hn-card__title a {
	text-decoration: none;
}

.hn-card__title a:hover {
	color: var(--hn-gold-600);
}

.hn-card__meta {
	margin: 0;
	font-size: var(--hn-step--1);
	color: var(--hn-muted);
}

.hn-card__text {
	margin: 0.15rem 0 0;
	font-size: var(--hn-step--1);
	color: var(--hn-muted);
	line-height: 1.6;
}

.hn-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin-top: auto;
	padding-top: 0.9rem;
}

.hn-card__inquire {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 42px;
	padding: 0.4rem 0.4rem;
	font-size: var(--hn-step--1);
	text-decoration: none;
	color: var(--hn-muted);
	transition: color var(--hn-dur) var(--hn-ease);
}

.hn-card__inquire:hover {
	color: var(--hn-whatsapp);
}

.hn-card--compact .hn-card__media {
	aspect-ratio: 1;
}

/* Toolbar above archives */
.hn-shop-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--hn-line);
}

.hn-shop-toolbar__count {
	margin: 0;
	font-size: var(--hn-step--1);
	color: var(--hn-muted);
}

.hn-shop-toolbar form.woocommerce-ordering select,
.hn-shop-toolbar select {
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--hn-line);
	border-radius: var(--hn-radius-sm);
	background: #fff;
}

.hn-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.hn-filter-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0.35rem 0.95rem;
	border: 1px solid var(--hn-line);
	border-radius: 999px;
	font-size: var(--hn-step--1);
	text-decoration: none;
	color: var(--hn-muted);
	transition: border-color var(--hn-dur) var(--hn-ease), color var(--hn-dur) var(--hn-ease);
}

.hn-filter-chip:hover {
	border-color: var(--hn-gold-600);
	color: var(--hn-brown-900);
}

.hn-filter-chip.is-active {
	background: var(--hn-brown-900);
	border-color: var(--hn-brown-900);
	color: var(--hn-cream-100);
}

/* --------------------------------------------------------------------------
   Single product
   -------------------------------------------------------------------------- */

.hn-product {
	display: grid;
	gap: clamp(1.75rem, 4vw, 3.5rem);
	padding-block: clamp(1.75rem, 4vw, 3.5rem);
	align-items: start;
}

@media (min-width: 900px) {
	.hn-product {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	}

	.hn-product__summary {
		position: sticky;
		top: calc(var(--hn-header-h) + 24px);
	}
}

.hn-product__gallery .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.hn-product__gallery img {
	width: 100%;
	height: auto;
	border-radius: var(--hn-radius);
}

.hn-product__gallery .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.hn-product__gallery .flex-control-thumbs img {
	border-radius: var(--hn-radius-sm);
	cursor: pointer;
	opacity: 0.72;
	transition: opacity var(--hn-dur) var(--hn-ease);
}

.hn-product__gallery .flex-control-thumbs img.flex-active,
.hn-product__gallery .flex-control-thumbs img:hover {
	opacity: 1;
}

.hn-product__eyebrow {
	margin: 0 0 0.5rem;
	font-size: var(--hn-step--1);
	letter-spacing: 0.08em;
	color: var(--hn-gold-600);
}

.hn-product__title {
	margin: 0 0 0.75rem;
	font-size: var(--hn-step-3);
}

.hn-product__excerpt {
	color: var(--hn-muted);
	font-size: var(--hn-step-1);
	margin-bottom: 1.5rem;
}

.hn-product__excerpt p:last-child {
	margin-bottom: 0;
}

/* Inquiry options */
.hn-inquiry {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--hn-line-gold);
}

.hn-option {
	margin-bottom: 1.35rem;
}

.hn-option__legend {
	display: block;
	margin: 0 0 0.65rem;
	padding: 0;
	font-size: var(--hn-step-0);
	font-weight: 600;
}

.hn-option__hint {
	font-weight: 400;
	font-size: var(--hn-step--1);
	color: var(--hn-muted);
	margin-inline-start: 0.4rem;
}

.hn-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	border: 0;
	margin: 0;
	padding: 0;
}

.hn-chip {
	position: relative;
	display: inline-flex;
}

.hn-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.hn-chip span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	min-width: 46px;
	padding: 0.55rem 1.05rem;
	border: 1px solid rgba(38, 27, 22, 0.22);
	border-radius: var(--hn-radius-sm);
	background: #fff;
	font-size: var(--hn-step-0);
	line-height: 1.2;
	cursor: pointer;
	transition: border-color var(--hn-dur) var(--hn-ease),
		background-color var(--hn-dur) var(--hn-ease),
		color var(--hn-dur) var(--hn-ease);
}

.hn-chip span:hover {
	border-color: var(--hn-gold-600);
}

.hn-chip input:checked + span {
	background: var(--hn-brown-900);
	border-color: var(--hn-brown-900);
	color: var(--hn-cream-100);
}

.hn-chip input:focus-visible + span {
	outline: 2px solid var(--hn-gold-600);
	outline-offset: 3px;
}

.hn-inquiry__note {
	margin: 0 0 1rem;
	font-size: var(--hn-step-0);
	color: var(--hn-text);
	padding: 0.85rem 1rem;
	background: rgba(183, 137, 62, 0.1);
	border-inline-start: 3px solid var(--hn-gold-600);
	border-radius: var(--hn-radius-sm);
}

.hn-inquiry__error {
	margin: 0.75rem 0 0;
	font-size: var(--hn-step--1);
	color: var(--hn-burgundy);
	font-weight: 500;
}

.hn-inquiry__error[hidden] {
	display: none;
}

.hn-inquiry__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-top: 1.25rem;
}

.hn-inquiry__actions .hn-btn--whatsapp {
	flex: 1 1 240px;
}

.hn-product__meta {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--hn-line);
	font-size: var(--hn-step--1);
	color: var(--hn-muted);
	display: grid;
	gap: 0.4rem;
}

.hn-product__meta a {
	color: inherit;
}

/* Description block */
.hn-product-details {
	padding-block: clamp(2rem, 5vw, 4rem);
	border-top: 1px solid var(--hn-line);
}

.hn-product-details .hn-entry {
	margin-inline: 0;
}

.hn-attributes {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1.5rem;
	font-size: var(--hn-step-0);
}

.hn-attributes th,
.hn-attributes td {
	padding: 0.75rem 0.9rem;
	border-bottom: 1px solid var(--hn-line);
	text-align: start;
	vertical-align: top;
}

.hn-attributes th {
	width: 30%;
	font-weight: 600;
	color: var(--hn-muted);
}

/* Sticky mobile CTA */
.hn-sticky-cta {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 850;
	display: flex;
	gap: 0.6rem;
	align-items: center;
	padding: 0.7rem var(--hn-gutter) calc(0.7rem + env(safe-area-inset-bottom));
	background: rgba(251, 247, 240, 0.97);
	border-top: 1px solid var(--hn-line-gold);
	transform: translateY(110%);
	transition: transform var(--hn-dur) var(--hn-ease);
}

.hn-sticky-cta.is-visible {
	transform: translateY(0);
}

.hn-sticky-cta__label {
	flex: 1;
	min-width: 0;
	font-size: var(--hn-step--1);
	line-height: 1.35;
	color: var(--hn-muted);
}

.hn-sticky-cta__label strong {
	display: block;
	color: var(--hn-text);
	font-size: var(--hn-step-0);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hn-sticky-cta .hn-btn {
	flex: none;
}

@media (min-width: 900px) {
	.hn-sticky-cta {
		display: none;
	}
}

body.hn-has-sticky-cta {
	padding-bottom: 78px;
}

@media (min-width: 900px) {
	body.hn-has-sticky-cta {
		padding-bottom: 0;
	}
}

/* Related products */
.hn-related {
	padding-block: clamp(2rem, 5vw, 4rem);
	background: var(--hn-cream-200);
}

/* WooCommerce notices, kept on-brand */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 1rem 1.15rem;
	background: rgba(183, 137, 62, 0.1);
	border-inline-start: 3px solid var(--hn-gold-600);
	border-radius: var(--hn-radius-sm);
}

.woocommerce-notices-wrapper .woocommerce-error {
	background: rgba(101, 30, 34, 0.09);
	border-inline-start-color: var(--hn-burgundy);
}

/* Catalog mode belt-and-braces: nothing price-shaped can render */
.hn-catalog-mode .price,
.hn-catalog-mode .woocommerce-Price-amount,
.hn-catalog-mode .add_to_cart_button,
.hn-catalog-mode .single_add_to_cart_button,
.hn-catalog-mode .added_to_cart,
.hn-catalog-mode .cart,
.hn-catalog-mode .quantity,
.hn-catalog-mode .woocommerce-mini-cart,
.hn-catalog-mode .widget_shopping_cart,
.hn-catalog-mode .onsale {
	display: none !important;
}

/* --------------------------------------------------------------------------
   Archive extras
   -------------------------------------------------------------------------- */

.hn-archive__image {
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hn-archive__arch {
	display: block;
	aspect-ratio: 21 / 9;
}

.hn-archive__arch img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hn-filter-group {
	margin-bottom: 1.25rem;
}

.hn-filter-group__label {
	margin: 0 0 0.5rem;
	font-size: var(--hn-step--1);
	font-weight: 600;
	color: var(--hn-muted);
}

.hn-single-product {
	display: block;
}

.hn-product__commerce .price {
	font-size: var(--hn-step-2);
	color: var(--hn-brown-900);
	margin-bottom: 1rem;
	display: block;
}

.hn-product__commerce .quantity input {
	min-height: 48px;
	padding: 0.5rem;
	border: 1px solid rgba(38, 27, 22, 0.2);
	border-radius: var(--hn-radius-sm);
	width: 5.5rem;
}

.hn-product__commerce .single_add_to_cart_button {
	min-height: 48px;
	padding: 0.75rem 1.65rem;
	border: 1px solid var(--hn-brown-900);
	background: var(--hn-brown-900);
	color: var(--hn-cream-100);
	border-radius: var(--hn-radius-sm);
	cursor: pointer;
	font-weight: 500;
}

/* Related products heading */
.related.products > h2,
.up-sells > h2 {
	font-size: var(--hn-step-2);
	text-align: center;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.related.products,
.up-sells {
	padding-block: clamp(2rem, 5vw, 4rem);
	background: var(--hn-cream-200);
	margin-top: clamp(2rem, 5vw, 4rem);
}

.related.products > *,
.up-sells > * {
	max-width: var(--hn-container);
	margin-inline: auto;
	padding-inline: var(--hn-gutter);
}
