/**
 * WooCommerce styling for House of Maple & Lily Lifestyle.
 * Author: Md Sabuz Mia.
 */

/* Product grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	gap: 28px;
	margin: 0 0 40px;
	padding: 0;
	list-style: none;
}
/* WooCommerce adds ::before/::after clearfix pseudo-elements to ul.products.
   In a CSS grid those become grid items and leave an empty first cell — remove them. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
	content: none !important;
	display: none !important;
}
.woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
.woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
.woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }

.woocommerce ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	background: #fff;
	border: 1px solid var(--hml-border);
	border-radius: var(--hml-radius);
	overflow: hidden;
	text-align: left;
	transition: transform var(--hml-transition), box-shadow var(--hml-transition);
	display: flex;
	flex-direction: column;
}
.woocommerce ul.products li.product:hover {
	transform: translateY(-6px);
	box-shadow: var(--hml-shadow-lg);
}
.woocommerce ul.products li.product a img {
	margin: 0;
	border-radius: 0;
	width: 100%;
	aspect-ratio: 4/5;
	object-fit: cover;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--hml-font-head);
	font-size: 1.1rem !important;
	padding: 16px 18px 4px !important;
	color: var(--hml-ink);
}
.woocommerce ul.products li.product .price {
	color: var(--hml-primary) !important;
	font-weight: 700;
	font-size: 1.05rem;
	padding: 0 18px;
	display: block;
}
.woocommerce ul.products li.product .price del { color: var(--hml-muted); font-weight: 400; }
.woocommerce ul.products li.product .star-rating { margin: 6px 18px; color: var(--hml-accent); }
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
	margin: 14px 18px 18px;
	border-radius: 999px;
	background: var(--hml-primary);
	color: #fff;
}
.woocommerce ul.products li.product .button:hover { background: var(--hml-primary-dark); }

/* Hide WooCommerce's default "View cart" link under the product card —
   the add-to-cart popup already provides View Cart / Checkout / Continue Shopping. */
.woocommerce ul.products li.product a.added_to_cart {
	display: none !important;
}

/* =========================================================
   Product card — media hover + reveal action row
   ========================================================= */
.woocommerce ul.products li.product .hml-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.hml-card__media {
	position: relative;
	overflow: hidden;
}
.hml-card__media .hml-card__link { display: block; }
.hml-card__media img { transition: transform 0.55s ease; }
.woocommerce ul.products li.product:hover .hml-card__media img { transform: scale(1.06); }

.hml-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 16px 18px 18px;
}
.hml-card__title-link { text-decoration: none; }
.woocommerce ul.products li.product .hml-card__body .woocommerce-loop-product__title {
	padding: 0 0 6px !important;
	margin: 0;
}
.woocommerce ul.products li.product .hml-card__body .price { padding: 0 !important; margin: 0; }
.woocommerce ul.products li.product .hml-card__body .star-rating { margin: 0 0 6px !important; }

/* Reveal-on-hover action row */
.hml-card__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transform: translateY(6px);
	transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease, margin-top 0.22s ease;
}
.woocommerce ul.products li.product:hover .hml-card__actions,
.woocommerce ul.products li.product:focus-within .hml-card__actions {
	max-height: 60px;
	opacity: 1;
	transform: none;
	margin-top: 10px;
}

/* Make Add-to-cart / Select options look like a compact text link in the row */
.woocommerce ul.products li.product .hml-card__actions .button,
.woocommerce ul.products li.product .hml-card__actions .added_to_cart {
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	color: var(--hml-ink) !important;
	border: none !important;
	border-radius: 0 !important;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	width: auto;
	min-width: 0;
}
.woocommerce ul.products li.product .hml-card__actions .button:hover { color: var(--hml-accent) !important; }

.hml-qv-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--hml-ink);
}
.hml-qv-btn:hover { color: var(--hml-accent); }

/* Wishlist heart (in the action row) */
.hml-card__actions .hml-wish {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--hml-muted);
	display: inline-flex;
	align-items: center;
	line-height: 0;
	margin-left: auto;
}
.hml-card__actions .hml-wish svg { fill: none; stroke: currentColor; stroke-width: 2; }
.hml-card__actions .hml-wish:hover { color: var(--hml-accent); }
.hml-card__actions .hml-wish.is-active { color: var(--hml-accent); }
.hml-card__actions .hml-wish.is-active svg { fill: currentColor; }
.hml-card__actions .hml-wish .hml-wish__label {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
/* The floating heart on the image is redundant with the row heart — hide it. */
.hml-wish--media { display: none; }

/* Touch / small screens: no hover, so always show the action row */
@media (max-width: 768px) {
	.woocommerce ul.products li.product .hml-card__actions {
		max-height: 60px; opacity: 1; transform: none; margin-top: 10px;
	}
}

/* Single product wishlist button */
.hml-wish--single {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	padding: 6px 4px;
	margin-left: 6px;
	cursor: pointer;
	font-weight: 600;
	color: var(--hml-ink);
}
.hml-wish--single svg { fill: none; stroke: currentColor; stroke-width: 2; }
.hml-wish--single:hover,
.hml-wish--single.is-active { color: var(--hml-accent); }
.hml-wish--single.is-active svg { fill: currentColor; }

/* The bag+list wishlist icon is line art, so the "saved" state should recolor it
   (accent) rather than flood-fill it solid like the old single-path heart. */
.hml-card__actions .hml-wish.is-active .hml-wish-ico path,
.hml-wish--single.is-active .hml-wish-ico path { fill: none; }

/* Wishlist toast */
.hml-wish-toast {
	position: absolute;
	transform: translateX(-50%) translateY(4px);
	background: var(--hml-ink);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 6px;
	white-space: nowrap;
	z-index: 10001;
	opacity: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}
.hml-wish-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   Quick View modal
   ========================================================= */
.hml-qv-modal[hidden] { display: none; }
.hml-qv-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
body.hml-qv-open { overflow: hidden; }
.hml-qv__overlay {
	position: absolute;
	inset: 0;
	background: rgba(28, 20, 16, 0.55);
}
.hml-qv__dialog {
	position: relative;
	background: #fff;
	border-radius: var(--hml-radius);
	width: 100%;
	max-width: 880px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: var(--hml-shadow-lg);
	animation: hml-qv-in 0.22s ease;
}
@keyframes hml-qv-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hml-qv__close {
	position: absolute;
	top: 10px; right: 12px;
	z-index: 2;
	width: 36px; height: 36px;
	border-radius: 50%;
	border: none;
	background: var(--hml-cream);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: var(--hml-ink);
}
.hml-qv__close:hover { background: var(--hml-accent); color: #fff; }
.hml-qv__loading { padding: 60px 24px; text-align: center; color: var(--hml-muted); }
.hml-qv__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px; }
.hml-qv__img { width: 100%; border-radius: var(--hml-radius-sm); display: block; }
.hml-qv__title { margin: 0 0 10px; }
.hml-qv__price { font-size: 1.3rem; font-weight: 700; color: var(--hml-primary); margin-bottom: 10px; }
.hml-qv__price del { color: var(--hml-muted); font-weight: 400; margin-right: 8px; }
.hml-qv__desc { color: var(--hml-muted); margin-bottom: 18px; }
.hml-qv__more { display: inline-block; margin-top: 14px; font-weight: 600; }
@media (max-width: 640px) {
	.hml-qv__grid { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
	.hml-qv__dialog { max-height: 92vh; }
}

/* =========================================================
   Wishlist page
   ========================================================= */
.hml-wishlist-empty {
	text-align: center;
	color: var(--hml-muted);
	padding: 40px 0;
	font-size: 1.05rem;
}
.hml-wishlist-empty a { font-weight: 600; }

/* =========================================================
   Daily Deals
   ========================================================= */
.hml-deals { padding-block: clamp(28px, 5vw, 56px); }
.hml-deals .hml-container {
	background: linear-gradient(135deg, var(--hml-primary), var(--hml-accent));
	border-radius: 20px;
	padding: clamp(20px, 3vw, 36px);
	color: #fff;
}
.hml-deals__head {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	margin-bottom: 22px;
}
.hml-deals__title { margin: 0; color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); }
.hml-deals__more { margin-left: auto; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hml-deals__more:hover { text-decoration: underline; }

/* Countdown */
.hml-deals__timer { display: flex; align-items: center; gap: 10px; color: #fff; }
.hml-deals__ends { text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; opacity: 0.9; font-weight: 700; }
.hml-deals__clock { display: flex; align-items: center; gap: 5px; font-weight: 800; }
.hml-deals__clock b {
	background: rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	padding: 6px 9px;
	min-width: 40px;
	text-align: center;
	font-size: 1.05rem;
}
.hml-deals__clock i { font-style: normal; opacity: 0.8; }
.hml-deals__clock:not(.has-days) [data-d],
.hml-deals__clock:not(.has-days) [data-di] { display: none; }
.hml-deals__ended { font-weight: 700; color: #fff; }

/* Carousel */
.hml-deals__carousel { position: relative; }
.hml-deals__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 2px;
}
.hml-deals__track::-webkit-scrollbar { display: none; }

.hml-deal {
	scroll-snap-align: start;
	flex: 0 0 auto;
	width: 200px;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	color: var(--hml-ink);
}
.hml-deal__media { position: relative; }
.hml-deal__imglink { display: block; }
.hml-deal__media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.hml-deal__save {
	position: absolute;
	top: 8px; left: 8px;
	z-index: 2;
	background: #e0322a;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 6px;
	line-height: 1.2;
}
.hml-deal__save .amount { color: #fff; }
.hml-deal__body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.hml-deal__price { font-weight: 800; color: var(--hml-primary); }
.hml-deal__price del { color: var(--hml-muted); font-weight: 400; margin-left: 6px; font-size: 0.9em; }
.hml-deal__price ins { text-decoration: none; }
.hml-deal__title {
	color: var(--hml-ink);
	text-decoration: none;
	font-size: 0.85rem;
	line-height: 1.3;
	min-height: 2.3em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.hml-deal__title:hover { color: var(--hml-accent); }
.hml-deal__bar { height: 5px; border-radius: 999px; background: #ece3d7; overflow: hidden; margin-top: 4px; }
.hml-deal__bar span { display: block; height: 100%; background: var(--hml-accent); }
.hml-deal__stock { font-size: 0.74rem; color: var(--hml-muted); }

.hml-deals__nav {
	position: absolute;
	top: 38%;
	transform: translateY(-50%);
	width: 38px; height: 38px;
	border-radius: 50%;
	border: none;
	background: #fff;
	color: var(--hml-ink);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	z-index: 3;
}
.hml-deals__nav--prev { left: -10px; }
.hml-deals__nav--next { right: -10px; }
.hml-deals__nav:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 600px) {
	.hml-deal { width: 60vw; }
	.hml-deals__more { margin-left: 0; }
}

/* Sale badge */
.woocommerce span.onsale {
	background: var(--hml-accent);
	border-radius: 999px;
	min-height: auto;
	min-width: auto;
	line-height: 1;
	padding: 6px 12px;
	font-weight: 700;
	top: 12px;
	left: 12px;
	margin: 0;
}

/* Quick Buy ("Buy Now") button */
.woocommerce a.button.hml-buy-now,
.woocommerce button.button.hml-buy-now,
.hml-buy-now {
	background: var(--hml-ink);
	color: #fff;
	border: 1px solid var(--hml-ink);
}
.woocommerce a.button.hml-buy-now:hover,
.woocommerce button.button.hml-buy-now:hover,
.hml-buy-now:hover {
	background: var(--hml-accent);
	border-color: var(--hml-accent);
	color: #fff;
}
/* On single product: sit beside Add to Cart with a small gap */
.woocommerce div.product form.cart .hml-buy-now--single {
	margin-left: 10px;
}
@media (max-width: 480px) {
	.woocommerce div.product form.cart .hml-buy-now--single {
		margin-left: 0;
		margin-top: 10px;
		display: block;
		width: 100%;
	}
}

/* Custom product badges */
.woocommerce ul.products li.product,
.woocommerce div.product {
	position: relative;
}
.hml-badge.hml-product-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	right: auto;
	z-index: 5;
	display: inline-block;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
	background: var(--hml-accent);
	box-shadow: 0 6px 16px -8px rgba(28, 20, 16, 0.5);
}
/* If the product is also on sale, stack the custom badge below the sale flash */
.woocommerce span.onsale ~ .hml-badge.hml-product-badge { top: 46px; }

.hml-badge--accent { background: var(--hml-accent); }
.hml-badge--green  { background: var(--hml-green); }
.hml-badge--ink    { background: var(--hml-ink); }

/* On single product, sit above the gallery */
.woocommerce div.product .hml-badge.hml-product-badge {
	top: 16px;
	left: 16px;
}

/* Tidy the admin badge field group spacing */
.hml-badge-fields .form-field { margin-bottom: 6px; }

/* =========================================================
   Coming Soon: badge + Notify-me button & modal
   ========================================================= */
.hml-coming-badge { background: var(--hml-ink); }

/* "Notify me" link inside the product card action row (matches add-to-cart link) */
.hml-card__actions .hml-notify-btn {
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	font-weight: 600;
	color: var(--hml-primary);
	cursor: pointer;
}
.hml-card__actions .hml-notify-btn:hover { color: var(--hml-accent); }

/* Single product page button */
.hml-notify-btn--single { display: inline-block; margin: 6px 0 4px; }

/* Notify modal */
.hml-notify-modal[hidden] { display: none; }
.hml-notify-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.hml-notify__overlay { position: absolute; inset: 0; background: rgba(28, 20, 16, 0.55); }
.hml-notify__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: var(--hml-radius);
	padding: 30px 26px 26px;
	box-shadow: var(--hml-shadow-lg);
	text-align: center;
}
.hml-notify__close {
	position: absolute;
	top: 8px;
	right: 12px;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: var(--hml-muted);
	cursor: pointer;
}
.hml-notify__title { margin: 0 0 8px; }
.hml-notify__text { margin: 0 0 18px; color: var(--hml-muted); font-size: 0.95rem; }
.hml-notify__form { display: flex; gap: 8px; flex-wrap: wrap; }
.hml-notify__email {
	flex: 1 1 200px;
	padding: 12px 16px;
	border: 1px solid var(--hml-border);
	border-radius: 999px;
	font: inherit;
}
.hml-notify__email:focus { outline: none; border-color: var(--hml-accent); }
.hml-notify__msg { margin: 14px 0 0; font-weight: 600; min-height: 1.2em; }
.hml-notify__msg.is-ok { color: var(--hml-green); }
.hml-notify__msg.is-err { color: #c0392b; }

/* =========================================================
   Call for price / Call for volume
   ========================================================= */
.hml-call-price { font-weight: 700; color: var(--hml-primary); }

/* In the card action row — match the compact add-to-cart link style */
.hml-card__actions .hml-call-btn {
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	color: var(--hml-primary);
	text-decoration: none;
}
.hml-card__actions .hml-call-btn:hover { color: var(--hml-accent); }

/* Single product buttons */
.hml-call-btn--single { display: inline-block; margin: 6px 8px 4px 0; }
.hml-call-btn--volume {
	background: transparent;
	color: var(--hml-primary);
	border: 1px solid var(--hml-border);
}
.hml-call-btn--volume:hover {
	background: transparent;
	border-color: var(--hml-accent);
	color: var(--hml-accent);
}

/* Enquiry modal (Call for price / volume) */
.hml-enq-modal[hidden] { display: none; }
.hml-enq-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.hml-enq__overlay { position: absolute; inset: 0; background: rgba(28, 20, 16, 0.55); }
.hml-enq__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	background: #fff;
	border-radius: var(--hml-radius);
	padding: 30px 26px 26px;
	box-shadow: var(--hml-shadow-lg);
	text-align: center;
}
.hml-enq__close {
	position: absolute;
	top: 8px;
	right: 12px;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: var(--hml-muted);
	cursor: pointer;
}
.hml-enq__title { margin: 0 0 8px; }
.hml-enq__text { margin: 0 0 16px; color: var(--hml-muted); font-size: 0.95rem; }
.hml-enq__form { display: flex; flex-direction: column; gap: 10px; }
.hml-enq__email,
.hml-enq__message {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--hml-border);
	border-radius: 12px;
	font: inherit;
}
.hml-enq__email { border-radius: 999px; }
.hml-enq__message { resize: vertical; }
.hml-enq__email:focus,
.hml-enq__message:focus { outline: none; border-color: var(--hml-accent); }
.hml-enq__call { margin: 14px 0 0; font-size: 0.9rem; color: var(--hml-muted); }
.hml-enq__msg { margin: 12px 0 0; font-weight: 600; min-height: 1.2em; }
.hml-enq__msg.is-ok { color: var(--hml-green); }
.hml-enq__msg.is-err { color: #c0392b; }

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	border-radius: 999px;
	background: var(--hml-primary);
	color: #fff;
	font-weight: 600;
	padding: 0.85em 1.8em;
	transition: background var(--hml-transition), transform var(--hml-transition);
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background: var(--hml-primary-dark);
	transform: translateY(-2px);
}

/* Single product */
.woocommerce div.product .product_title {
	font-family: var(--hml-font-head);
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--hml-primary);
	font-weight: 700;
}
.woocommerce div.product form.cart .button { padding: 1em 2.4em; }
.woocommerce .woocommerce-tabs ul.tabs li.active {
	border-bottom-color: transparent;
}
.woocommerce .woocommerce-tabs ul.tabs li.active a { color: var(--hml-accent); }

/* Result count / ordering */
.woocommerce .woocommerce-result-count { color: var(--hml-muted); }
.woocommerce .woocommerce-ordering select {
	width: auto;
	padding: 0.6em 2.4em 0.6em 1em;
}

/* Messages / notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--hml-accent);
	border-radius: var(--hml-radius-sm);
}
.woocommerce-message::before,
.woocommerce-info::before { color: var(--hml-accent); }

/* Cart & checkout tables */
.woocommerce table.shop_table {
	border-radius: var(--hml-radius);
	border-color: var(--hml-border);
}
.woocommerce-cart table.cart img { border-radius: var(--hml-radius-sm); }

/* Pagination */
.woocommerce nav.woocommerce-pagination ul {
	border: none;
	display: flex;
	gap: 8px;
	justify-content: center;
}
.woocommerce nav.woocommerce-pagination ul li {
	border: none;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	border: 1px solid var(--hml-border);
	border-radius: 999px;
	min-width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
	background: var(--hml-primary);
	color: #fff;
}

/* ============================================================
   Shop sidebar widgets (search + category list with item counts)
   ============================================================ */

/* Search widget */
.hml-sidebar .widget_product_search .woocommerce-product-search,
.hml-sidebar .wp-block-search__inside-wrapper {
	display: flex;
	gap: 8px;
}
.hml-sidebar .widget_product_search input[type="search"],
.hml-sidebar .wp-block-search__input {
	flex: 1;
	min-width: 0;
}
.hml-sidebar .widget_product_search button,
.hml-sidebar .wp-block-search__button {
	flex: 0 0 auto;
	padding: 0.7em 1.1em;
}

/* Category lists — classic widget + block + generic widget lists */
.hml-sidebar .product-categories,
.hml-sidebar .wc-block-product-categories-list,
.hml-sidebar ul.product-categories {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hml-sidebar .product-categories li.cat-item,
.hml-sidebar .wc-block-product-categories-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid var(--hml-border);
}
.hml-sidebar .product-categories li.cat-item:last-child,
.hml-sidebar .wc-block-product-categories-list-item:last-child {
	border-bottom: none;
}
.hml-sidebar .product-categories li.cat-item > a,
.hml-sidebar .wc-block-product-categories-list-item > a {
	flex: 1 1 auto;
	padding: 0;
	color: var(--hml-ink);
	font-weight: 600;
	border: none;
}
.hml-sidebar .product-categories li.cat-item > a:hover,
.hml-sidebar .wc-block-product-categories-list-item > a:hover {
	color: var(--hml-accent);
}
.hml-sidebar .current-cat > a { color: var(--hml-accent); }

/* Price filter slider — brand colours */
.hml-sidebar .price_slider_wrapper { margin-top: 8px; }
.hml-sidebar .ui-slider {
	position: relative;
	height: 6px;
	background: var(--hml-border);
	border-radius: 999px;
	margin: 16px 0;
}
.hml-sidebar .ui-slider .ui-slider-range {
	position: absolute;
	height: 6px;
	background: var(--hml-accent);
	border-radius: 999px;
}
.hml-sidebar .ui-slider .ui-slider-handle {
	position: absolute;
	top: -6px;
	width: 18px;
	height: 18px;
	margin-left: -9px;
	background: var(--hml-primary);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: var(--hml-shadow);
	cursor: grab;
}
.hml-sidebar .price_slider_amount {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 0.85rem;
}
.hml-sidebar .price_slider_amount .button { order: 1; padding: 0.6em 1.4em; }
.hml-sidebar .price_slider_amount .price_label { flex: 1 1 100%; color: var(--hml-muted); }

/* The item-quantity badge */
.hml-sidebar .product-categories .count,
.hml-sidebar .wc-block-product-categories-list-item-count {
	flex: 0 0 auto;
	min-width: 26px;
	text-align: center;
	background: var(--hml-cream);
	color: var(--hml-muted);
	border: 1px solid var(--hml-border);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1.5;
}
.hml-sidebar .product-categories li.cat-item > a:hover ~ .count { color: var(--hml-accent); }

/* Sub-categories (children) drop to a new full-width line, indented */
.hml-sidebar .product-categories .children {
	flex: 1 0 100%;
	list-style: none;
	margin: 6px 0 0;
	padding-left: 14px;
	border-left: 2px solid var(--hml-border);
}
.hml-sidebar .product-categories .children li.cat-item { padding: 7px 0; }

/* "Added to cart" notice on single product pages */
.woocommerce-message {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
.woocommerce-message .hml-cart-msg-text { flex: 1 1 100%; }
.woocommerce-message .button { float: none !important; margin: 0 !important; }

/* "Added to cart" popup (AJAX adds from the shop grid) */
.hml-cart-popup {
	position: fixed;
	top: 96px;
	right: 22px;
	z-index: 1000;
	width: min(92vw, 340px);
	background: #fff;
	border: 1px solid var(--hml-border);
	border-radius: var(--hml-radius);
	box-shadow: var(--hml-shadow-lg);
	padding: 20px;
	opacity: 0;
	transform: translateY(-12px) scale(0.98);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.hml-cart-popup.is-open { opacity: 1; transform: none; }
.hml-cart-popup__head {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.05rem;
	margin-bottom: 16px;
	padding-right: 18px;
}
.hml-cart-popup__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--hml-green);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
}
.hml-cart-popup__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.hml-cart-popup__actions .hml-btn { width: 100%; }
.hml-cart-popup__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--hml-muted);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
}
.hml-cart-popup__close:hover { background: var(--hml-cream); color: var(--hml-ink); transform: none; box-shadow: none; }

@media (max-width: 600px) {
	.hml-cart-popup { top: auto; bottom: 16px; right: 50%; transform: translate(50%, 12px); }
	.hml-cart-popup.is-open { transform: translate(50%, 0); }
}

/* Responsive product grid */
@media (max-width: 900px) {
	.woocommerce ul.products.columns-3,
	.woocommerce ul.products.columns-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.woocommerce ul.products.columns-2,
	.woocommerce ul.products.columns-3,
	.woocommerce ul.products.columns-4 { grid-template-columns: 1fr; }
}

/* =========================================================
   Track Your Order
   ========================================================= */
.hml-track { max-width: 680px; }
.hml-track__form {
	background: var(--hml-cream);
	border: 1px solid var(--hml-border);
	border-radius: var(--hml-radius);
	padding: 24px;
}
.hml-track__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 18px;
}
.hml-track__field { margin: 0; }
.hml-track__field label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 6px;
}
.hml-track__field input { width: 100%; }
.hml-track__error {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: var(--hml-radius-sm);
	background: #fdecea;
	border: 1px solid #f5c2c0;
	color: #8a1f1a;
}

/* Result card */
.hml-track__result {
	margin-top: 24px;
	background: #fff;
	border: 1px solid var(--hml-border);
	border-radius: var(--hml-radius);
	padding: 24px;
	box-shadow: var(--hml-shadow);
}
.hml-track__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.hml-track__head h3 { margin: 0; }
.hml-track__status {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: var(--hml-cream-2);
	color: var(--hml-ink);
}
.hml-track__status--processing,
.hml-track__status--on-hold { background: #fff3e0; color: #9a5b00; }
.hml-track__status--completed { background: #e6f4ec; color: #1d7a4d; }
.hml-track__status--cancelled,
.hml-track__status--refunded,
.hml-track__status--failed { background: #fdecea; color: #8a1f1a; }
.hml-track__meta { color: var(--hml-muted); font-size: 0.9rem; margin: 8px 0 20px; }

/* Progress steps */
.hml-track__steps {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	gap: 8px;
}
.hml-track__step {
	flex: 1;
	position: relative;
	text-align: center;
	font-size: 0.8rem;
	color: var(--hml-muted);
	padding-top: 26px;
}
.hml-track__dot {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--hml-border);
	z-index: 2;
}
/* Connector line between dots */
.hml-track__step::before {
	content: "";
	position: absolute;
	top: 7px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--hml-border);
	z-index: 1;
}
.hml-track__step:first-child::before { display: none; }
.hml-track__step.is-done .hml-track__dot,
.hml-track__step.is-current .hml-track__dot { background: var(--hml-green); border-color: var(--hml-green); }
.hml-track__step.is-done::before,
.hml-track__step.is-current::before { background: var(--hml-green); }
.hml-track__step.is-current { color: var(--hml-ink); font-weight: 700; }

.hml-track__shipment {
	background: var(--hml-cream);
	border-radius: var(--hml-radius-sm);
	padding: 10px 14px;
	font-size: 0.92rem;
}
.hml-track__items {
	list-style: none;
	margin: 16px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--hml-border);
}
.hml-track__items li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
}
.hml-track__qty { color: var(--hml-muted); }
.hml-track__viewlink { margin: 16px 0 0; }
.hml-track__viewlink a { font-weight: 600; }

@media (max-width: 560px) {
	.hml-track__fields { grid-template-columns: 1fr; }
	.hml-track__steps { flex-direction: column; gap: 0; }
	.hml-track__step {
		text-align: left;
		padding: 8px 0 8px 28px;
	}
	.hml-track__dot { top: 8px; left: 0; transform: none; }
	.hml-track__step::before {
		top: 0;
		left: 7px;
		width: 2px;
		height: 100%;
	}
}
