/* ==========================================================================
   Haramain Pure - Shop & archive pages

   Rebuilt to match the landing page. Woodmart's product loop markup is left
   alone on purpose - variation swatches, wishlist and AJAX all depend on it -
   so this restructures the page around the loop and restyles the cards.

   Layout change: the 340px category sidebar is gone (removed in
   functions.php) and replaced by a horizontal filter rail, giving the grid
   the full width.
   ========================================================================== */

/* The approved board's palette, scoped to the shop and product screens so the
   pages still on the older green direction are untouched while they wait. */
.woocommerce-shop,
.tax-product_cat,
.post-type-archive-product,
.single-product,
.woocommerce-cart,
.woocommerce-checkout {
	--sh-cream:  #FBF5E4;   /* page                                     */
	--sh-card:   #FDFAF1;   /* product cards, sidebar                   */
	--sh-parch:  #F9F1DD;   /* hero band, image wells                   */
	--sh-forest: #022017;   /* headings, dark buttons                   */
	--sh-olive:  #6A7D4E;
	--sh-gold:   #F8C960;   /* cart discs                               */
	--sh-line:   #EBE4D2;
	--sh-ink:    #0A0C0B;
	--sh-muted:  #585951;
	--sh-price:  #C4441E;
	--sh-serif:  "Playfair Display", Georgia, "Times New Roman", serif;

	/* Aliases for the retired green palette, so the rules further down this
	   file keep resolving while they are converted section by section. */
	--sh-green:  var(--sh-forest);
	--sh-ink-2:  var(--sh-forest);
	--sh-wash:   var(--sh-parch);
	--sh-mint:   var(--sh-gold);
	--sh-mint-2: #E2EDE6;

	/* .whb-main-header is position:absolute over the content, so anything at
	   the top of the page has to clear it by hand. */
	--sh-header-h: 120px;

	background-color: var(--sh-cream);
}

/* The hero breaks out with 100vw, which counts the scrollbar; clip so that
   never becomes a horizontal scroll. */
.woocommerce-shop .main-page-wrapper,
.tax-product_cat .main-page-wrapper,
.single-product .main-page-wrapper,
.woocommerce-cart .main-page-wrapper,
.woocommerce-checkout .main-page-wrapper {
	overflow-x: clip;
	background: var(--sh-cream);
}

/* The CTA band and footer live outside .main-page-wrapper, so the cream has
   to reach them too or the page ends on a white strip. */
.woocommerce-shop .website-wrapper,
.tax-product_cat .website-wrapper,
.single-product .website-wrapper,
.woocommerce-cart .website-wrapper,
.woocommerce-checkout .website-wrapper,
.woocommerce-cart .hp-cta,
.woocommerce-checkout .hp-cta,
.woocommerce-shop .hp-cta,
.tax-product_cat .hp-cta,
.single-product .hp-cta { background: var(--sh-cream); }

/* Woodmart hides the result count by theme option; the approved design shows
   it, so it comes back on the left of the toolbar. */
.woocommerce .shop-loop-head .woocommerce-result-count {
	display: block !important;
	margin: 0;
	color: var(--sh-muted);
	font-size: .92rem;
}

@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/PlayfairDisplay.woff2") format("woff2-variations");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}

/* --------------------------------------------------------------------------
   Hero
   Woodmart's own title band is hidden; haramain_shop_hero() renders the cream
   one, which can carry a subtitle and the botanical corners.
   -------------------------------------------------------------------------- */

.woocommerce-shop .page-title,
.tax-product_cat .page-title,
.post-type-archive-product .page-title { display: none !important; }

.hp-shop-hero {
	position: relative;
	flex: 0 0 100vw;
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-top: var(--sh-header-h);
	overflow: clip;
	background: var(--sh-parch);
	padding-block: clamp(26px, 4vw, 54px) clamp(22px, 3.2vw, 44px);
	text-align: center;
}
.hp-shop-hero__in {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1480px;
	margin-inline: auto;
	padding-inline: 15px;
}
.hp-shop-hero h1 {
	font-family: var(--sh-serif);
	font-weight: 700;
	font-size: clamp(30px, 4.2vw, 60px);
	line-height: 1.08;
	letter-spacing: -.01em;
	color: var(--sh-ink);
	margin: 0;
}
.hp-shop-hero p {
	margin: clamp(6px, .8vw, 12px) 0 0;
	color: var(--sh-muted);
	font-size: clamp(14px, 1.2vw, 18px);
}
.hp-shop-hero__sprig {
	position: absolute;
	top: -16%;
	width: clamp(130px, 18vw, 260px);
	height: auto;
	opacity: .96;
	pointer-events: none;
	user-select: none;
}
.hp-shop-hero__sprig--r { right: max(-2vw, calc(50% - 700px)); transform: rotate(180deg); }
.hp-shop-hero__sprig--l { left:  max(-2vw, calc(50% - 700px)); transform: rotate(180deg) scaleX(-1); }
@media (max-width: 680px) {
	.hp-shop-hero__sprig--l { display: none; }
}

/* Breadcrumb now sits under the band, on the page rather than inside it. */
.hp-crumb {
	flex: 0 0 100%;
	width: 100%;
	max-width: 1450px;
	margin: clamp(10px, 1.4vw, 20px) auto 0;
	font-size: .84rem;
	color: var(--sh-muted);
}
.hp-crumb a { color: var(--sh-muted); text-decoration: none; }
.hp-crumb a:hover { color: var(--sh-ink); }
.hp-crumb span { margin-inline: .5em; opacity: .5; }

/* Header rules live in hp-header.css. */

/* --------------------------------------------------------------------------
   Two-column shell
   Woodmart's sidebar stays off; haramain_shop_open_layout() renders our own
   and wraps the loop, so the loop markup itself is untouched.
   -------------------------------------------------------------------------- */

.woocommerce-shop .site-content.shop-content-area,
.tax-product_cat .site-content.shop-content-area {
	flex: 0 0 100% !important;
	max-width: 100% !important;
	width: 100% !important;
}
.woocommerce-shop .sidebar-container,
.tax-product_cat .sidebar-container { display: none !important; }
.woocommerce-shop .wd-show-sidebar-btn,
.tax-product_cat .wd-show-sidebar-btn { display: none !important; }

.woocommerce-shop .main-page-wrapper,
.tax-product_cat .main-page-wrapper { padding-top: 0; }

.hp-shop-layout {
	display: grid;
	grid-template-columns: clamp(220px, 21vw, 300px) minmax(0, 1fr);
	gap: clamp(16px, 2vw, 28px);
	align-items: start;
	margin-top: clamp(18px, 2.4vw, 34px);
}
.hp-shop-main { min-width: 0; }

.hp-side { display: grid; gap: clamp(12px, 1.4vw, 20px); align-content: start; }
.hp-side__card {
	background: var(--sh-card);
	border: 1px solid var(--sh-line);
	border-radius: var(--hp-r-md);
	padding: clamp(14px, 1.5vw, 22px);
}
.hp-side__card h2,
.hp-side__card .widgettitle,
.hp-side__card .widget-title {
	font-family: var(--sh-serif);
	font-size: clamp(17px, 1.3vw, 21px);
	font-weight: 700;
	color: var(--sh-ink);
	margin: 0 0 clamp(8px, .9vw, 14px);
	padding: 0;
	border: 0;
	text-transform: none;
	letter-spacing: 0;
}
.hp-side__card ul { list-style: none; margin: 0; padding: 0; }

.hp-side__cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: clamp(7px, .7vw, 10px) clamp(9px, .8vw, 12px);
	border-radius: var(--hp-r-sm);
	color: var(--sh-muted);
	font-size: clamp(13.5px, 1.05vw, 15px);
	line-height: 1.3;
	text-decoration: none;
	transition: background var(--hp-t-fast), color var(--hp-t-fast);
}
.hp-side__cat:hover { background: var(--sh-parch); color: var(--sh-ink); }
.hp-side__cat em {
	flex: none;
	font-style: normal;
	font-size: .82em;
	color: var(--sh-muted);
	background: var(--sh-parch);
	border-radius: 999px;
	padding: 2px 8px;
}
.hp-side__cat.is-active { background: var(--sh-forest); color: #fff; font-weight: 600; }
.hp-side__cat.is-active em { background: rgba(255, 255, 255, .16); color: #fff; }

/* WooCommerce's own price widget, restyled rather than replaced by a slider
   that does nothing. */
.hp-side__price .widget { margin: 0; padding: 0; border: 0; }
.hp-side__price .price_slider_wrapper { margin-top: clamp(14px, 1.4vw, 20px); }
/* Woodmart ships its own jQuery-UI slider skin, so these need the extra
   weight to land. */
.hp-side__price .price_slider_wrapper .ui-slider.ui-slider-horizontal {
	position: relative;
	background: var(--sh-line) !important;
	height: 4px !important;
	border: 0 !important;
	border-radius: 999px !important;
	margin: 6px 0 22px !important;
}
.hp-side__price .ui-slider .ui-slider-range {
	background: var(--sh-forest) !important;
	height: 4px !important;
	border-radius: 999px !important;
	top: 0 !important;
}
.hp-side__price .ui-slider .ui-slider-handle {
	/* Woodmart's skin drops the absolute positioning jQuery UI relies on, so
	   the handles were sitting in flow above the track. */
	position: absolute !important;
	/* Woodmart also sets a negative margin on the handle, which lifted it off
	   the track even once the positioning was restored. */
	margin-top: 0 !important;
	bottom: auto !important;
	transform: none !important;
	background: var(--sh-forest) !important;
	border: 2px solid var(--sh-card) !important;
	box-shadow: 0 1px 4px rgba(2, 32, 23, .3) !important;
	width: 16px !important;
	height: 16px !important;
	border-radius: 50% !important;
	top: -6px !important;
	margin-left: -8px !important;
	cursor: grab;
}
.hp-side__price .ui-slider .ui-slider-handle:active { cursor: grabbing; }
.hp-side__price .price_slider_amount {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: .86rem;
	color: var(--sh-muted);
}
.hp-side__price .price_slider_amount .price_label { order: 1; flex: 1 1 100%; }
.hp-side__price .price_slider_amount .button {
	order: 2;
	background: var(--sh-forest);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: .82rem;
	cursor: pointer;
}
/* The widget prints slider-then-amounts; the design puts the two values on
   top. `display: contents` dissolves the amount row so its children can be
   placed on the wrapper's own grid, which is the only way to interleave them
   with the slider without touching WooCommerce's template. */
.hp-side__price .price_slider_wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 10px;
	align-items: center;
}
.hp-side__price .price_slider_amount { display: contents; }
.hp-side__price .price_slider_amount .price_label,
.hp-side__price .price_slider_amount .clear { display: none !important; }

.hp-side__price .price_slider_amount label {
	/* WooCommerce ships .screen-reader-text with !important, so showing the
	   labels takes the same weight. */
	position: static !important;
	width: auto !important;
	height: auto !important;
	margin: 0 0 4px !important;
	padding: 0 !important;
	overflow: visible !important;
	clip: auto !important;
	clip-path: none !important;
	white-space: normal !important;
	grid-row: 1;
	font-size: .76rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--sh-muted);
	margin-bottom: 4px;
}
.hp-side__price label[for="min_price"] { grid-column: 1; }
.hp-side__price label[for="max_price"] { grid-column: 2; }
.hp-side__price #min_price { grid-column: 1; grid-row: 2; }
.hp-side__price #max_price { grid-column: 2; grid-row: 2; }
.hp-side__price .price_slider { grid-column: 1 / -1; grid-row: 3; }
.hp-side__price .price_slider_amount .button { grid-column: 1 / -1; grid-row: 4; }

.hp-side__price .price_slider_amount input[type="text"] {
	display: block !important;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid var(--sh-line);
	border-radius: var(--hp-r-sm);
	background: var(--sh-cream);
	color: var(--sh-ink);
	font-size: .9rem;
	text-align: left;
}
.hp-side__price .price_slider_amount .button {
	margin: 10px auto 0;
	background: transparent !important;
	border: 1px solid var(--sh-line) !important;
	color: var(--sh-ink) !important;
	padding: 9px 22px !important;
	font-size: .86rem !important;
	font-weight: 600;
	transition: background-color .18s, border-color .18s;
}
.hp-side__price .price_slider_amount .button:hover {
	background: var(--sh-parch) !important;
	border-color: var(--sh-olive) !important;
}
.hp-side__reset {
	display: inline-block;
	margin-top: 12px;
	font-size: .84rem;
	color: var(--sh-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.hp-side__reset:hover { color: var(--sh-ink); }

@media (max-width: 1024px) {
	.hp-shop-layout { grid-template-columns: 1fr; }
	.hp-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
	.hp-side { grid-template-columns: 1fr; }
}

/* The horizontal rail this sidebar replaces. */
.hp-cats { display: none !important; }

/* --------------------------------------------------------------------------
   Category rail
   -------------------------------------------------------------------------- */

.hp-cats {
	position: relative;
	margin-bottom: var(--hp-s-5);
}

/* Desktop: wrap onto as many rows as needed.
   The first version scrolled horizontally at every width, which works on a
   phone where swiping is natural but on a mouse just hid the last categories
   off the right edge with no obvious way to reach them. Wrapping shows all
   17 and costs one extra row. */
.hp-cats__track {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	padding: 4px 2px;
}

.hp-cat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	padding: 10px 16px;
	border-radius: var(--hp-r-pill);
	background: var(--hp-white);
	border: 1px solid var(--hp-line);
	color: var(--hp-ink-soft);
	font-size: .92rem;
	font-weight: 550;
	text-decoration: none;
	white-space: nowrap;
	scroll-snap-align: start;
	transition: background-color var(--hp-t-fast) var(--hp-ease-out),
	            border-color var(--hp-t-fast) var(--hp-ease-out),
	            color var(--hp-t-fast) var(--hp-ease-out),
	            transform var(--hp-t-fast) var(--hp-ease-out);
}
.hp-cat:hover {
	background: var(--sh-wash);
	border-color: var(--hp-green-300);
	color: var(--sh-green);
	transform: translateY(-2px);
}
.hp-cat em {
	font-style: normal;
	font-size: .74rem;
	padding: 2px 7px;
	border-radius: var(--hp-r-pill);
	background: var(--sh-wash);
	color: var(--hp-ink-mute);
}
.hp-cat.is-active {
	background: var(--sh-green);
	border-color: var(--sh-green);
	color: #fff;
}
.hp-cat.is-active em { background: rgba(255, 255, 255, .2); color: #fff; }

/* --------------------------------------------------------------------------
   Toolbar
   Was doing four jobs at once. The density switcher is dropped - three grid
   icons is a preference nobody sets - leaving result count and sorting.
   -------------------------------------------------------------------------- */

.woocommerce .shop-loop-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hp-s-4);
	flex-wrap: wrap;
	/* Sits directly under the pill rail as one band, rather than floating in
	   its own stretch of white with a rule underneath. */
	padding: 0 0 var(--hp-s-4);
	margin-bottom: var(--hp-s-5);
	background: transparent;
	border: 0;
}

.woocommerce .hp-result-count {
	margin: 0;
	font-size: .92rem;
	font-weight: 550;
	color: var(--hp-ink-mute);
}
/* Drop the per-page counts and the three grid-density icons. Both are
   preferences almost nobody sets, and together they made the toolbar look
   like a control panel. Actual class is .wd-products-shop-view - an earlier
   guess of .wd-shop-view matched nothing, which is why the icons survived. */
.woocommerce .shop-loop-head .wd-shop-tools > .per-page-variations,
.woocommerce .shop-loop-head .products-per-page,
.woocommerce .wd-products-per-page,
.woocommerce .per-page-variation,
.woocommerce .wd-products-shop-view { display: none !important; }

.woocommerce .woocommerce-result-count {
	margin: 0;
	font-size: .92rem;
	color: var(--hp-ink-mute);
}
.woocommerce .woocommerce-ordering select,
.woocommerce .orderby {
	border-radius: var(--hp-r-pill) !important;
	padding: .6em 2.4em .6em 1.2em;
	background-color: var(--hp-white);
	border: 1px solid var(--hp-line);
	font-size: .92rem;
	font-weight: 550;
	color: var(--hp-ink);
	cursor: pointer;
}
.woocommerce .orderby option { color: var(--hp-ink); background: #fff; }

/* --------------------------------------------------------------------------
   Product grid
   Four across on desktop instead of three, since the sidebar's 340px is now
   available. Auto-fill keeps the card width sane at every viewport rather
   than snapping between fixed column counts.
   -------------------------------------------------------------------------- */

/* The :not() pair is load-bearing, not tidiness.
   Woodmart gives its related-products and upsell carousels the classes
   `wd-products products` on the CAROUSEL CONTAINER itself, so a bare
   `.products.wd-products` matches a carousel as readily as the archive grid.
   Forcing `display: grid` and fixed tracks onto that container breaks the
   carousel's own sizing: the track is laid out from its content while each
   item is `flex: 0 0 50%` of the track, so width ends up defined in terms of
   itself and the layout runs away to the 2^24 engine limit.

   Measured, not theorised: the single product page was 16,782,213px tall at
   375px wide, with a 33,554,328px carousel track. Scoped, it is 5,269px.
   `wd-carousel-container` is the class that actually appears; `wd-carousel`
   is excluded too in case a future Woodmart release moves it. */
.woocommerce .products.wd-products:not(.wd-carousel-container):not(.wd-carousel),
.woocommerce ul.products:not(.wd-carousel-container):not(.wd-carousel) {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)) !important;
	gap: clamp(14px, 1.6vw, 22px) !important;
	margin: 0 !important;
	/* Woodmart sets flex-start, which lets each card size to its own content.
	   That is why a product with size swatches stood 46px taller than the one
	   beside it. Stretch makes every card in a row the same height. */
	align-items: stretch !important;
}
.woocommerce .products.wd-products > .wd-product {
	width: auto !important;
	margin: 0 !important;
	height: 100%;
}

/* --- Cards --------------------------------------------------------------- */

.woocommerce .wd-product {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0;
	border-radius: var(--hp-r-md);
	background: var(--sh-card);
	border: 1px solid var(--sh-line);
	overflow: hidden;
	transition: transform .32s var(--hp-ease-spring), box-shadow .32s var(--hp-ease-out),
	            border-color .32s var(--hp-ease-out);
}
.woocommerce .wd-product:hover {
	transform: translateY(-6px);
	border-color: transparent;
	box-shadow: 0 20px 44px rgba(7, 33, 26, .14);
}

.woocommerce .wd-product .product-element-top {
	position: relative;
	border-radius: 0;
	background: var(--sh-wash);
	aspect-ratio: 1 / 1;
	overflow: hidden;
	margin-bottom: 0;
}
.woocommerce .wd-product .product-image-link,
.woocommerce .wd-product .product-element-top > a { display: block; height: 100%; }
.woocommerce .wd-product .product-element-top img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 11%;
	transition: transform .6s var(--hp-ease-out);
}
.woocommerce .wd-product:hover .product-element-top img { transform: scale(1.07); }

/* The wrapper is the flex column that makes cards line up: image, then text,
   then the swatch row pinned to the bottom by margin-top:auto. Without this
   the price sat at a different height on every card. */
.woocommerce .wd-product .product-wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.woocommerce .wd-product .product-wrapper > *:not(.product-element-top) { padding-inline: var(--hp-s-4); }
.woocommerce .wd-product .wd-entities-title {
	margin: var(--hp-s-4) 0 4px;
	font-size: .98rem;
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: -.012em;
}
.woocommerce .wd-product .wd-entities-title a { color: var(--hp-ink); }
.woocommerce .wd-product:hover .wd-entities-title a { color: var(--sh-green); }

.woocommerce .wd-product .wd-product-cats {
	font-size: .74rem;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--hp-ink-mute);
	margin-bottom: 6px;
}
/* --- Card footer: price + round cart button -------------------------------
   Built by hp-motion.js. Price left, action right, pinned to the bottom of
   the card - so every card ends identically and the dead space that used to
   sit under the price is gone.
   -------------------------------------------------------------------------- */

.woocommerce .wd-product .hp-card-foot {
	/* !important because a Woodmart rule zeroes margins on loop children,
	   which killed the auto margin and left the footer sitting directly under
	   the title - so cards with a two-line name had their button 19px lower
	   than the one beside it. */
	margin-top: auto !important;
	padding: var(--hp-s-2) var(--hp-s-4) var(--hp-s-4);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hp-s-3);
}

.woocommerce .wd-product .price {
	font-size: 1.04rem;
	font-weight: 700;
	color: var(--sh-green);
	margin: 0;
	display: block;
	line-height: 1.25;
}
.woocommerce .wd-product .price del { color: var(--hp-ink-mute); font-weight: 400; opacity: .65; }
.woocommerce .wd-product .price ins { text-decoration: none; }

/* Price ranges on variable products are long; let them wrap rather than
   squeezing the button. */
.woocommerce .wd-product .hp-card-foot .price { font-size: .96rem; }

/* The round cart button. Text is replaced by an icon via a mask, so the
   original link markup - and its AJAX data attributes - stay untouched. */
.woocommerce .wd-product .hp-cart-btn {
	flex: none;
	/* Fixed square with !important because Woodmart's own .add_to_cart_button
	   rules set a full-width pill and would otherwise win. */
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	border-radius: 50% !important;
	display: grid !important;
	place-items: center;
	background: var(--sh-gold) !important;
	color: #2A1D06 !important;
	font-size: 0 !important;          /* hide the label text */
	text-indent: 0;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	box-shadow: 0 6px 16px rgba(7, 33, 26, .22);
	transition: background-color var(--hp-t-fast) var(--hp-ease-out),
	            transform var(--hp-t-fast) var(--hp-ease-spring),
	            box-shadow var(--hp-t-fast) var(--hp-ease-out);
	position: relative;
	overflow: hidden;
}
.woocommerce .wd-product .hp-cart-btn::before {
	content: "";
	width: 19px;
	height: 19px;
	background-color: currentColor;
	-webkit-mask: var(--hp-cart-icon) center / contain no-repeat;
	mask: var(--hp-cart-icon) center / contain no-repeat;
	/* The label's text node is a second grid item even at font-size 0, which
	   was shunting the glyph up out of the circle. Absolute centring ignores
	   it. The half-pixel nudge is the glyph's own bias: its ink runs y 0..23
	   of a 24 viewBox, so geometric centring sits fractionally high. */
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-50% + 0.4px));
}
.woocommerce .wd-product .hp-cart-btn:hover {
	background: var(--sh-green) !important;
	transform: scale(1.08);
	box-shadow: 0 10px 22px rgba(7, 33, 26, .3);
}
.woocommerce .wd-product .hp-cart-btn:active { transform: scale(.96); }

/* Woodmart marks the button while its AJAX request is in flight. */
.woocommerce .wd-product .hp-cart-btn.loading::before,
.woocommerce .wd-product .hp-cart-btn.added::before { opacity: .35; }

:root {
	--hp-cart-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
}

/* --- Variation swatches ---------------------------------------------------
   Rendered by the Variation Swatches for WooCommerce plugin as
   .cfvsw_variations_form.

   Moved out of the card body and onto the image, revealed on hover. Keeping
   them in the flow meant a product with sizes was always taller than one
   without, and equalising the heights just moved the problem - the shorter
   cards got a block of dead space under the price instead. Overlaying them
   makes every card body identical: category, title, price, button.
   -------------------------------------------------------------------------- */

.woocommerce .wd-product .cfvsw_variations_form,
.woocommerce .wd-product .wd-swatches-grid {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	margin: 0;
	padding: var(--hp-s-3) var(--hp-s-3) var(--hp-s-3);
	background: linear-gradient(to top, rgba(255, 255, 255, .96) 62%, rgba(255, 255, 255, 0));
	opacity: 0;
	transform: translateY(8px);
	transition: opacity var(--hp-t-mid) var(--hp-ease-out),
	            transform var(--hp-t-mid) var(--hp-ease-out);
	pointer-events: none;
}
.woocommerce .wd-product:hover .cfvsw_variations_form,
.woocommerce .wd-product:focus-within .cfvsw_variations_form {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

/* No hover on touch, so sizes are always shown there. */
@media (pointer: coarse) {
	.woocommerce .wd-product .cfvsw_variations_form {
		opacity: 1;
		transform: none;
		pointer-events: auto;
	}
}

.woocommerce .wd-product .cfvsw_variations_form .cfvsw-swatches-container,
.woocommerce .wd-product .cfvsw_swatches_container {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-start;
}

.woocommerce .wd-product .cfvsw_swatches_option,
.woocommerce .wd-product .cfvsw-swatch-option {
	min-width: 46px;
	height: 28px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 0 10px;
	border-radius: var(--hp-r-pill) !important;
	border: 1px solid var(--hp-line) !important;
	background: var(--hp-white) !important;
	color: var(--hp-ink-soft) !important;
	font-size: .74rem;
	font-weight: 600;
	line-height: 1;
	box-shadow: none !important;
	transition: background-color var(--hp-t-fast) var(--hp-ease-out),
	            border-color var(--hp-t-fast) var(--hp-ease-out),
	            color var(--hp-t-fast) var(--hp-ease-out);
}
.woocommerce .wd-product .cfvsw_swatches_option:hover {
	border-color: var(--hp-green-300) !important;
	background: var(--sh-wash) !important;
	color: var(--sh-green) !important;
}
.woocommerce .wd-product .cfvsw_swatches_option.cfvsw_selected_swatch,
.woocommerce .wd-product .cfvsw-swatch-option.selected {
	background: var(--sh-green) !important;
	border-color: var(--sh-green) !important;
	color: #fff !important;
}

/* --- Hover actions --------------------------------------------------------
   Woodmart floats a pill of four icons over the middle of the image. It
   overlapped the product, sat at a different height on every card, and does
   nothing on touch devices where there is no hover.

   Replaced with a fixed column in the top-right corner of the image well:
   same position on every card, clear of the product, and revealed on hover.
   -------------------------------------------------------------------------- */

/* The pill of secondary actions - wishlist, compare, quick view. Add to cart
   is no longer among them; it lives in the card footer where it is visible
   without hovering. Anchored to the image's top-right so it never overlaps
   the product or the swatch row along the bottom. */
.woocommerce .wd-product .wd-buttons {
	position: absolute;
	top: var(--hp-s-3);
	right: var(--hp-s-3);
	left: auto;
	bottom: auto;
	z-index: 4;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 2px;
	width: auto;
	padding: 4px;
	border-radius: var(--hp-r-pill);
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: var(--hp-shadow-sm);
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity var(--hp-t-mid) var(--hp-ease-out),
	            transform var(--hp-t-mid) var(--hp-ease-out);
}
.woocommerce .wd-product:hover .wd-buttons,
.woocommerce .wd-product:focus-within .wd-buttons { opacity: 1; transform: none; }

.woocommerce .wd-product .wd-buttons > * {
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--hp-ink);
	font-size: 0;
	transition: background-color var(--hp-t-fast) var(--hp-ease-out),
	            color var(--hp-t-fast) var(--hp-ease-out);
}
.woocommerce .wd-product .wd-buttons > *:hover {
	background: var(--sh-green);
	color: #fff;
}
.woocommerce .wd-product .wd-buttons a { color: inherit; }
.woocommerce .wd-product .wd-buttons a::before { font-size: 15px; }

/* Touch devices have no hover, so the actions are always visible there. */
@media (pointer: coarse) {
	.woocommerce .wd-product .wd-buttons { opacity: 1; transform: none; }
}

/* --- Add to cart ----------------------------------------------------------
   The button itself is styled as .hp-cart-btn in the card-footer section
   above. Any leftover Woodmart wrapper is hidden: the link has been moved out
   of it by hp-motion.js, so an empty container would otherwise still occupy
   a row of padding under every card.
   -------------------------------------------------------------------------- */

.woocommerce .wd-product .wd-add-btn:empty,
.woocommerce .wd-product .add-to-cart-loop:empty { display: none; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.woocommerce .pagination ul li a,
.woocommerce .pagination ul li span,
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	min-width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--hp-r-sm) !important;
	border: 1px solid var(--hp-line);
	font-weight: 600;
	transition: background-color var(--hp-t-fast) var(--hp-ease-out),
	            border-color var(--hp-t-fast) var(--hp-ease-out),
	            transform var(--hp-t-fast) var(--hp-ease-out);
}
.woocommerce .pagination ul li a:hover {
	background: var(--sh-wash);
	border-color: var(--hp-green-300);
	transform: translateY(-2px);
}
.woocommerce .pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li span.current {
	background: var(--sh-green);
	border-color: var(--sh-green);
	color: #fff;
}

/* --------------------------------------------------------------------------
   Single product page
   -------------------------------------------------------------------------- */

.single-product .woocommerce-product-gallery {
	border-radius: var(--hp-r-lg);
	overflow: hidden;
	background: var(--sh-wash);
}
.single-product .product_title {
	font-size: clamp(1.6rem, 2.8vw, 2.4rem);
	letter-spacing: -.03em;
	line-height: 1.12;
}
.single-product .summary .price,
.single-product p.price {
	font-size: clamp(1.3rem, 2vw, 1.7rem);
	font-weight: 700;
	color: var(--sh-green);
}
.single-product .quantity input,
.single-product .quantity .qty {
	border-radius: var(--hp-r-pill) !important;
	border: 1px solid var(--hp-line);
	min-height: 48px;
}
.single-product .single_add_to_cart_button { min-height: 48px; }

.single-product .hp-trust {
	display: grid;
	gap: var(--hp-s-3);
	margin-top: var(--hp-s-5);
	padding-top: var(--hp-s-5);
	border-top: 1px solid var(--hp-line);
	list-style: none;
}
.single-product .hp-trust li {
	display: flex;
	align-items: center;
	gap: var(--hp-s-3);
	font-size: .92rem;
	color: var(--hp-ink-soft);
}
.single-product .hp-trust svg { color: var(--hp-green-600); flex: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.woocommerce .products.wd-products:not(.wd-carousel-container):not(.wd-carousel),
	.woocommerce ul.products:not(.wd-carousel-container):not(.wd-carousel) {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
	}
}

@media (max-width: 768px) {
	.woocommerce .page-title { padding-block: clamp(76px, 18vw, 104px) clamp(24px, 5vw, 36px) !important; }

	.woocommerce .products.wd-products:not(.wd-carousel-container):not(.wd-carousel),
	.woocommerce ul.products:not(.wd-carousel-container):not(.wd-carousel) {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px !important;
	}
	.woocommerce .wd-product:hover { transform: none; }
	.woocommerce .wd-product .wd-entities-title { font-size: .9rem; }

	/* Phones: back to a single swipeable row. Wrapping 17 pills here would
	   push the products most of a screen down. Runs to the viewport edge and
	   fades at both ends so a cut-off pill reads as "more this way". */
	.hp-cats {
		margin-inline: calc(var(--hp-s-4) * -1);
		-webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
		mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
	}
	.hp-cats__track {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
		padding-inline: var(--hp-s-4);
		padding-bottom: 10px;
	}
	.hp-cats__track::-webkit-scrollbar { display: none; }
	.hp-cat { scroll-snap-align: start; }

	.woocommerce .shop-loop-head { gap: var(--hp-s-3); padding-bottom: var(--hp-s-4); }
	.woocommerce .woocommerce-result-count { font-size: .85rem; }
}

/* Two-up is kept all the way down. A single full-width column on a phone
   means one product per screen and a great deal of scrolling to browse 88 of
   them - worse for shopping than slightly smaller cards. */
@media (max-width: 480px) {
	.woocommerce .products.wd-products:not(.wd-carousel-container):not(.wd-carousel),
	.woocommerce ul.products:not(.wd-carousel-container):not(.wd-carousel) { gap: 10px !important; }
	.woocommerce .wd-product .wd-entities-title { font-size: .85rem; }
	.woocommerce .wd-product .wd-product-cats { display: none; }
	.hp-cat { padding: 9px 14px; font-size: .87rem; }

	/* A ~160px card cannot fit a price range and a 42px button on one line -
	   the button ended up sitting on top of the price. Stack them, and shrink
	   the button, keeping it comfortably above the 44px touch minimum by
	   spanning the full width instead. */
	.woocommerce .wd-product .hp-card-foot {
		flex-direction: column;
		align-items: stretch;
		gap: var(--hp-s-2);
		padding: var(--hp-s-2) var(--hp-s-3) var(--hp-s-3);
	}
	.woocommerce .wd-product .hp-card-foot .price { font-size: .88rem; }
	.woocommerce .wd-product .hp-cart-btn {
		width: 100% !important;
		min-width: 0 !important;
		height: 38px !important;
		min-height: 38px !important;
		border-radius: var(--hp-r-pill) !important;
	}

	/* ...but not inside a carousel. Stacking a full-width button under the
	   price suits a narrow grid card; a carousel card is already small and
	   reads better with the round button beside the price. Keeping an
	   explicit width here also means no percentage width is resolved against
	   a carousel track, which is the shape that caused the runaway described
	   at the top of this file. */
	.woocommerce .wd-carousel-item .wd-product .hp-cart-btn {
		width: 42px !important;
		min-width: 42px !important;
		height: 42px !important;
		min-height: 42px !important;
	}
	.woocommerce .wd-carousel-item .wd-product .hp-card-foot {
		flex-direction: row;
		align-items: center;
	}
}


/* The corner sprigs read smaller and higher on the reference band. */
.hp-shop-hero__sprig {
	top: -4% !important;
	width: clamp(110px, 13.5vw, 196px) !important;
}


/* ==========================================================================
   Card hover and size selection, 2026-11-03
   ========================================================================== */

/* Calmer hover: the card lifts a little and keeps its edge; the photo barely
   moves (the handover caps image zoom at 1.025). */
.woocommerce .wd-product:hover {
	transform: translateY(-3px);
	border-color: var(--sh-line);
	box-shadow: 0 12px 28px rgba(2, 32, 23, .08);
}
.woocommerce .wd-product:hover .product-element-top img { transform: scale(1.025); }

/* The cart button stayed dark-iconed while its fill went forest green - a
   dark blob. It stays gold, a shade deeper. */
.woocommerce .wd-product .hp-cart-btn:hover {
	background: #EDB936 !important;
	color: #2A1D06 !important;
	transform: scale(1.06);
	box-shadow: 0 6px 14px rgba(150, 105, 10, .28);
}

/* Swatches on the card duplicated the product page's size choice. */
.woocommerce .wd-product .cfvsw_variations_form,
.woocommerce .wd-product .wd-swatches-grid,
.woocommerce .wd-product .cfvsw_swatches_container { display: none !important; }

/* "Select options" pill for variable products, as the shop design draws it. */
.woocommerce .wd-product .hp-select-btn {
	flex: none;
	display: inline-flex !important;
	align-items: center;
	height: 36px;
	padding: 0 16px !important;
	margin: 0 !important;
	border: 1px solid var(--sh-line) !important;
	border-radius: 999px !important;
	background: var(--sh-card) !important;
	color: var(--sh-ink) !important;
	font-size: .82rem !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	white-space: nowrap;
	box-shadow: none !important;
	transition: background-color .18s, border-color .18s;
}
.woocommerce .wd-product .hp-select-btn:hover {
	background: var(--sh-parch) !important;
	border-color: var(--sh-olive) !important;
}


/* ==========================================================================
   Shop on phones, 2026-11-03
   ========================================================================== */

/* Price card: the <summary> is its title on every screen */
.hp-side__price > summary {
	list-style: none;
	cursor: default;
	font-family: var(--sh-serif);
	font-size: clamp(17px, 1.3vw, 21px);
	font-weight: 700;
	color: var(--sh-ink);
}
.hp-side__price > summary::-webkit-details-marker { display: none; }
.hp-side__price .widget > h2:empty,
.hp-side__price .widgettitle:empty { display: none; }

@media (max-width: 1024px) {
	/* 1fr would grow to the chip row's full scroll width; minmax(0,...) lets
	   the column stay the screen's width and the row scroll inside it */
	.hp-shop-layout { grid-template-columns: minmax(0, 1fr) !important; }
	.hp-side, .hp-side > *, .hp-shop-main { min-width: 0; }
}
/* Tablets and phones share the compact filters: below 1025px the sidebar
   no longer fits beside the grid, and stacked as two cards it left a tall
   empty Price card next to the category list. */
@media (max-width: 1024px) {
	.hp-shop-layout { gap: 14px; }
	.hp-crumb { padding-inline: 16px; }
	.hp-side { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }

	/* categories: one swipeable row of chips instead of a 17-line list */
	.hp-side__card:not(.hp-side__price) {
		padding: 0;
		border: 0;
		background: none;
	}
	.hp-side__card:not(.hp-side__price) h2 { display: none; }
	.hp-side__card:not(.hp-side__price) ul {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		padding: 2px 16px 8px;
		margin: 0 -16px;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
		scroll-padding-inline: 16px;
		/* fade only the far edge, as a "there's more" hint; a fade on the
		   near edge dimmed the first chip and read as cut off */
		-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
		mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
	}
	.hp-side__card:not(.hp-side__price) ul::-webkit-scrollbar { display: none; }
	.hp-side__card:not(.hp-side__price) ul.is-end { -webkit-mask-image: none; mask-image: none; }
	/* mouse dragging (script in haramain_shop_open_layout); snapping off
	   mid-drag or it fights the pointer, back on after to settle on a chip */
	@media (pointer: fine) {
		.hp-side__card:not(.hp-side__price) ul { cursor: grab; }
		.hp-side__card:not(.hp-side__price) ul.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
		.hp-side__card:not(.hp-side__price) ul.is-dragging a { pointer-events: none; }
	}
	.hp-side__card:not(.hp-side__price) li { flex: none; scroll-snap-align: start; }
	.hp-side__cat {
		gap: 6px;
		padding: 8px 12px;
		border: 1px solid var(--sh-line);
		border-radius: 999px;
		background: var(--sh-card);
		white-space: nowrap;
		font-size: 14px;
	}

	/* price: a folding panel */
	.hp-side__price { padding: 12px 16px; }
	.hp-side__price > summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		cursor: pointer;
		font-size: 17px;
	}
	.hp-side__price > summary::after {
		content: "";
		width: 9px;
		height: 9px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg) translateY(-3px);
		transition: transform .2s;
	}
	.hp-side__price[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
	.hp-side__price[open] > summary { margin-bottom: 12px; }

	/* toolbar: count left, sort right, on one row */
	.woocommerce .shop-loop-head {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin-top: 4px;
		padding-bottom: 12px;
	}
	.woocommerce .shop-loop-head { flex-direction: row !important; }   /* Woodmart stacks it */
	.woocommerce .shop-loop-head .wd-shop-tools { margin: 0 !important; padding: 0 !important; border: 0 !important; flex: none; width: auto !important; }
	.woocommerce .shop-loop-head .wd-shop-tools:has(.woocommerce-result-count) { flex: 1; min-width: 0; }
	.woocommerce .shop-loop-head .woocommerce-result-count { font-size: 13px; flex: 1; min-width: 0; }

}
@media (max-width: 768px) {
	/* sort: Woodmart shrinks it to a bare icon over a transparent select,
	   which also blanked the options in the open list. Show it as a
	   labelled pill instead. */
	.woocommerce-ordering.wd-ordering-mb-icon { width: auto; height: 38px; }
	.woocommerce-ordering.wd-ordering-mb-icon select {
		position: static;
		height: 38px;
		padding: 0 14px 0 36px !important;
		border: 1px solid var(--sh-line) !important;
		border-radius: 999px !important;
		background: var(--sh-card) !important;
		color: var(--hp-ink) !important;
		font-size: 13px;
		font-weight: 600;
	}
	.woocommerce-ordering.wd-ordering-mb-icon::after {
		position: absolute;
		left: 13px;
		font-size: 15px;
		color: var(--hp-ink);
	}

	/* cards: two across; price on its own line, the action full width below */
	.woocommerce ul.products:not(.wd-carousel-container):not(.wd-carousel),
	.woocommerce .products.wd-products { gap: 12px !important; }
	.woocommerce .wd-product .product-wrapper > *:not(.product-element-top) { padding-inline: 10px; }
	.woocommerce .wd-product .wd-entities-title { font-size: 14px !important; line-height: 1.3; }
	.woocommerce .wd-product .wd-product-cats { font-size: 10.5px; }
	.woocommerce .wd-product .hp-card-foot {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 8px !important;
		padding: 6px 10px 12px !important;
	}
	.woocommerce .wd-product .hp-card-foot .price { font-size: 14px !important; text-align: left; }
	.woocommerce .wd-product .hp-cart-btn,
	.woocommerce .wd-product .hp-select-btn {
		width: 100% !important;
		min-width: 0 !important;
		height: 38px !important;
		min-height: 38px !important;
		border-radius: 999px !important;
		justify-content: center;
	}
	.woocommerce .wd-product .hp-select-btn { font-size: 13px !important; padding: 0 10px !important; }

	/* the hero band and sprigs, scaled for a phone */
	.hp-shop-hero h1 { font-size: 32px; }
	.hp-shop-hero p { font-size: 14px; }
	.hp-crumb { padding-inline: 16px; }
}

/* empty cart: the "Return to shop" button sits centred under the message */
.woocommerce-cart .return-to-shop { display: flex; justify-content: center; max-width: none; margin-inline: auto; }
