/* ==========================================================================
   Haramain Pure - Components
   Depends on hp-design-system.css for tokens.

   Selectors follow Woodmart 7.x markup:
     .whb-header          header builder shell
     .wd-product          product card (grid + carousel)
     .btn / .button       buttons
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   Pill geometry, a real pressed state, and a shadow that grows on hover so
   the control feels physical rather than painted on.
   -------------------------------------------------------------------------- */

.btn, .button,
button[type="submit"],
input[type="submit"],
.single_add_to_cart_button,
.wc-block-components-button {
	border-radius: var(--hp-r-pill) !important;
	font-weight: 600;
	letter-spacing: .01em;
	padding: .85em 1.9em;
	border: 1px solid transparent;
	transition:
		background-color var(--hp-t-fast) var(--hp-ease-out),
		color            var(--hp-t-fast) var(--hp-ease-out),
		box-shadow       var(--hp-t-mid)  var(--hp-ease-out),
		transform        var(--hp-t-fast) var(--hp-ease-spring);
	will-change: transform;
}

.btn:hover, .button:hover,
button[type="submit"]:hover,
.single_add_to_cart_button:hover {
	transform: translateY(-2px);
	box-shadow: var(--hp-shadow-md);
}

/* Pressing should visibly commit - removes the "did that register?" pause. */
.btn:active, .button:active,
button[type="submit"]:active,
.single_add_to_cart_button:active {
	transform: translateY(0);
	box-shadow: var(--hp-shadow-xs);
	transition-duration: 60ms;
}

.btn-color-primary,
.single_add_to_cart_button,
.button.alt {
	background-color: var(--hp-green-800);
	color: var(--hp-white);
}
.btn-color-primary:hover,
.single_add_to_cart_button:hover,
.button.alt:hover {
	background-color: var(--hp-green-700);
	color: var(--hp-white);
}

/* Secondary: outlined, fills in on hover. */
.btn-style-bordered,
.btn-color-default {
	background-color: transparent;
	color: var(--hp-green-800);
	border-color: var(--hp-green-200);
}
.btn-style-bordered:hover,
.btn-color-default:hover {
	background-color: var(--hp-green-800);
	border-color: var(--hp-green-800);
	color: var(--hp-white);
}

/* --------------------------------------------------------------------------
   Product cards
   The single most important commerce component. Four changes:
   rounded frame, image zoom on hover, a lift that reads as "this is
   clickable", and price given real typographic weight.
   -------------------------------------------------------------------------- */

.wd-product {
	border-radius: var(--hp-r-md);
	background: var(--hp-white);
	transition:
		transform  var(--hp-t-mid) var(--hp-ease-spring),
		box-shadow var(--hp-t-mid) var(--hp-ease-out);
	overflow: hidden;
}

.wd-product:hover {
	transform: translateY(-6px);
	box-shadow: var(--hp-shadow-lg);
}

.wd-product .product-element-top {
	border-radius: var(--hp-r-sm);
	overflow: hidden;                 /* clips the zoom */
	background: var(--hp-green-50);   /* tinted backdrop for cut-out product shots */
}

.wd-product .product-image-link img,
.wd-product .attachment-woocommerce_thumbnail {
	transition: transform var(--hp-t-slow) var(--hp-ease-out);
	will-change: transform;
}
.wd-product:hover .product-image-link img {
	transform: scale(1.06);
}

.wd-product .wd-entities-title {
	font-size: 1.02em;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -.01em;
}
.wd-product .wd-entities-title a { color: var(--hp-ink); }
.wd-product:hover .wd-entities-title a { color: var(--hp-green-800); }

.wd-product .wd-product-cats,
.wd-product .woocommerce-loop-product__category {
	font-size: .78em;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hp-ink-mute);
}

.wd-product .price {
	font-size: 1.06em;
	font-weight: 700;
	color: var(--hp-green-800);
}
.wd-product .price del { color: var(--hp-ink-mute); font-weight: 400; opacity: .7; }
.wd-product .price ins { text-decoration: none; }

/* Badges: pill, tinted, no shouting red. */
.product-labels .product-label {
	border-radius: var(--hp-r-pill);
	padding: .35em .85em;
	font-size: .72em;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	box-shadow: var(--hp-shadow-xs);
}
.product-labels .onsale     { background: var(--hp-honey);     color: var(--hp-white); }
.product-labels .out-of-stock { background: var(--hp-ink-mute); color: var(--hp-white); }
.product-labels .new        { background: var(--hp-green-600); color: var(--hp-white); }

/* Hover action icons slide in rather than appear. */
.wd-product .wd-buttons {
	border-radius: var(--hp-r-pill);
	box-shadow: var(--hp-shadow-sm);
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Header
   Soft shell, blurred when stuck. The old header sat as a hard white box
   over a full-bleed hero, which read as two unrelated layers.
   -------------------------------------------------------------------------- */

.whb-header {
	transition: box-shadow var(--hp-t-mid) var(--hp-ease-out),
	            background-color var(--hp-t-mid) var(--hp-ease-out);
}

.whb-sticked .whb-main-header {
	box-shadow: var(--hp-shadow-md);
	background-color: rgba(255, 255, 255, .86);
	backdrop-filter: saturate(160%) blur(12px);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
}

/* Animated underline on nav items - grows from the centre. */
.whb-header .wd-nav > li > a {
	position: relative;
	font-weight: 500;
}
.whb-header .wd-nav > li > a::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: .35em;
	width: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--hp-green-600);
	transform: translateX(-50%);
	transition: width var(--hp-t-mid) var(--hp-ease-out);
}
.whb-header .wd-nav > li > a:hover::after,
.whb-header .wd-nav > li.current-menu-item > a::after {
	width: calc(100% - 1.6em);
}

/* Cart / wishlist counters. */
.wd-tools-element .wd-tools-count {
	background: var(--hp-green-600);
	color: var(--hp-white);
	border-radius: var(--hp-r-pill);
	font-weight: 700;
	box-shadow: 0 0 0 2px var(--hp-white);
}

/* --------------------------------------------------------------------------
   Section headings
   A short rule under the title gives sections a deliberate rhythm.
   -------------------------------------------------------------------------- */

.wd-title-wrapp .title,
.title-wrapper .woodmart-title-container {
	position: relative;
}
.title-wrapper.wd-title-line-aside .liner-continer::after,
.wd-title-wrapp .title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: var(--hp-s-4) auto 0;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--hp-green-600), var(--hp-green-300));
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

input[type="text"], input[type="email"], input[type="tel"],
input[type="search"], input[type="password"], input[type="number"],
textarea, select, .select2-container .select2-selection {
	border-radius: var(--hp-r-sm) !important;
	border: 1px solid var(--hp-line);
	background: var(--hp-white);
	padding: .8em 1em;
	transition: border-color var(--hp-t-fast) var(--hp-ease-out),
	            box-shadow  var(--hp-t-fast) var(--hp-ease-out);
}
input:focus, textarea:focus, select:focus {
	border-color: var(--hp-green-500);
	box-shadow: var(--hp-shadow-ring);
	outline: none;
}

/* --------------------------------------------------------------------------
   Imagery and containers
   -------------------------------------------------------------------------- */

.wd-image img,
.woocommerce-product-gallery__image img,
.wp-post-image {
	border-radius: var(--hp-r-md);
}

.wd-product .wd-image img,
.wd-product .wp-post-image { border-radius: 0; } /* card already clips */

/* Alternating band for visual rhythm between sections. */
.hp-band-soft { background: var(--hp-green-50); }
.hp-band-deep { background: var(--hp-green-900); color: var(--hp-green-100); }
.hp-band-deep h1, .hp-band-deep h2, .hp-band-deep h3 { color: var(--hp-white); }

/* --------------------------------------------------------------------------
   Scroll reveal
   Elements start slightly low and transparent, then settle as they enter the
   viewport. The `.hp-motion` class is added to <html> by JS, so with
   JavaScript unavailable nothing is ever hidden.
   -------------------------------------------------------------------------- */

.hp-motion .hp-reveal {
	opacity: 0;
	transform: translateY(22px);
	transition:
		opacity   var(--hp-t-slow) var(--hp-ease-out),
		transform var(--hp-t-slow) var(--hp-ease-out);
}
.hp-motion .hp-reveal.hp-in {
	opacity: 1;
	transform: none;
}

/* Children stagger, so a product row arrives as a wave not a block. */
.hp-motion .hp-stagger > * {
	opacity: 0;
	transform: translateY(18px);
	transition:
		opacity   var(--hp-t-slow) var(--hp-ease-out),
		transform var(--hp-t-slow) var(--hp-ease-out);
	transition-delay: calc(var(--hp-i, 0) * 70ms);
}
.hp-motion .hp-stagger.hp-in > * { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Ambient background
   A very low-contrast pair of green orbs behind pale sections. Fixed
   attachment and pure CSS gradients - no images, no paint cost worth
   measuring, and invisible enough never to fight the product photography.
   -------------------------------------------------------------------------- */

.hp-ambient {
	position: relative;
	isolation: isolate;
}
.hp-ambient::before,
.hp-ambient::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .5;
	pointer-events: none;
}
.hp-ambient::before {
	width: 42vw; height: 42vw;
	max-width: 620px; max-height: 620px;
	top: -12%; left: -10%;
	background: radial-gradient(circle, var(--hp-green-200), transparent 68%);
}
.hp-ambient::after {
	width: 34vw; height: 34vw;
	max-width: 480px; max-height: 480px;
	bottom: -14%; right: -8%;
	background: radial-gradient(circle, var(--hp-green-100), transparent 70%);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

/* Woodmart paints the footer #111 from its inline theme-options CSS, which
   outranks a bare `.footer-container`. Adding the colour-scheme class the
   theme itself puts on the element takes the specificity to 0-2-0 and wins,
   without resorting to !important. */
.footer-container,
.footer-container.color-scheme-light {
	background-color: var(--hp-green-950);
	color: var(--hp-green-200);
	position: relative;
}

/* Hairline of brand green along the top edge - stops the footer reading as a
   black slab bolted onto the page. */
.footer-container::before {
	content: "";
	position: absolute; inset: 0 0 auto 0; height: 3px;
	background: linear-gradient(90deg,
		var(--hp-green-800) 0%, var(--hp-green-500) 35%,
		var(--hp-green-300) 65%, var(--hp-green-800) 100%);
}

.footer-container a { color: var(--hp-green-200); }
.footer-container a:hover { color: var(--hp-white); }

/* --- Spacing -------------------------------------------------------------
   The main complaint about the old footer was that text ran into the edges.
   Woodmart's footer container carries almost no horizontal padding, and its
   columns sit flush. Both are fixed here, with fluid values so the gutter
   scales rather than snapping at breakpoints. */
.footer-container > .container,
.footer-container .container,
.footer-container .copyrights-wrapper > .container {
	padding-inline: clamp(20px, 5vw, 64px) !important;
	max-width: 1480px;
}

/* Woodmart's footer is a WPBakery layout, and its rows carry the usual -15px
   negative gutter. Left alone that pulls the first column back outside the
   padding just added, which is what put the logo hard against the edge. */
.footer-container .vc_row.wpb_row { margin-inline: 0; }
.footer-container .wpb_column { padding-inline: clamp(8px, 1.4vw, 20px); }
.footer-container .main-footer {
	padding-block: clamp(48px, 6vw, 84px) clamp(32px, 4vw, 52px);
}
.footer-container .footer-column,
.footer-container .wd-widget {
	margin-bottom: clamp(24px, 3vw, 40px);
}

/* --- Typography ----------------------------------------------------------
   Widget titles become small tracked caps rather than competing headings,
   which is what made the old footer read as a wall of similar-sized text. */
.footer-container .widget-title,
.footer-container h1, .footer-container h2,
.footer-container h3, .footer-container h4 {
	color: var(--hp-white);
	letter-spacing: .1em;
	text-transform: uppercase;
	font-size: .78rem;
	font-weight: 700;
	margin-bottom: var(--hp-s-5);
	opacity: .92;
}

.footer-container .wd-widget,
.footer-container p,
.footer-container li {
	font-size: .94rem;
	line-height: 1.75;
	color: rgba(180, 224, 208, .82);
}

/* Generous row spacing - link lists were the most cramped part. */
.footer-container .menu li,
.footer-container .wd-widget ul li {
	margin-bottom: var(--hp-s-3);
	border: 0;
	padding: 0;
}

/* Links: nudge right on hover instead of only changing colour. */
.footer-container .wd-widget a,
.footer-container .menu a {
	position: relative;
	display: inline-block;
	text-decoration: none;
	transition: color var(--hp-t-fast) var(--hp-ease-out), transform var(--hp-t-fast) var(--hp-ease-out);
}
.footer-container .wd-widget a:hover,
.footer-container .menu a:hover { transform: translateX(4px); color: var(--hp-white); }

/* --- Copyright bar -------------------------------------------------------- */
.copyrights-wrapper,
.footer-container .copyrights-wrapper {
	border-top: 1px solid rgba(180, 224, 208, .14);
	background-color: transparent;
	padding-block: var(--hp-s-5);
	font-size: .87rem;
	color: rgba(180, 224, 208, .62);
}
.copyrights-wrapper strong { color: var(--hp-white); font-weight: 600; }

/* Separator dots between the copyright links. */
.copyrights-wrapper .hp-sep {
	display: inline-block;
	margin-inline: var(--hp-s-3);
	color: rgba(180, 224, 208, .35);
}

/* Payment icons were floating unaligned at the far edge. */
.copyrights-wrapper img { opacity: .8; transition: opacity var(--hp-t-fast) var(--hp-ease-out); }
.copyrights-wrapper img:hover { opacity: 1; }

/* The footer logo is dark artwork on a dark ground - force it to white the
   same way the landing header does. */
.footer-container .wd-logo img,
.footer-container .wd-footer-logo img { filter: brightness(0) invert(1); opacity: .92; }

/* --------------------------------------------------------------------------
   Prefooter ("Connect with Us")

   This block is WPBakery content sitting in Woodmart's .wd-prefooter, not
   theme markup - so its structure and copy are edited in wp-admin, not here.
   What CSS can do is replace the flat #f3f3f3 band with the brand wash and
   give it the same rounded, soft treatment as the rest of the design.
   -------------------------------------------------------------------------- */

.wd-prefooter { background-color: var(--hp-white); }

.wd-prefooter .vc_row.vc_row-has-fill,
.wd-prefooter .wpb_row.vc_row-has-fill {
	/* Soft brand wash with a hint of depth instead of the flat #f3f3f3 slab. */
	background:
		radial-gradient(90% 140% at 8% 0%, var(--hp-green-100) 0%, transparent 62%),
		var(--hp-green-50) !important;
	border-radius: var(--hp-r-xl);
	overflow: hidden;
	margin-inline: clamp(16px, 4vw, 56px);
	margin-block: clamp(24px, 4vw, 56px);
	/* The old block ran text hard against its edges. */
	padding: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 56px) !important;
	box-shadow: var(--hp-shadow-sm);
}

.wd-prefooter h1, .wd-prefooter h2, .wd-prefooter h3 {
	color: var(--hp-green-900);
	letter-spacing: -.03em;
	line-height: 1.12;
	font-size: clamp(1.6rem, 2.6vw, 2.5rem);
	margin-bottom: var(--hp-s-4);
	text-transform: none;
}

.wd-prefooter p {
	font-size: 1.02rem;
	line-height: 1.7;
	color: var(--hp-ink-soft);
	max-width: 52ch;
}

/* Give the column content vertical centring - the image and text were
   top-aligned against each other, which is what made it look unbalanced. */
.wd-prefooter .vc_row.vc_row-has-fill > .wpb_column,
.wd-prefooter .wpb_row.vc_row-has-fill > .wpb_column {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* The trailing "Contact Us" link in that block is plain inline text; give it
   a real affordance so it reads as the action it is. */
.wd-prefooter a:not(.btn):not(.button) {
	color: var(--hp-green-700);
	font-weight: 600;
	border-bottom: 2px solid var(--hp-green-300);
	transition: border-color var(--hp-t-fast) var(--hp-ease-out), color var(--hp-t-fast) var(--hp-ease-out);
}
.wd-prefooter a:not(.btn):not(.button):hover {
	color: var(--hp-green-900);
	border-bottom-color: var(--hp-green-700);
}

/* --------------------------------------------------------------------------
   Responsive
   Woodmart is already responsive; these are corrections where the stock
   breakpoints leave the layout awkward on this content.
   -------------------------------------------------------------------------- */

/* Tablet: tighten section rhythm. */
@media (max-width: 1024px) {
	:root { --hp-section-y: clamp(40px, 6vw, 72px); }
}

/* Phones. */
@media (max-width: 768px) {
	.wd-product:hover {
		transform: none;             /* no hover on touch - it sticks */
		box-shadow: var(--hp-shadow-sm);
	}
	.wd-product { box-shadow: var(--hp-shadow-xs); }

	/* Product titles need room to breathe in a 2-up grid. */
	.wd-product .wd-entities-title { font-size: .96em; }

	/* Buttons go comfortably tappable and full width where they stack. */
	.btn, .button { padding: .9em 1.5em; }
	.single_add_to_cart_button { width: 100%; justify-content: center; }

	/* The ambient orbs are large relative to a phone viewport - shrink and
	   fade so they never compete with content. */
	.hp-ambient::before, .hp-ambient::after { opacity: .35; filter: blur(48px); }
}

/* Small phones. Note 375px covers a large share of iPhones still in use, so
   this threshold is deliberately below that - nothing is hidden at 375. */
@media (max-width: 340px) {
	:root { --hp-section-y: 36px; }
	.wd-product .wd-entities-title { font-size: .9em; }
}

/* Wide screens: stop full-bleed sections stretching text to unreadable
   measures on 1920px+ displays. */
@media (min-width: 1600px) {
	.container, .wd-content-layout {
		max-width: 1480px;
	}
}
