/* Legnara theme styles that theme.json cannot express. Colours come from the theme.json palette. */
:root {
	--lg-ground: var(--wp--preset--color--ground);
	--lg-surface: var(--wp--preset--color--surface);
	--lg-panel: var(--wp--preset--color--panel);
	--lg-ink: var(--wp--preset--color--ink);
	--lg-muted: var(--wp--preset--color--muted);
	--lg-line: var(--wp--preset--color--line);
	--lg-brand: var(--wp--preset--color--brand);
	--lg-deep: var(--wp--preset--color--brand-deep);
	--lg-good: var(--wp--preset--color--good);
	--lg-good-soft: var(--wp--preset--color--good-soft);
	--lg-mono: var(--wp--preset--font-family--mono);
	--lg-radius: 8px;
}
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--lg-brand); outline-offset: 3px; }

/* ---------- labels ---------- */
.lg-eyebrow, .lg-footer h4.lg-eyebrow, .lg-card-cat, .lg-pdp__summary .wp-block-post-terms {
	font-family: var(--lg-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lg-muted);
}
.lg-eyebrow--brand { color: var(--lg-deep); }
.lg-card-cat a, .lg-pdp__summary .wp-block-post-terms a { color: inherit; text-decoration: none; }
.lg-accent { color: var(--lg-brand); }

/* ---------- header ---------- */
.lg-site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--lg-ground) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--lg-line); }
.admin-bar .lg-site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.lg-announce p { margin: 0; }
.lg-announce strong { color: var(--lg-brand); }
.lg-logo { display: block; line-height: 0; }
.lg-logo img { height: 38px; width: auto; }
@media (max-width: 600px) { .lg-logo img { height: 30px; } .lg-announce { font-size: 0.75rem; } }
.lg-header .wc-block-mini-cart__badge { background: var(--lg-deep); color: #fff; }

/* ---------- hero ---------- */
.lg-hero__title { margin-block: 0.4rem 0; }
.lg-lede { max-width: 46ch; margin-block: 1.25rem 1.75rem; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--lg-ink); border-color: var(--lg-ink); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--lg-ink); color: #fff; }
.lg-chores { background: var(--lg-surface); border: 1px solid var(--lg-line); border-radius: var(--lg-radius); padding: 0.5rem 0; }
.lg-chores .lg-eyebrow { margin: 0.9rem 1.25rem 0.5rem; }
.lg-chore { display: grid; grid-template-columns: 44px 1fr auto; gap: 2px 14px; align-items: center; padding: 0.75rem 1.25rem; border-top: 1px solid var(--lg-line); color: var(--lg-ink); text-decoration: none; transition: background-color .15s; }
.lg-chores .lg-eyebrow + .lg-chore { border-top: 0; }
.lg-chore:hover { background: var(--lg-panel); color: var(--lg-ink); }
.lg-chore img { grid-row: 1 / 3; width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #fff; }
.lg-chore__q { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.25; }
.lg-chore__a { grid-column: 2; font-size: 0.8125rem; color: var(--lg-muted); }
.lg-chore__p { grid-row: 1 / 3; grid-column: 3; font-family: var(--lg-mono); font-size: 0.875rem; white-space: nowrap; }
.lg-chore__p::after { content: " →"; color: var(--lg-brand); }

/* ---------- promise strip ---------- */
.lg-promise { border-block: 1px solid var(--lg-line); gap: 0 !important; }
.lg-promise > p { margin: 0; padding: 1.25rem; border-left: 1px solid var(--lg-line); font-size: 0.8125rem; color: var(--lg-muted); }
.lg-promise > p:first-child { border-left: 0; padding-left: 0; }
.lg-promise strong { display: inline-block; font-size: 0.9375rem; color: var(--lg-ink); margin-bottom: 2px; }
.lg-promise strong.lg-hl { color: var(--lg-deep); }
@media (max-width: 781px) {
	.lg-promise { grid-template-columns: 1fr 1fr !important; }
	.lg-promise > p { padding: 1rem 0.9rem; }
	.lg-promise > p:nth-child(3) { border-left: 0; padding-left: 0; }
	.lg-promise > p:nth-child(n+3) { border-top: 1px solid var(--lg-line); }
}

/* ---------- product cards ---------- */
.lg-grid .wc-block-product-template, .lg-grid .wp-block-post-template { gap: 2rem 1.25rem !important; }
.lg-grid .wc-block-components-product-image { border: 1px solid var(--lg-line); border-radius: var(--lg-radius); overflow: hidden; background: #fff; margin-bottom: 0.75rem; }
.lg-grid .wc-block-components-product-image img { transition: transform .4s ease; }
.lg-grid li:hover .wc-block-components-product-image img { transform: scale(1.04); }
.lg-card-cat { margin: 0 0 0.35rem; }
.lg-card-title { margin: 0 0 0.4rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.lg-card-title a { color: var(--lg-ink); text-decoration: none; }
.lg-card-price { margin-bottom: 0.75rem; }
.lg-card-button .wp-block-button__link, .lg-card-button .wc-block-components-product-button__button { width: 100%; background: transparent !important; color: var(--lg-ink) !important; border: 1px solid var(--lg-ink) !important; border-radius: 999px; font-size: 0.875rem; padding: 0.6rem 1rem; }
.lg-card-button .wc-block-components-product-button__button:hover { background: var(--lg-ink) !important; color: #fff !important; }

/* sale badge = percentage off */
.wc-block-components-product-sale-badge { background: var(--lg-brand) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; font-family: var(--lg-mono); font-size: 0.6875rem !important; font-weight: 500; padding: 0.25rem 0.6rem !important; text-transform: none !important; }

/* prices */
.wc-block-components-product-price del, .price del { color: var(--lg-muted); font-weight: 400; font-size: 0.85em; }
.wc-block-components-product-price ins, .price ins { text-decoration: none; }

/* extras injected by the Legnara Commerce plugin */
.lg-upi { display: inline-block; margin-top: 0.4rem; font-size: 0.75rem; font-weight: 500; color: var(--lg-good); background: var(--lg-good-soft); border-radius: 4px; padding: 0.15rem 0.45rem; }
.lg-ship { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--lg-muted); margin-top: 0.35rem; font-weight: 400; }
.lg-ship::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lg-good); flex: none; }
.lg-ship--drop::before { background: var(--lg-brand); }
.lg-low { display: block; font-size: 0.75rem; font-weight: 600; color: var(--lg-deep); margin-top: 0.2rem; }
.lg-mrp { display: block; font-size: 0.6875rem; color: var(--lg-muted); font-weight: 400; margin-top: 2px; }

/* ---------- product page ---------- */
.lg-pdp { margin-top: 1rem; }
.lg-pdp__title { font-size: clamp(1.9rem, 4vw, 2.75rem) !important; line-height: 1.06 !important; margin-block: 0.5rem 0.75rem; }
.lg-pdp__price { font-size: 1.75rem; }
.lg-pdp__price .lg-upi { font-size: 0.875rem; padding: 0.35rem 0.6rem; }
.lg-pdp__lead { color: var(--lg-muted); max-width: 52ch; }
.lg-gallery .woocommerce-product-gallery__wrapper { border: 1px solid var(--lg-line); border-radius: var(--lg-radius); overflow: hidden; background: #fff; }
.lg-gallery .flex-control-thumbs { display: flex; gap: 8px; margin-top: 8px !important; }
.lg-gallery .flex-control-thumbs li { border: 1px solid var(--lg-line); border-radius: 6px; overflow: hidden; }
.lg-atc form.cart { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; margin: 1.25rem 0 0; }
.lg-atc .quantity .qty { height: 100%; min-height: 48px; width: 4.5rem; border: 1px solid var(--lg-line); border-radius: 999px; text-align: center; background: var(--lg-surface); font-family: var(--lg-mono); }
.lg-atc .single_add_to_cart_button { flex: 1; min-width: 150px; background: transparent !important; color: var(--lg-ink) !important; border: 1px solid var(--lg-ink) !important; border-radius: 999px !important; }
.lg-atc .single_add_to_cart_button:hover { background: var(--lg-ink) !important; color: #fff !important; }
.lg-buy-now { flex: 1 1 100%; display: flex; flex-direction: column; align-items: center; background: var(--lg-deep) !important; color: #fff !important; border: 1px solid var(--lg-deep) !important; border-radius: 999px !important; padding: 0.75rem 1.4rem !important; font-weight: 600; cursor: pointer; line-height: 1.3; }
.lg-buy-now small { font-weight: 500; opacity: .9; font-size: 0.75rem; }
.lg-buy-now:hover { background: var(--lg-ink) !important; border-color: var(--lg-ink) !important; }
.lg-facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--lg-line); border: 1px solid var(--lg-line); border-radius: var(--lg-radius); overflow: hidden; }
.lg-facts li { background: var(--lg-surface); padding: 0.75rem 0.9rem; font-size: 0.8125rem; color: var(--lg-muted); }
.lg-facts b { display: block; font-size: 0.875rem; color: var(--lg-ink); }
.lg-details { margin-top: var(--wp--preset--spacing--50); }
.lg-details .wc-tabs { border-bottom: 1px solid var(--lg-line); }
.lg-meta { font-size: 0.8125rem; color: var(--lg-muted); margin-top: 1rem; }

/* sticky buy bar on phones (added by the plugin) */
.lg-sticky-buy { display: none; }
@media (max-width: 781px) {
	.lg-sticky-buy { display: flex; gap: 0.6rem; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--lg-surface); border-top: 1px solid var(--lg-line); padding: 0.6rem 16px calc(0.6rem + env(safe-area-inset-bottom, 0px)); }
	.lg-sticky-buy__price { font-weight: 700; font-size: 1.05rem; margin-right: auto; }
	.lg-sticky-buy__price small { display: block; font-weight: 500; font-size: 0.6875rem; color: var(--lg-good); }
	.lg-sticky-buy button { border-radius: 999px; padding: 0.7rem 1.1rem; font-weight: 600; border: 1px solid var(--lg-deep); background: var(--lg-deep); color: #fff; }
	body.single-product .lg-footer { padding-bottom: 96px; }
}

/* ---------- story / reviews ---------- */
.lg-checks { list-style: none; padding: 0; margin: 0; }
.lg-checks li { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--lg-line); }
.lg-checks li:first-child { border-top: 0; padding-top: 0; }
.lg-checks b { font-family: var(--lg-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lg-deep); padding-top: 3px; }
@media (max-width: 781px) { .lg-checks li { grid-template-columns: 1fr; gap: 0.25rem; } }

/* ---------- cart & checkout (classic) ---------- */
.lg-cart .woocommerce, .lg-checkout .woocommerce { font-size: 0.9375rem; }
.woocommerce table.shop_table { border: 1px solid var(--lg-line); border-radius: var(--lg-radius); border-collapse: separate; background: var(--lg-surface); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--lg-line); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container .select2-selection--single { border: 1px solid var(--lg-line); border-radius: 6px; padding: 0.65rem 0.75rem; background: var(--lg-surface); min-height: 46px; }
.woocommerce-checkout #payment { background: var(--lg-surface); border: 1px solid var(--lg-line); border-radius: var(--lg-radius); }
.woocommerce-checkout #payment ul.payment_methods { border-bottom-color: var(--lg-line); padding: 1rem; }
.woocommerce-checkout #payment ul.payment_methods li { padding: 0.9rem 1rem; border: 1px solid var(--lg-line); border-radius: var(--lg-radius); margin-bottom: 0.6rem; list-style: none; background: var(--lg-surface); }
.woocommerce-checkout #payment ul.payment_methods li:has(input:checked) { border-color: var(--lg-deep); box-shadow: 0 0 0 1px var(--lg-deep); }
.woocommerce-checkout #payment div.payment_box { background: var(--lg-ground); color: var(--lg-muted); border-radius: 6px; }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout .lg-pay-badge { display: inline-block; margin-left: 0.4rem; font-size: 0.75rem; font-weight: 600; border-radius: 4px; padding: 0.1rem 0.45rem; vertical-align: middle; }
.lg-pay-badge--good { color: var(--lg-good); background: var(--lg-good-soft); }
.lg-pay-badge--cost { color: var(--lg-muted); background: var(--lg-panel); }
.woocommerce .cart_totals .fee td, .woocommerce-checkout-review-order-table .fee td { color: var(--lg-good); }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, #place_order { background: var(--lg-deep) !important; color: #fff !important; border-radius: 999px !important; padding: 0.85rem 1.4rem !important; font-weight: 600 !important; }
.woocommerce .button:hover, #place_order:hover { background: var(--lg-ink) !important; }
.lg-pay-nudge { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--lg-good); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--lg-deep) !important; background: var(--lg-surface) !important; }

/* ---------- footer ---------- */
.lg-footer-logo img { height: 56px; width: auto; }
.lg-plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.lg-plain-list a { color: var(--lg-ink); text-decoration: none; }
.lg-plain-list a:hover { color: var(--lg-deep); }
.lg-legal p { margin: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* More products (single product page) */
.lg-more { margin-top: var(--wp--preset--spacing--50); }
.lg-more h2 { margin: 0 0 var(--wp--preset--spacing--30); }
.lg-more__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.25rem; }
.lg-more__link { display: flex; flex-direction: column; gap: 0.4rem; color: var(--lg-ink); text-decoration: none; }
.lg-more__img { display: block; border: 1px solid var(--lg-line); border-radius: var(--lg-radius); overflow: hidden; background: #fff; aspect-ratio: 1; margin-bottom: 0.35rem; }
.lg-more__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.lg-more__link:hover .lg-more__img img { transform: scale(1.04); }
.lg-more .lg-card-title { font-size: var(--wp--preset--font-size--md); }
@media (max-width: 781px) { .lg-more__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 1.0.2: specificity fixes found on the live site (WooCommerce blocktheme CSS won) */
.woocommerce div.product .lg-atc form.cart button.single_add_to_cart_button.button { flex: 1; min-width: 150px; background: transparent !important; color: var(--lg-ink) !important; border: 1px solid var(--lg-ink) !important; border-radius: 999px !important; }
.woocommerce div.product .lg-atc form.cart button.single_add_to_cart_button.button:hover { background: var(--lg-ink) !important; color: #fff !important; }
.woocommerce div.product .lg-atc form.cart button.lg-buy-now { display: flex; flex: 1 1 100%; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.2; padding: 0.7rem 1rem; background: var(--lg-deep) !important; color: #fff !important; border: 1px solid var(--lg-deep) !important; border-radius: 999px !important; }
.woocommerce div.product .lg-atc form.cart button.lg-buy-now small { display: block; font-weight: 500; opacity: .9; font-size: 0.75rem; }
.woocommerce div.product .lg-atc form.cart button.lg-buy-now:hover { background: var(--lg-ink) !important; border-color: var(--lg-ink) !important; }
.woocommerce div.product .lg-gallery div.images.woocommerce-product-gallery { width: 100% !important; float: none !important; margin-bottom: 0; }
.woocommerce span.onsale, .woocommerce div.product span.onsale { background: var(--lg-brand); color: #fff; border-radius: 999px; min-width: 0; min-height: 0; width: auto; height: auto; line-height: 1; padding: 0.35rem 0.7rem; font-size: 0.75rem; font-weight: 600; top: 0.75rem; left: 0.75rem; }
.woocommerce-checkout #order_review table.shop_table { width: 100%; }

/* Info pages (About, Help, policies) */
.wp-block-post-content .lg-facts-table table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--lg-line); border-radius: var(--lg-radius); overflow: hidden; background: var(--lg-surface); font-size: 0.9375rem; }
.wp-block-post-content .lg-facts-table td { border: 0; border-top: 1px solid var(--lg-line); padding: 0.7rem 1rem; vertical-align: top; }
.wp-block-post-content .lg-facts-table tr:first-child td { border-top: 0; }
.wp-block-post-content .lg-facts-table td:first-child { width: 34%; color: var(--lg-muted); font-weight: 500; }
.wp-block-post-content .lg-lede { max-width: none; font-size: var(--wp--preset--font-size--lg); }
.wp-block-post-content h2 { margin-top: 2.25rem; margin-bottom: 0.6rem; font-size: var(--wp--preset--font-size--xl); }
.wp-block-post-content ul, .wp-block-post-content ol { padding-left: 1.25rem; }
.wp-block-post-content li { margin-bottom: 0.4rem; }
.wp-block-post-content .wp-block-buttons { margin-top: 1.5rem; }
@media (max-width: 600px) { .wp-block-post-content .lg-facts-table td { display: block; width: auto !important; } .wp-block-post-content .lg-facts-table td:first-child { padding-bottom: 0; border-top: 1px solid var(--lg-line); } .wp-block-post-content .lg-facts-table td + td { border-top: 0; } }
