/*
 * Shop Redesign — Phase 3
 * "Dark Forest / Imperial Gold / Cream"
 * Loaded only on is_shop() / is_product_taxonomy() via NOVAMIRA_SHOP_REDESIGN.
 * Ported from design bundle styles.css (Shop Page + Product Card sections),
 * scoped under .eh-shop to avoid collisions with the Ecome theme and Home page.
 */

.eh-shop {
	--eh-forest-900: #0d2a20;
	--eh-forest-800: #14392c;
	--eh-forest-700: #1b4332;
	--eh-herb-600: #2d6a4f;
	--eh-herb-500: #3b8466;
	--eh-gold-600: #b78712;
	--eh-gold-500: #d4a017;
	--eh-gold-400: #e6bf4f;
	--eh-cream-50: #faf7f1;
	--eh-cream-100: #f8f5f0;
	--eh-cream-200: #efe8d9;
	--eh-ink-900: #14201a;
	--eh-ink-700: #2f3a32;
	--eh-ink-500: #6b7368;
	--eh-line: rgba(20, 32, 26, 0.12);
	--eh-line-dark: rgba(243, 228, 182, 0.18);
	--eh-font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
	--eh-font-body: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;

	font-family: var(--eh-font-body);
	color: var(--eh-ink-700);
	background: var(--eh-cream-50);
}

.eh-shop *,
.eh-shop *::before,
.eh-shop *::after { box-sizing: border-box; }

.eh-shop img { max-width: 100%; height: auto; display: block; }
.eh-shop a { color: inherit; text-decoration: none; }
.eh-shop button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.eh-shop h1, .eh-shop h2, .eh-shop h3, .eh-shop h4 {
	font-family: var(--eh-font-display);
	color: var(--eh-forest-900);
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0;
}

.eh-shop .eh-container {
	max-width: 1360px;
	margin: 0 auto;
	padding: 0 40px;
}
@media (max-width: 720px) { .eh-shop .eh-container { padding: 0 20px; } }

/* === Page Head === */
.eh-page-head {
	background: var(--eh-forest-900);
	color: var(--eh-cream-100);
	padding: 90px 0 80px;
	position: relative;
	overflow: hidden;
}
.eh-page-head::before {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(45, 106, 79, 0.4), transparent 60%);
}
.eh-page-head__inner {
	position: relative;
	display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end;
}
.eh-page-head h1 { color: var(--eh-cream-100); font-size: clamp(48px, 6vw, 88px); font-weight: 400; }
.eh-page-head h1 .gold { color: var(--eh-gold-500); font-style: italic; font-weight: 400; }
.eh-page-head .eh-breadcrumbs {
	font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
	color: rgba(243, 228, 182, 0.55); margin-bottom: 20px;
}
.eh-page-head .eh-breadcrumbs a { color: var(--eh-gold-400); }
.eh-page-head .eh-breadcrumbs .sep { margin: 0 12px; opacity: 0.5; }
.eh-page-head .eh-head-meta { text-align: right; }
.eh-page-head .eh-head-meta p { color: rgba(243, 228, 182, 0.65); margin: 0 0 14px; }
.eh-page-head .eh-stats { display: flex; gap: 30px; justify-content: flex-end; }
.eh-page-head .eh-stat-pair .n {
	font-family: var(--eh-font-display); font-size: 42px; color: var(--eh-gold-500); display: block; line-height: 1;
}
.eh-page-head .eh-stat-pair .l {
	font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
	color: rgba(243, 228, 182, 0.5); margin-top: 6px; display: block;
}
@media (max-width: 800px) {
	.eh-page-head__inner { grid-template-columns: 1fr; }
	.eh-page-head .eh-head-meta { text-align: left; }
	.eh-page-head .eh-stats { justify-content: flex-start; }
}

/* === Shop Layout === */
.eh-shop-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 60px;
	padding: 70px 0 100px;
}
@media (max-width: 960px) { .eh-shop-layout { grid-template-columns: 1fr; gap: 24px; } }

/* === Sidebar === */
.eh-sidebar { position: sticky; top: 100px; align-self: start; }
@media (max-width: 960px) { .eh-sidebar { position: static; } }
.eh-sb-block { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--eh-line); }
.eh-sb-block:last-child { border-bottom: 0; }
.eh-sb-block h4 {
	font-family: var(--eh-font-body);
	font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase;
	color: var(--eh-forest-900); margin: 0 0 18px;
	display: flex; align-items: center; justify-content: space-between;
}
.eh-sb-block h4::after { content: ""; flex: 1; height: 1px; background: var(--eh-line); margin-left: 14px; }

.eh-sb-search {
	display: flex; align-items: center; gap: 10px;
	border: 1px solid var(--eh-line); padding: 12px 14px;
	background: var(--eh-cream-50); transition: border-color .2s;
}
.eh-sb-search:focus-within { border-color: var(--eh-forest-700); }
.eh-sb-search svg { width: 16px; height: 16px; color: var(--eh-ink-500); flex-shrink: 0; }
.eh-sb-search input {
	border: 0; background: transparent; outline: none; width: 100%;
	font: inherit; color: var(--eh-ink-700); font-size: 14px;
}
.eh-sb-search input::placeholder { color: var(--eh-ink-500); }
.eh-sb-search button { display: flex; }

/* Category / Part-Used lists */
.eh-cat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.eh-cat-list li { margin: 0; }
.eh-cat-list a {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px 0 10px 12px; margin-left: -12px;
	font-size: 14px; transition: color .2s;
	border-left: 2px solid transparent;
}
.eh-cat-list a:hover { color: var(--eh-herb-600); }
.eh-cat-list li.active a { color: var(--eh-forest-900); font-weight: 700; border-left-color: var(--eh-gold-500); }
.eh-cat-list .ct { font-size: 11px; color: var(--eh-ink-500); letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }

/* Price filter */
.eh-price-display { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--eh-ink-700); margin-bottom: 12px; }
.eh-price-display .label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--eh-ink-500); font-weight: 700; }
.eh-price-display .pv { font-family: var(--eh-font-display); font-size: 18px; color: var(--eh-forest-900); font-variant-numeric: tabular-nums; }
.eh-price-fields { display: flex; align-items: center; gap: 10px; }
.eh-price-fields input {
	width: 100%; border: 1px solid var(--eh-line); background: var(--eh-cream-50);
	padding: 9px 10px; font: inherit; font-size: 13px; color: var(--eh-ink-700); outline: none;
	font-variant-numeric: tabular-nums;
}
.eh-price-fields input:focus { border-color: var(--eh-forest-700); }
.eh-price-fields .dash { color: var(--eh-ink-500); }
.eh-price-apply {
	margin-top: 12px; width: 100%; padding: 11px;
	font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
	border: 1px solid var(--eh-forest-700); color: var(--eh-forest-700); background: transparent;
	transition: all .2s;
}
.eh-price-apply:hover { background: var(--eh-forest-900); color: var(--eh-cream-100); border-color: var(--eh-forest-900); }
.eh-price-note { font-size: 11px; color: var(--eh-ink-500); letter-spacing: 0.05em; margin-top: 10px; }
.eh-price-clear { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--eh-gold-600); border-bottom: 1px solid var(--eh-gold-500); }

/* Scientific Name dropdown */
.eh-sci-select {
	width: 100%;
	appearance: none; -webkit-appearance: none;
	border: 1px solid var(--eh-line); background: var(--eh-cream-50);
	padding: 11px 34px 11px 12px; font: inherit; font-size: 13px; color: var(--eh-ink-700);
	font-style: italic; cursor: pointer; outline: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
}
.eh-sci-select:focus { border-color: var(--eh-forest-700); }

/* Wholesale CTA */
.eh-sb-cta {
	background: var(--eh-forest-900); color: var(--eh-cream-100);
	padding: 26px 22px; margin-top: 20px;
	position: relative; overflow: hidden;
}
.eh-sb-cta::before {
	content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px;
	background: radial-gradient(circle, rgba(212, 160, 23, 0.25), transparent 70%);
}
.eh-sb-cta .tag { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--eh-gold-400); font-weight: 700; }
.eh-sb-cta h4 { font-family: var(--eh-font-display); font-size: 22px; color: var(--eh-cream-100); margin: 10px 0 18px; letter-spacing: 0; text-transform: none; font-weight: 500; display: block; }
.eh-sb-cta h4::after { display: none; }
.eh-sb-cta a { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: var(--eh-gold-400); border-bottom: 1px solid var(--eh-gold-500); padding-bottom: 4px; }

/* === Toolbar === */
.eh-shop-toolbar {
	display: flex; justify-content: space-between; align-items: center; gap: 24px;
	padding-bottom: 26px; border-bottom: 1px solid var(--eh-line); margin-bottom: 36px;
	flex-wrap: wrap;
}
.eh-shop-toolbar .count { font-size: 13px; color: var(--eh-ink-500); }
.eh-shop-toolbar .count strong { color: var(--eh-forest-900); font-weight: 700; }
.eh-toolbar-right { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.eh-sort-select {
	position: relative;
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
	color: var(--eh-forest-900);
	border: 1px solid var(--eh-line); background: var(--eh-cream-50);
}
.eh-sort-select select {
	appearance: none; -webkit-appearance: none;
	font: inherit; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
	color: var(--eh-forest-900); background: transparent; border: 0; outline: none;
	padding: 12px 38px 12px 18px; cursor: pointer;
}
.eh-sort-select svg { position: absolute; right: 16px; width: 12px; height: 12px; pointer-events: none; }

.eh-filter-toggle {
	display: none;
	align-items: center; gap: 10px;
	font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
	color: var(--eh-forest-900); border: 1px solid var(--eh-line); background: var(--eh-cream-50);
	padding: 12px 18px;
}
.eh-filter-toggle svg { width: 14px; height: 14px; }

/* === Product Grid === */
.eh-shop-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}
@media (max-width: 960px) { .eh-shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .eh-shop-grid { grid-template-columns: 1fr; } }

.eh-pc {
	background: var(--eh-cream-50);
	position: relative;
	display: flex; flex-direction: column;
	transition: all .3s ease;
	border: 1px solid transparent;
}
.eh-pc:hover { border-color: var(--eh-gold-500); }
.eh-pc:hover .eh-pc-actions { opacity: 1; transform: translateX(0); }
.eh-pc:hover .eh-pc-image { background: var(--eh-cream-100); }
.eh-pc:hover .eh-pc-illustration img { transform: scale(1.04); }

.eh-pc-image {
	position: relative;
	aspect-ratio: 1/1;
	background: var(--eh-cream-100);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
	border-bottom: 1px solid var(--eh-line);
	transition: background .3s;
}
.eh-pc-illustration { width: 100%; height: 100%; }
.eh-pc-illustration img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }

.eh-pc-badges {
	position: absolute; top: 16px; left: 16px;
	display: flex; flex-direction: column; gap: 6px; z-index: 2;
}
.eh-badge-tag {
	font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700;
	padding: 6px 10px;
	background: var(--eh-forest-900); color: var(--eh-gold-400);
	white-space: nowrap; align-self: flex-start;
}
.eh-badge-tag.gold { background: var(--eh-gold-500); color: var(--eh-forest-900); }
.eh-badge-tag.sale { background: #963; color: var(--eh-cream-100); }

.eh-pc-actions {
	position: absolute; top: 16px; right: 16px;
	display: flex; flex-direction: column; gap: 8px;
	opacity: 0; transform: translateX(10px); transition: all .25s ease; z-index: 3;
}
/* Each action is a uniform 38x38 box so nothing overlaps. */
.eh-pc-act {
	width: 38px; height: 38px; flex: 0 0 38px;
	background: var(--eh-cream-50); border: 1px solid var(--eh-line);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--eh-forest-700); transition: all .2s; cursor: pointer;
	padding: 0; margin: 0; overflow: hidden;
}
.eh-pc-act:hover { background: var(--eh-gold-500); color: var(--eh-forest-900); border-color: var(--eh-gold-500); }
.eh-pc-act svg { width: 16px; height: 16px; }
/* Collapse YITH wishlist's nested wrappers into the single box + hide its text label. */
.eh-pc-act--wishlist .yith-wcwl-add-to-wishlist,
.eh-pc-act--wishlist .yith-wcwl-add-button,
.eh-pc-act--wishlist .yith-wcwl-wishlistaddedbrowse,
.eh-pc-act--wishlist .yith-wcwl-wishlistexistsbrowse,
.eh-pc-act--wishlist .yith-wcwl-add-button a,
.eh-pc-act--wishlist a {
	margin: 0; padding: 0; width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	border: 0; background: transparent; color: inherit; line-height: 0;
}
.eh-pc-act--wishlist span,
.eh-pc-act--wishlist .feedback { display: none !important; }
/* YITH ships its heart SVG with a broken lowercase "viewbox" (browsers ignore it),
   so it won't scale to 16px like our eye/compare icons — it renders oversized and
   off-centre. Hide it and draw our own heart via a mask so all three icons match
   in size, weight and hover colour (currentColor). */
.eh-pc-act--wishlist svg,
.eh-pc-act--wishlist .yith-wcwl-icon-svg,
.eh-pc-act--wishlist img { display: none !important; }
.eh-pc-act--wishlist a::before {
	content: "";
	width: 16px; height: 16px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 1 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 1 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.eh-pc-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.eh-pc-botanical {
	font-family: var(--eh-font-display); font-style: italic; font-weight: 400;
	font-size: 13px; color: var(--eh-gold-600); letter-spacing: 0.02em;
}
.eh-pc-name {
	font-family: var(--eh-font-display); font-size: 22px; color: var(--eh-forest-900);
	font-weight: 500; line-height: 1.15; margin: 0;
}
.eh-pc-name a { color: inherit; }
.eh-pc-name a:hover { color: var(--eh-herb-600); }
/* B2C benefit highlight */
.eh-pc-benefit {
	font-size: 13px; line-height: 1.4; color: var(--eh-herb-600); font-weight: 700;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.eh-pc-size { font-size: 12px; color: var(--eh-ink-500); letter-spacing: 0.1em; text-transform: uppercase; }
/* Star rating — only rendered when a product has real reviews */
.eh-pc-rating { display: inline-flex; align-items: center; gap: 1px; color: var(--eh-gold-500); }
.eh-pc-rating svg { width: 14px; height: 14px; }
.eh-pc-rating-count { font-size: 11px; color: var(--eh-ink-500); margin-left: 6px; letter-spacing: 0.05em; }
.eh-pc-divider { height: 1px; background: var(--eh-line); margin: 6px 0; }
.eh-pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.eh-pc-price {
	font-family: var(--eh-font-display); font-size: 24px; color: var(--eh-forest-900); font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.eh-pc-price .currency { font-size: 13px; color: var(--eh-ink-500); margin-right: 2px; vertical-align: 1px; }
.eh-pc-price .old { font-size: 14px; color: var(--eh-ink-500); text-decoration: line-through; margin-right: 8px; }
.eh-pc-cart {
	padding: 10px 14px;
	font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
	border: 1px solid var(--eh-forest-700); color: var(--eh-forest-700); background: transparent;
	transition: all .2s; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.eh-pc-cart svg { width: 12px; height: 12px; }
.eh-pc-cart:hover, .eh-pc-cart.loading { background: var(--eh-forest-900); color: var(--eh-cream-100); border-color: var(--eh-forest-900); }
.eh-pc-cart.added { background: var(--eh-herb-600); color: var(--eh-cream-100); border-color: var(--eh-herb-600); }
.eh-pc-cart.disabled { opacity: 0.5; pointer-events: none; }
.eh-pc-cart--soldout { color: var(--eh-ink-500); border-color: var(--eh-line); }
.eh-pc-cart--soldout:hover { background: var(--eh-ink-500); color: var(--eh-cream-100); border-color: var(--eh-ink-500); }

/* === Pagination (paginate_links type=list markup) === */
.eh-pagination { margin-top: 60px; }
.eh-pagination ul.page-numbers {
	display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
	list-style: none; margin: 0; padding: 0;
}
.eh-pagination ul.page-numbers li { margin: 0; }
.eh-pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 6px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
	color: var(--eh-ink-700); border: 1px solid var(--eh-line); transition: all .2s;
}
.eh-pagination a.page-numbers:hover { border-color: var(--eh-forest-700); color: var(--eh-forest-900); }
.eh-pagination .page-numbers.current { background: var(--eh-forest-900); color: var(--eh-gold-400); border-color: var(--eh-forest-900); }
.eh-pagination .page-numbers.dots { border: 0; }
.eh-pagination .page-numbers.prev,
.eh-pagination .page-numbers.next { padding: 0 18px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }

/* === CTA Strip === */
.eh-cta-strip {
	background: var(--eh-forest-700);
	padding: 70px 0; color: var(--eh-cream-100);
	position: relative; overflow: hidden;
}
.eh-cta-strip::before {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(circle at 80% 50%, rgba(212, 160, 23, 0.18), transparent 50%);
}
.eh-cta-inner {
	position: relative;
	display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
}
.eh-cta-inner .eyebrow {
	font-family: var(--eh-font-body); text-transform: uppercase; letter-spacing: 0.28em;
	font-size: 11px; font-weight: 700; color: var(--eh-gold-400);
}
.eh-cta-inner h2 { color: var(--eh-cream-100); font-size: clamp(32px, 4vw, 52px); margin-top: 18px; }
.eh-cta-inner h2 .gold { color: var(--eh-gold-400); font-style: italic; }
.eh-cta-inner p { color: rgba(243, 228, 182, 0.7); margin: 16px 0 0; max-width: 500px; }
.eh-cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 800px) { .eh-cta-inner { grid-template-columns: 1fr; } }
.eh-btn {
	display: inline-flex; align-items: center; gap: 14px;
	padding: 16px 28px; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
	border: 1px solid transparent; transition: all 0.25s ease; white-space: nowrap;
}
.eh-btn-gold { background: var(--eh-gold-500); color: var(--eh-forest-900); border-color: var(--eh-gold-500); }
.eh-btn-gold:hover { background: var(--eh-gold-400); border-color: var(--eh-gold-400); transform: translateY(-1px); }
.eh-btn-ghost { background: transparent; color: var(--eh-cream-100); border-color: rgba(243, 228, 182, 0.4); }
.eh-btn-ghost:hover { border-color: var(--eh-gold-400); color: var(--eh-gold-400); }

/* === Mobile filter drawer === */
@media (max-width: 960px) {
	.eh-filter-toggle { display: inline-flex; }
	.eh-sidebar {
		display: none;
		order: -1;
		margin-bottom: 8px;
		padding: 24px; border: 1px solid var(--eh-line); background: var(--eh-cream-100);
	}
	.eh-sidebar.open { display: block; }
}

/* Hide any stray Ecome shop chrome that may slip through */
.eh-shop .ecome-shop-control,
.eh-shop .woocommerce-result-count,
.eh-shop .woocommerce-ordering { display: none; }
