/*
Theme Name: HiTech
Description: Enterprise RTL storefront theme for HiTech smart building equipment (WooCommerce, light/dark).
Version: 1.0.0
Text Domain: hitech
*/

@font-face {
	font-family: "IRANYekanX";
	src: url("assets/fonts/IRANYekanXFaNum-Regular.woff2") format("woff2");
	font-weight: 100 900; /* single regular file; browser synthesizes bold */
	font-display: swap;
}

:root {
	--bg: #f5f7fb;
	--surface: #ffffff;
	--surface-2: #eef2f9;
	--text: #0d1b36;
	--muted: #5b6b86;
	--line: #e1e7f1;
	--brand: #1747c9;
	--brand-2: #0b2a6b;
	--accent: #1aa3e8;
	--green: #2ea84a;
	--on-brand: #ffffff;
	--danger: #d93a3a;
	--shadow: 0 1px 2px rgba(13, 27, 54, .05), 0 8px 24px rgba(13, 27, 54, .07);
	--shadow-lg: 0 24px 60px rgba(11, 42, 107, .18);
	--hero-bg: radial-gradient(1200px 500px at 85% -10%, #dbe7ff 0%, transparent 60%), linear-gradient(180deg, #f8faff, #eef3fc);
	--radius: 16px;
	--radius-sm: 10px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #070d1c; --surface: #0e1830; --surface-2: #14213f; --text: #e8eefb; --muted: #95a4c3; --line: #1f2d4f;
		--brand: #4d7dff; --brand-2: #0b2a6b; --accent: #38bdf8; --green: #4ade80;
		--shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
		--hero-bg: radial-gradient(1000px 500px at 85% -10%, rgba(77,125,255,.28) 0%, transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(56,189,248,.12) 0%, transparent 60%), #070d1c;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #070d1c; --surface: #0e1830; --surface-2: #14213f; --text: #e8eefb; --muted: #95a4c3; --line: #1f2d4f;
	--brand: #4d7dff; --brand-2: #0b2a6b; --accent: #38bdf8; --green: #4ade80;
	--shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
	--hero-bg: radial-gradient(1000px 500px at 85% -10%, rgba(77,125,255,.28) 0%, transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(56,189,248,.12) 0%, transparent 60%), #070d1c;
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 15px/1.9 "IRANYekanX", Tahoma, sans-serif;
	direction: rtl; -webkit-font-smoothing: antialiased;
	transition: background-color .3s, color .3s;
}
body, button, input, select, textarea, .wc-block-components-text-input input, .wp-block-woocommerce-checkout, .wp-block-woocommerce-cart { font-family: "IRANYekanX", Tahoma, sans-serif !important; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -40px; background: var(--brand); color: #fff; padding: 6px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }
.icon { flex: none; }
.section { padding-block: 56px; }
.eyebrow { display: inline-block; color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.meta { color: var(--muted); font-size: 13px; }

/* ---------- Buttons ---------- */
.btn, .button, button.button, a.button, .woocommerce .button, input[type=submit], .wc-block-components-button:not(.is-link) {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 20px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
	font-weight: 700; font-size: 14px; line-height: 1.6; transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary, .button, .woocommerce .button, .woocommerce a.button, .woocommerce button.button, input[type=submit], .wc-block-components-button:not(.is-link) {
	background: linear-gradient(135deg, var(--brand), var(--accent)); color: var(--on-brand) !important; background-color: var(--brand) !important;
	box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent);
}
.btn-primary:hover, .button:hover, .wc-block-components-button:not(.is-link):hover { transform: translateY(-1px); box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 45%, transparent); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-2); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn .icon { width: 18px; height: 18px; }
.button.loading { opacity: .7; }
.button.added::after { content: "✓"; }
.added_to_cart { display: none !important; } /* header badge + toast replace the "view cart" link */

/* ---------- Header ---------- */
.topbar { background: var(--brand-2); color: #c9d6f5; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; }
.topbar-in span, .topbar a { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.topbar .icon { width: 15px; height: 15px; }
.topbar-end { gap: 20px !important; }
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: var(--shadow); }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 44px; height: auto; }
.brand strong { display: block; font-size: 20px; line-height: 1.2; }
.brand small { color: var(--muted); font-size: 12px; }
.site-search { flex: 1; display: flex; max-width: 560px; margin-inline: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.site-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.site-search input { flex: 1; border: 0; background: none; color: var(--text); padding: 12px 16px; font-size: 14px; outline: none; min-width: 0; }
.site-search button { border: 0; background: none; color: var(--muted); padding: 0 14px; cursor: pointer; }
.header-actions { display: flex; gap: 8px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s, color .2s; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle .icon:last-child { display: none; }
:root[data-theme="dark"] .theme-toggle .icon:first-child { display: none; }
:root[data-theme="dark"] .theme-toggle .icon:last-child { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon:first-child { display: none; }
	:root:not([data-theme="light"]) .theme-toggle .icon:last-child { display: block; }
}
.cart-count { position: absolute; top: -6px; inset-inline-start: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; line-height: 20px; text-align: center; font-weight: 700; }
.cart-count[data-count="0"] { display: none; }
.cart-btn.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.18); } 60% { transform: scale(.95); } }
.nav-toggle { display: none; }
.primary-nav { border-top: 1px solid var(--line); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.primary-nav a { display: block; padding: 12px 14px; color: var(--text); font-size: 14px; font-weight: 600; position: relative; }
.primary-nav a::after { content: ""; position: absolute; inset-inline: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transition: transform .2s; }
.primary-nav a:hover { color: var(--brand); }
.primary-nav a:hover::after, .primary-nav .current-menu-item > a::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); border-bottom: 1px solid var(--line); }
.hero-glow { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(600px 400px at 25% 40%, #000, transparent); opacity: .6; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: 72px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.35; margin-bottom: 18px; }
.grad { background: linear-gradient(90deg, var(--brand), var(--accent) 60%, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 36px; }
.eyebrow-pill, .hero .eyebrow { background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 4px 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.stats { display: flex; gap: 36px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 28px; font-weight: 800; color: var(--text); }
.stats dd { margin: 0; color: var(--muted); font-size: 13px; }
.hero-visual { position: relative; }
.hero-card { aspect-ratio: 1; border-radius: 32px; background: linear-gradient(145deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 28px; display: grid; place-items: center; transform: rotate(-2deg); }
.hero-card img { border-radius: 20px; mix-blend-mode: multiply; }
:root[data-theme="dark"] .hero-card img { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-card img { mix-blend-mode: normal; } }
.float-chip { position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; animation: float 5s ease-in-out infinite; }
.float-chip .icon { color: var(--green); width: 18px; }
.chip-a { top: 10%; inset-inline-end: -12px; }
.chip-b { bottom: 10%; inset-inline-start: -16px; animation-delay: -2.5s; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent); }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -36px; position: relative; }
.feature { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.feature .icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.feature strong { display: block; font-size: 14px; }
.feature span { color: var(--muted); font-size: 12px; }

/* ---------- Section heads ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(22px, 2.4vw, 30px); margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.link-more .icon { width: 18px; transition: transform .2s; }
.link-more:hover .icon { transform: translateX(-4px); }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; color: var(--text); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.cat-card::before { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--accent), var(--green)); transform: scaleX(0); transition: transform .3s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--text); }
.cat-card:hover::before { transform: scaleX(1); }
.cat-card img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 10px; border-radius: 12px; background: #fff; }
.cat-name { font-weight: 800; font-size: 15px; }
.cat-count { color: var(--muted); font-size: 12px; }

/* ---------- Product grid (WooCommerce loop) ---------- */
.woocommerce ul.products, ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product, ul.products li.product {
	width: auto !important; margin: 0 !important; float: none !important;
	position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
ul.products li.product a img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 12px; margin: 0 0 12px !important; transition: transform .4s; }
ul.products li.product:hover a img { transform: scale(1.04); }
ul.products li.product .woocommerce-loop-product__link { color: var(--text); flex: 1; display: flex; flex-direction: column; overflow: hidden; }
ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; font-weight: 700; line-height: 1.8; padding: 0 !important; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.6em; }
ul.products li.product .price { margin-top: auto; color: var(--text) !important; font-weight: 800; font-size: 15px !important; display: block; margin-bottom: 12px; }
ul.products li.product .price del { color: var(--muted); font-weight: 400; font-size: 12px; }
ul.products li.product .price ins { text-decoration: none; }
.call-price { color: var(--accent); font-weight: 700; font-size: 14px; }
ul.products li.product .button { width: 100%; margin: 0 !important; }
ul.products li.product .button:not(.add_to_cart_button) { background: var(--surface-2) !important; color: var(--text) !important; box-shadow: none; border-color: var(--line); }
.onsale { position: absolute; top: 20px; inset-inline-start: 20px; z-index: 2; background: var(--danger) !important; color: #fff; border-radius: 8px !important; padding: 2px 10px !important; font-size: 12px !important; min-height: 0 !important; min-width: 0 !important; line-height: 1.8 !important; margin: 0 !important; }

/* ---------- Promo, brands, posts, CTA ---------- */
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.promo img { display: block; transition: transform .5s; }
.promo:hover img { transform: scale(1.03); }
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.brands a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 18px; font-weight: 800; color: var(--text); transition: border-color .2s, color .2s; }
.brands a:hover { border-color: var(--brand); color: var(--brand); }
.brands small { font-size: 12px; font-weight: 400; color: var(--muted); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-thumb { display: block; aspect-ratio: 16/10; background: #fff; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: contain; }
.post-body { padding: 18px 20px 22px; }
.post-body h3 { font-size: 17px; margin: 6px 0; }
.post-body h3 a { color: var(--text); }
.post-body p { color: var(--muted); font-size: 14px; margin: 0; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-block: 24px 64px; padding: 44px 48px; border-radius: 24px; color: #fff; background: radial-gradient(600px 300px at 10% 0%, rgba(56,189,248,.45), transparent 60%), linear-gradient(135deg, #0b2a6b, #1747c9); box-shadow: var(--shadow-lg); }
.cta h2 { font-size: 28px; }
.cta p { margin: 0; color: #c9d6f5; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Inner pages ---------- */
.page-hero { background: var(--hero-bg); border-bottom: 1px solid var(--line); padding: 40px 0 32px; }
.page-hero h1 { font-size: clamp(24px, 3vw, 36px); margin: 0; }
.woocommerce-breadcrumb { color: var(--muted) !important; font-size: 13px !important; margin-bottom: 8px !important; }
.woocommerce-breadcrumb a { color: var(--muted) !important; }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); }
.prose.narrow { max-width: 820px; margin-inline: auto; }
.prose h2 { font-size: 22px; margin-top: 1.4em; }
.prose h3 { font-size: 18px; }
.prose img { border-radius: 12px; }
.feature-img { display: block; margin: 0 auto 24px; max-height: 420px; width: auto; background: #fff; }
.pagination, .woocommerce-pagination { margin-top: 32px; text-align: center; }
.page-numbers { display: inline-flex; gap: 6px; list-style: none; padding: 0; border: 0 !important; }
.page-numbers li { border: 0 !important; }
a.page-numbers, span.page-numbers, .woocommerce-pagination .page-numbers a, .woocommerce-pagination .page-numbers span { display: inline-grid !important; place-items: center; min-width: 40px; height: 40px; padding: 0 10px !important; border-radius: 10px; border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--text) !important; }
.page-numbers.current { background: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; }

/* ---------- Shop ---------- */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.shop-layout.is-single { display: block; }
.shop-side { position: sticky; top: 140px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.shop-side h3 { font-size: 15px; }
.shop-side ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.shop-side ul ul { padding-inline-start: 14px; border-inline-start: 1px dashed var(--line); margin-block: 4px; }
.shop-side a { color: var(--text); display: inline-block; padding: 4px 0; }
.shop-side a:hover, .shop-side .current-cat > a { color: var(--brand); font-weight: 700; }
.shop-side .count { color: var(--muted); font-size: 12px; }
.woocommerce-result-count { color: var(--muted); font-size: 13px; margin: 0 0 20px !important; }
.woocommerce-ordering { margin: 0 0 20px !important; }
select, input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], textarea, .select2-container .select2-selection {
	background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-radius: 10px !important; padding: 8px 12px; font-size: 14px;
}
.shop-main ul.products { grid-template-columns: repeat(3, 1fr); }

/* Single product */
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(18px, 3vw, 36px); margin-top: 12px; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { width: auto !important; float: none !important; margin: 0 !important; }
.woocommerce div.product div.images img { background: #fff; border-radius: 16px; }
.woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related, .woocommerce div.product .upsells { grid-column: 1 / -1; }
.woocommerce div.product .product_title { font-size: clamp(22px, 2.4vw, 30px); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--brand) !important; font-size: 26px !important; font-weight: 800; }
.woocommerce div.product form.cart { display: flex; gap: 12px; align-items: stretch; margin: 20px 0 !important; }
.woocommerce div.product form.cart .button { flex: 1; padding: 12px 24px; font-size: 16px; }
.quantity .qty { width: 80px !important; height: 100%; text-align: center; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0 !important; margin: 0 0 20px !important; display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: none !important; border: 0 !important; margin: 0 !important; padding: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 10px 18px !important; color: var(--muted) !important; font-weight: 700; border-bottom: 2px solid transparent; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--brand) !important; border-color: var(--brand); }
.woocommerce-Tabs-panel { color: var(--text); }
.woocommerce-Tabs-panel h2 { font-size: 20px; }
.woocommerce-Tabs-panel table { width: 100%; border-collapse: collapse; }
.woocommerce-Tabs-panel td, .woocommerce-Tabs-panel th { border: 1px solid var(--line); padding: 8px 12px; }
.product_meta { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; }
.product_meta > span { display: block; }
.stock.in-stock { color: var(--green) !important; font-weight: 700; }
.inquiry { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 14px; padding: 16px 18px; margin: 16px 0; }
.inquiry p { margin: 0 0 10px; color: var(--muted); }
.related > h2 { font-size: 22px; margin-top: 12px; }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-inline-start: 4px solid var(--green) !important; border-top: 0 !important; border-radius: 12px; padding: 14px 18px 14px 18px !important; list-style: none; box-shadow: var(--shadow); }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none; }
.woocommerce-error { border-inline-start-color: var(--danger) !important; }
.woocommerce-message .button { float: left; padding: 4px 14px; }

/* Block cart / checkout follow theme tokens */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { color: var(--text); }
.wc-block-components-sidebar, .wc-block-cart__sidebar, .wc-block-checkout__sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px !important; }
.wc-block-components-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px !important; }
.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input, .wc-blocks-components-select__select, .wc-block-components-textarea { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; border-radius: 10px !important; }
.wc-block-components-text-input label, .wc-blocks-components-select__label, .wc-block-components-combobox label { color: var(--muted) !important; }
.wc-block-components-product-name, .wc-block-components-totals-item, .wc-block-components-title { color: var(--text) !important; }
.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option { border-color: var(--line) !important; }
.wc-block-cart-item__image img { background: #fff; border-radius: 10px; }
.wc-block-components-quantity-selector { border-color: var(--line) !important; border-radius: 10px !important; }
.wc-block-components-quantity-selector input, .wc-block-components-quantity-selector button { color: var(--text) !important; background: transparent !important; }
.wc-block-cart .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { width: 100%; padding: 14px !important; font-size: 16px !important; }
.wp-block-woocommerce-empty-cart-block .wp-block-product-new { margin-top: 24px; }

/* My account */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content { width: auto !important; float: none !important; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
.woocommerce-MyAccount-navigation a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text); }
.woocommerce-MyAccount-navigation .is-active a { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 700; }
.woocommerce-account:not(.logged-in) .woocommerce { display: block; max-width: 900px; margin: auto; }
.woocommerce form.login, .woocommerce form.register { border: 1px solid var(--line) !important; border-radius: var(--radius) !important; background: var(--surface); }
.u-columns.col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.u-columns .col-1, .u-columns .col-2 { width: auto !important; float: none !important; }
.woocommerce table.shop_table { border-color: var(--line) !important; border-radius: 12px; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--line) !important; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-cards { display: grid; gap: 14px; }
.contact-card { display: flex; gap: 14px; background: var(--surface-2); border-radius: 14px; padding: 16px; }
.contact-card .icon { color: var(--brand); width: 28px; height: 28px; }
.wpcf7 input:not([type=submit]), .wpcf7 textarea { width: 100%; padding: 12px 14px; }
.wpcf7 p { margin: 0 0 14px; }
.wpcf7 label { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: #061232; color: #b6c3e2; margin-top: 40px; }
.site-footer .brand, .site-footer h3 { color: #fff; }
.site-footer .brand small { color: #8fa1c8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 36px; padding-block: 56px 36px; }
.site-footer p { font-size: 14px; }
.site-footer h3 { font-size: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: #b6c3e2; }
.site-footer a:hover { color: #fff; }
.contact-list li { display: flex; gap: 8px; align-items: flex-start; }
.contact-list .icon { width: 18px; color: var(--accent); margin-top: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-block: 18px; font-size: 13px; color: #8fa1c8; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.woocommerce ul.products, ul.products, .cat-grid { grid-template-columns: repeat(3, 1fr); }
	.features { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.shop-layout { grid-template-columns: 1fr; }
	.shop-side { position: static; }
}
@media (max-width: 860px) {
	.hero-in { grid-template-columns: 1fr; padding-block: 44px 64px; }
	.hero-visual { max-width: 380px; margin-inline: auto; }
	.woocommerce div.product, .contact-grid, .u-columns.col2-set, .woocommerce-account .woocommerce { grid-template-columns: 1fr; }
	.post-grid { grid-template-columns: 1fr 1fr; }
	.nav-toggle { display: inline-grid; }
	.site-search { order: 3; flex-basis: 100%; max-width: none; }
	.header-in { flex-wrap: wrap; gap: 12px; padding-block: 10px; }
	.header-actions { margin-inline-start: auto; }
	.primary-nav { display: none; }
	.nav-open .primary-nav { display: block; }
	.primary-nav ul { flex-direction: column; padding-block: 8px; }
	.promo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.woocommerce ul.products, ul.products, .shop-main ul.products, .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	ul.products li.product { padding: 10px; }
	.features, .post-grid, .footer-grid { grid-template-columns: 1fr; }
	.hide-sm { display: none !important; }
	.stats { gap: 22px; }
	.cta { padding: 28px 22px; }
	.section-head { flex-direction: column; align-items: start; }
	.brand small { display: none; }
	.float-chip { display: none; }
}

/* Archive title already shown in page hero */
.shop-main .woocommerce-products-header { display: none; }
/* Logo artwork has dark strokes; give it a light tile so it reads on dark surfaces */
.brand img { background: #fff; border-radius: 10px; padding: 3px; }
.site-search input[type=search] { border: 0 !important; background: none !important; border-radius: 0 !important; }
@media (max-width: 1080px) { .shop-side { order: 2; } .shop-layout { display: flex; flex-direction: column; } .shop-main { width: 100%; } }
.shop-main > .page-title, .shop-main > h1 { display: none; }
.contact-cards { align-content: start; }
.contact-card p { margin: 0; }

/* Squircle add-to-cart in product cards: price on the right, icon button on the left */
ul.products li.product { padding-bottom: 14px; }
ul.products li.product .price { margin-bottom: 0; min-height: 52px; display: flex !important; align-items: center; padding-inline-end: 64px; flex-wrap: wrap; gap: 0 6px; }
ul.products li.product .button {
	position: absolute; inset-inline-end: 14px; bottom: 14px;
	width: 52px !important; height: 52px; padding: 0 !important; display: grid !important; place-items: center;
	border-radius: 18px;
}
@supports (corner-shape: squircle) {
	ul.products li.product .button { border-radius: 50%; corner-shape: squircle; }
}
ul.products li.product .button .icon { width: 22px; height: 22px; }
ul.products li.product .button:not(.add_to_cart_button) .icon { color: var(--brand); }
ul.products li.product .button.loading .icon { animation: spin .8s linear infinite; }
ul.products li.product .button.added::after { content: none; }
ul.products li.product .button.added { background: var(--green) !important; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Button labels never wrap */
.btn, .button, .wc-block-components-button { white-space: nowrap; }
/* Related products: 4 columns, normal card price size */
.woocommerce div.product .related ul.products { grid-template-columns: repeat(4, 1fr); }
.woocommerce div.product .related ul.products li.product .price { font-size: 15px !important; color: var(--text) !important; }
@media (max-width: 1080px) { .woocommerce div.product .related ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .woocommerce div.product .related ul.products { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Hero slider (inside existing .hero-card) ---------- */
.hero-card { position: relative; overflow: hidden; padding: 0; display: block; }
.hero-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; height: 100%; margin: 0; padding: 28px 28px 56px; display: grid; place-items: center; scroll-snap-align: center; position: relative; }
.hero-slide > img, .hero-slide > a { display: grid; place-items: center; width: 100%; height: 100%; }
.hero-slide img { width: 100%; height: 100%; object-fit: contain; border-radius: 20px; mix-blend-mode: multiply; }
.hero-slide:first-child { padding-bottom: 28px; }
.hero-slide figcaption { position: absolute; inset-inline: 28px; bottom: 44px; text-align: center; font-size: 13px; font-weight: 700; }
.hero-slide figcaption a { display: inline-block; max-width: 100%; padding: 6px 14px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .hero-slide img { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-slide img { mix-blend-mode: normal; } }
.hero-dots { position: absolute; bottom: 16px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: color-mix(in srgb, var(--muted) 45%, transparent); cursor: pointer; transition: width .3s, background .3s; }
.hero-dots button[aria-selected="true"] { width: 24px; background: var(--brand); }
.hero-track { cursor: grab; user-select: none; -webkit-user-select: none; }
.hero-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.hero-track img { -webkit-user-drag: none; pointer-events: none; }
.hero-slide figcaption a { pointer-events: auto; }

/* Mobile overflow fix: let grid items shrink below their content width */
ul.products > li, .woocommerce ul.products > li,
.cat-grid > *, .features > *, .hero-in > *, .footer-grid > * { min-width: 0; }
ul.products li.product .woocommerce-loop-product__title { overflow-wrap: anywhere; }
