/*
Theme Name: Impereal
Theme URI: https://impereal.in
Description: Impereal Lifestyle theme for mattresses and pillows. A child theme of Twenty Twenty-Five for WooCommerce.
Author: Impereal Lifestyle
Template: twentytwentyfive
Version: 1.0.32
Requires at least: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: impereal
*/

/* Layout: an editorial catalogue on warm paper. Night-navy bands carry the brand story and footer; bronze is kept for actions and section marks. */
:root {
	--paper: #f4f0e6;
	--card: #fbf9f4;
	--ink: #1a2236;
	--night: #0e1a2b;
	--bronze: #b8895a;
	--bronze-ink: #8a6440;
	--sand: #ede4cf;
	--muted: #596173;
	--line: rgba(26, 34, 54, .14);
	--line-night: rgba(237, 228, 207, .18);
	--serif: var(--wp--preset--font-family--source-serif);
	--sans: var(--wp--preset--font-family--inter);
	--wrap: 1200px;
	--head-h: 72px;
	--ann-h: 36px;
}
@media (max-width: 960px) { :root { --head-h: 62px; } }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Reset block spacing inside our own components; we space with grid gaps. */
.imp-main { margin: 0; }
.imp-main :where(.wp-block-group, .wp-block-column, .wp-block-columns) > * { margin-block-start: 0; margin-block-end: 0; }
.imp-header-part, .imp-footer-part { margin: 0 !important; }
.wp-site-blocks > * + * { margin-block-start: 0; }

.imp-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto !important; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); box-sizing: border-box; }
@media (min-width: 720px) { .imp-wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

h1, h2, h3 { text-wrap: balance; }
h1 em, h2 em, .product_title em { font-style: italic; font-weight: 500; }
.imp-eyebrow { font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--bronze-ink); display: flex; align-items: center; gap: .75rem; margin: 0; }
.imp-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.imp-lede, .imp-lede p { font-size: 1.08rem; color: var(--muted); max-width: 58ch; margin: 0; }
.imp-money { font-variant-numeric: tabular-nums; }
.imp-nowrap { white-space: nowrap; }
.imp-muted { color: var(--muted); }
.imp-link-arrow { font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }

/* Buttons */
.wp-element-button, .wp-block-button__link { transition: background .2s, color .2s; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--ink); color: var(--paper); }
.imp-btn-link > .wp-block-button__link { border: 0 !important; padding-inline: .25rem !important; }
.imp-btn-link > .wp-block-button__link:hover { background: transparent !important; color: var(--bronze-ink) !important; }

/* ---------- Header ---------- */
.imp-announce { background: var(--night); color: var(--sand); font: 500 .78rem/1.3 var(--sans); letter-spacing: .04em; }
.imp-announce .imp-wrap { display: flex; justify-content: center; align-items: center; gap: 1.6rem; flex-wrap: nowrap; overflow: hidden; height: var(--ann-h); white-space: nowrap; text-align: center; }
.imp-announce span + span::before { content: "·"; margin-right: 1.6rem; color: var(--bronze); }
@media (max-width: 900px) { .imp-announce span:nth-child(n+2) { display: none; } }
.imp-head { position: relative; background: rgba(244, 240, 230, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
/* The whole header part is sticky, pulled up by the announcement bar's height so only the header stays on screen. */
.imp-header-part { position: sticky; top: calc(-1 * var(--ann-h)); z-index: 50; }
.admin-bar .imp-header-part { top: calc(32px - var(--ann-h)); }
@media (max-width: 782px) { .admin-bar .imp-header-part { top: calc(-1 * var(--ann-h)); } }
.imp-head .imp-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: var(--head-h); gap: 1rem; }
.imp-logo { justify-self: center; display: block; line-height: 0; }
.imp-logo .imp-logo-img { height: 26px; width: auto; }
.imp-wordmark { font: 600 1.6rem/1 var(--serif); letter-spacing: .06em; text-transform: uppercase; }
.imp-nav { display: flex; gap: 1.75rem; font: 500 .9rem/1 var(--sans); }
.imp-nav a, .imp-head-r a { text-decoration: none; }
.imp-nav a:hover { color: var(--bronze-ink); }
.imp-head-r { justify-self: end; display: flex; align-items: center; gap: 1rem; }
.imp-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; position: relative; padding: 0; }
.imp-icon-btn svg { width: 24px; height: 24px; }
.imp-cart-count { position: absolute; top: 4px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--bronze); color: #fff; font: 600 .65rem/17px var(--sans); text-align: center; }
.imp-cart-count[hidden] { display: none; }
.imp-wa { font: 600 .75rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: .45rem; }
.imp-wa svg { width: 24px; height: 24px; }
.imp-menu-btn { display: none; }
@media (max-width: 960px) {
	.imp-head .imp-wrap { grid-template-columns: 1fr auto 1fr; gap: .5rem; }
	.imp-menu-btn { justify-self: start; margin-left: -10px; }
	.imp-head-r { gap: .25rem; margin-right: -10px; }
	.imp-wa { width: 44px; height: 44px; justify-content: center; }
	.imp-nav { display: none; }
	.imp-menu-btn { display: inline-grid; }
	.imp-wa span { display: none; }
	.imp-nav.open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem max(16px, env(safe-area-inset-left, 0px)) 1.25rem; gap: 0; }
	.imp-nav.open a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
}

/* ---------- Sections ---------- */
.imp-section { padding-block: clamp(4rem, 8vw, 7rem); }
.imp-band-card { background: var(--card); border-block: 1px solid var(--line); }
.imp-sec-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2rem, 4vw, 3.25rem) !important; }
.imp-sec-title { display: grid; gap: 1rem; }
@media (min-width: 900px) { .imp-split { grid-template-columns: 1.1fr 1fr; align-items: end; } }
.imp-section h2, .imp-pdp-sec h2 { margin: 0; }

/* Hero */
.imp-hero { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 6vw, 5rem); }
.imp-hero-cols { display: grid !important; gap: clamp(2rem, 4vw, 4rem) !important; align-items: center !important; }
@media (min-width: 960px) { .imp-hero-cols { grid-template-columns: 1.05fr 1fr; } }
.imp-hero-cols > .wp-block-column { flex-basis: auto !important; min-width: 0; }
.imp-hero-copy { display: grid; gap: 1.6rem; }
.imp-hero-copy h1 { margin: 0; }
.imp-hero-actions { gap: .75rem 1.25rem; align-items: center; }
.imp-hero-fig { position: relative; }
.imp-hero-fig .wp-block-image { margin: 0; }
.imp-hero-fig img { width: 100%; aspect-ratio: 1100 / 904; object-fit: cover; display: block; }
.imp-hero-note { position: absolute; left: -1px; bottom: -1px; background: var(--paper); padding: 1rem 1.25rem 0 0 !important; max-width: 290px; margin: 0 !important; font: 500 .86rem/1.45 var(--sans); color: var(--muted); }
.imp-hero-note::before { content: ""; position: absolute; left: 0; top: 1rem; bottom: 0; width: 2px; background: var(--bronze); }
.imp-hero-note { padding-left: .9rem !important; }
@media (max-width: 600px) { .imp-hero-note { position: static; max-width: none; padding-top: .75rem !important; } }

/* Trust strip */
.imp-trust { border-block: 1px solid var(--line); }
.imp-trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.imp-trust li { padding: 1.5rem 1.25rem; display: grid; gap: .25rem; border-left: 1px solid var(--line); }
.imp-trust li:first-child { border-left: 0; padding-left: 0; }
.imp-trust b { font: 600 .95rem/1.3 var(--sans); }
.imp-trust small { color: var(--muted); font-size: .84rem; line-height: 1.4; }
@media (max-width: 860px) {
	.imp-trust ul { grid-template-columns: 1fr 1fr; }
	.imp-trust li { padding: 1.1rem .9rem; }
	.imp-trust li:nth-child(3) { border-left: 0; padding-left: 0; }
	.imp-trust li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Product cards */
.imp-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (min-width: 1100px) { .imp-grid-4 { grid-template-columns: repeat(4, 1fr); } .imp-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.imp-card { display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.imp-card:hover { border-color: var(--bronze); transform: translateY(-2px); color: var(--ink); }
.imp-card[hidden] { display: none; }
.imp-card-ph { aspect-ratio: 1; overflow: hidden; background: var(--sand); }
.imp-card-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imp-card-body { display: grid; gap: .65rem; padding: 1.1rem 1.15rem 1.25rem; align-content: start; }
.imp-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.imp-tag { font: 600 .64rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: .42rem .55rem; border: 1px solid var(--line); color: var(--muted); }
.imp-card h3 { font-size: 1.22rem; margin: 0; }
.imp-card p { font-size: .9rem; color: var(--muted); line-height: 1.5; margin: 0; }
.imp-price { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin-top: .15rem; }
.imp-price b { font: 600 1.05rem/1 var(--sans); }
.imp-price s { color: var(--muted); font-size: .85rem; }
.imp-from { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.imp-save { font: 600 .72rem/1 var(--sans); color: var(--bronze-ink); }
.imp-card-cta { background: var(--night); color: var(--sand); border-color: var(--night); grid-template-rows: 1fr; }
.imp-card-cta:hover { color: var(--sand); }
.imp-card-cta .imp-card-body { align-content: center; gap: 1rem; padding: 2rem; }
.imp-card-cta .imp-eyebrow { color: var(--bronze); }
.imp-card-cta h3 { font-size: 1.6rem; color: var(--sand); }

/* How to choose */
.imp-guide-title { display: grid; gap: .5rem; margin: 0 0 1.25rem; }
.imp-guide-title h3 { font-size: 1.4rem; margin: 0; }
.imp-guide-title p { color: var(--muted); font-size: .95rem; max-width: 70ch; margin: 0; }
.imp-guide-title-2 { margin-top: 3.5rem; }
.imp-guide-scroll { overflow-x: auto; padding-bottom: .5rem; }
.imp-guide { min-width: 720px; display: grid; grid-template-columns: repeat(10, 1fr); column-gap: 4px; row-gap: .55rem; }
.imp-gband { font: 600 .8rem/1.25 var(--sans); padding: .6rem .8rem; border-top: 2px solid; display: grid; gap: .1rem; }
.imp-gband small { font-weight: 400; color: var(--muted); }
.imp-gband.side { grid-column: 2 / 7; grid-row: 1; border-color: #d4b485; background: rgba(212, 180, 133, .18); }
.imp-gband.back { grid-column: 5 / 9; grid-row: 2; border-color: #4b5b7a; background: rgba(75, 91, 122, .10); }
.imp-gband.stomach { grid-column: 7 / 11; grid-row: 3; border-color: var(--night); background: rgba(14, 26, 43, .08); }
.imp-gnum { grid-row: 4; text-align: center; font: 700 1.3rem/1 var(--serif); padding: .8rem 0; background: var(--card); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.imp-gword { grid-row: 5; text-align: center; font: 600 .62rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.imp-gwho { grid-row: 6; display: grid; gap: .35rem; align-content: start; padding-top: .4rem; }
.imp-gwho a { display: block; text-align: center; text-decoration: none; font: 600 .92rem/1.2 var(--serif); padding: .55rem .2rem; background: var(--night); color: var(--sand); }
.imp-gwho a:hover { background: var(--bronze); color: #fff; }
.imp-sens { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(3, 1fr); }
.imp-sens > div { background: var(--card); padding: 1.4rem 1.3rem; display: grid; gap: .4rem; align-content: start; }
.imp-sens .imp-r { font: 700 1.5rem/1 var(--serif); }
.imp-sens b { font-weight: 600; }
.imp-sens p { font-size: .92rem; color: var(--muted); margin: 0; }
@media (max-width: 760px) { .imp-sens { grid-template-columns: 1fr; } }

/* Comparison table */
.imp-table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
.imp-compare { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .92rem; margin: 0; }
.imp-compare th, .imp-compare td { text-align: left; padding: 1rem 1.1rem; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.imp-compare thead th { font: 600 .7rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--card); }
.imp-compare tbody th { font: 700 1.05rem/1.25 var(--serif); }
.imp-compare tbody th a { text-decoration: none; }
.imp-compare tbody tr:last-child > * { border-bottom: 0; }
.imp-compare td.imp-money { font-weight: 600; }
.imp-meter { display: flex; gap: 3px; margin-top: .45rem; }
.imp-meter i { width: 12px; height: 6px; background: var(--line); }
.imp-meter i.on { background: var(--bronze); }

/* Pillows feature */
.imp-feature { display: grid !important; gap: clamp(2rem, 4vw, 4rem) !important; align-items: center !important; }
@media (min-width: 900px) { .imp-feature { grid-template-columns: 1fr 1fr; } }
.imp-feature > .wp-block-column { flex-basis: auto !important; min-width: 0; }
.imp-feature-pics .wp-block-image { margin: 0; }
.imp-feature-pics img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.imp-feature-copy { display: grid; gap: 1.25rem; }
.imp-ticks { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: .6rem; }
.imp-ticks li { padding-left: 1.6rem; position: relative; margin: 0; }
.imp-ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border: 1.5px solid var(--bronze); transform: rotate(45deg); }

/* Night bands */
.imp-night { background: var(--night); color: var(--sand); }
.imp-night h2, .imp-night h3 { color: var(--sand); }
.imp-night .imp-eyebrow { color: var(--bronze); }
.imp-night .imp-lede { color: rgba(237, 228, 207, .78); }
.imp-story { display: grid !important; gap: 2.5rem !important; }
@media (min-width: 900px) { .imp-story { grid-template-columns: 1fr 1.15fr; align-items: start; } }
.imp-story > .wp-block-column { flex-basis: auto !important; min-width: 0; display: grid; gap: 1.5rem; }
.imp-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-night); }
.imp-facts div { padding: 1.4rem 1rem 1.4rem 0; border-bottom: 1px solid var(--line-night); }
.imp-facts div:nth-child(odd) { border-right: 1px solid var(--line-night); }
.imp-facts div:nth-child(even) { padding-left: 1.25rem; }
.imp-facts b { display: block; font: 600 1.9rem/1.1 var(--serif); color: var(--sand); }
.imp-facts span { font-size: .86rem; color: rgba(237, 228, 207, .7); }

/* FAQ */
.imp-faq { border-top: 1px solid var(--line); max-width: 860px; }
.imp-faq details { border-bottom: 1px solid var(--line); }
.imp-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; font: 600 1.12rem/1.35 var(--serif); }
.imp-faq summary::-webkit-details-marker { display: none; }
.imp-faq summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--bronze-ink); transition: transform .2s; }
.imp-faq details[open] summary::after { transform: rotate(45deg); }
.imp-faq details p { padding: 0 0 1.35rem; color: var(--muted); max-width: 68ch; margin: 0; }

/* ---------- Footer ---------- */
.imp-footer { background: var(--night); color: var(--sand); padding-top: 4rem; font-size: .92rem; }
.imp-foot { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); padding-bottom: 3rem; }
.imp-foot-brand { display: grid; gap: 1rem; align-content: start; }
.imp-foot .imp-logo-img { height: 22px; width: auto; filter: invert(93%) sepia(14%) saturate(380%) hue-rotate(4deg); }
.imp-foot .imp-wordmark { color: var(--sand); }
.imp-foot h4 { font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); margin: 0 0 1rem; }
.imp-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.imp-foot a { text-decoration: none; color: rgba(237, 228, 207, .85); }
.imp-foot a:hover { color: var(--sand); }
.imp-foot p { color: rgba(237, 228, 207, .75); line-height: 1.6; margin: 0 0 1rem; }
.imp-legal { border-top: 1px solid var(--line-night); }
.imp-legal .imp-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; font-size: .8rem; color: rgba(237, 228, 207, .6); }

/* ---------- Shop / category ---------- */
.imp-archive { padding-bottom: 5rem; }
.imp-crumbs { font-size: .82rem; color: var(--muted); padding-top: 1.5rem; }
.imp-crumbs a { text-decoration: none; }
.imp-crumbs a:hover { color: var(--bronze-ink); }
.imp-cat-head { padding-block: 2.25rem 2.5rem; display: grid; gap: 1rem; }
.imp-cat-head h1 { margin: 0; }
.imp-filters { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; align-items: center; padding-block: 1rem; border-block: 1px solid var(--line); margin-bottom: 2rem; }
.imp-fgroup { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.imp-fgroup > span { font: 600 .7rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: .3rem; }
.imp-chip { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: .5rem .8rem; border-radius: 3px; font: 500 .84rem/1 var(--sans); cursor: pointer; min-height: 36px; }
.imp-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.imp-count { margin-left: auto; font-size: .85rem; color: var(--muted); }
.imp-empty-filter, .imp-empty { padding: 2rem; border: 1px dashed var(--line); color: var(--muted); display: grid; gap: 1rem; max-width: 720px; }
.imp-empty h2 { color: var(--ink); font-size: 1.8rem; }
.imp-empty-filter[hidden] { display: none; }

/* ---------- Product page ---------- */
.imp-pdp { display: grid; gap: clamp(2rem, 4vw, 4rem); padding-block: 1.75rem 4rem; }
@media (min-width: 960px) { .imp-pdp { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.imp-pdp .imp-gallery { min-width: 0; }
@media (min-width: 960px) { .imp-pdp .imp-gallery { position: sticky; top: calc(var(--head-h) + 24px); } .admin-bar .imp-pdp .imp-gallery { top: calc(var(--head-h) + 56px); } }
.imp-pdp .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; position: relative; }
.imp-pdp .woocommerce-product-gallery__wrapper { margin: 0; background: var(--sand); }
.imp-pdp .woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.imp-pdp .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin: .75rem 0 0 !important; padding: 0; list-style: none; }
.imp-pdp .flex-control-thumbs li { width: auto !important; float: none !important; margin: 0 !important; }
.imp-pdp .flex-control-thumbs img { aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); opacity: 1 !important; cursor: pointer; display: block; }
.imp-pdp .flex-control-thumbs img.flex-active { border: 2px solid var(--ink); }
.imp-pdp .woocommerce-product-gallery__trigger { position: absolute; top: 1rem; right: 1rem; z-index: 5; }
.imp-buy { display: grid; gap: 1.4rem; align-content: start; min-width: 0; width: auto !important; float: none !important; }
.imp-buy > * { margin: 0 !important; }
.imp-buy .product_title { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.imp-specs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--card); }
.imp-specs div { padding: 1rem 1.1rem; display: grid; gap: .3rem; border-bottom: 1px solid var(--line); }
.imp-specs div:nth-child(odd) { border-right: 1px solid var(--line); }
.imp-specs div:nth-last-child(-n+2):nth-child(odd), .imp-specs div:last-child { border-bottom: 0; }
.imp-specs span { font: 600 .66rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.imp-specs b { font: 600 1.05rem/1.25 var(--serif); }

/* Variations: our size buttons replace the dropdowns (see impereal.js). */
.imp-buy form.cart { display: grid; gap: 1rem; margin: 0 !important; }
.imp-buy table.variations, .imp-buy table.variations tbody { display: block; border: 0; margin: 0 !important; width: 100%; }
.imp-buy table.variations tr { display: grid; gap: .6rem; margin-bottom: 1rem; }
.imp-buy table.variations th, .imp-buy table.variations td { display: block; padding: 0 !important; border: 0; text-align: left; line-height: 1.2 !important; }
.imp-buy table.variations th label { font: 600 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.imp-buy table.variations td { position: relative; }
.imp-buy table.variations select.imp-hidden-select { position: absolute !important; left: 0; top: 0; width: 1px !important; min-width: 0 !important; height: 1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.imp-buy .reset_variations { display: none !important; }
.imp-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.imp-opt { border: 1px solid var(--line); background: var(--card); padding: .7rem .65rem; text-align: left; cursor: pointer; border-radius: 3px; display: grid; gap: .15rem; color: var(--ink); font-family: var(--sans); text-decoration: none; }
.imp-opt b { font-size: .92rem; font-weight: 600; }
.imp-opt small { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.imp-opt[aria-pressed="true"] { border: 2px solid var(--ink); padding: calc(.7rem - 1px) calc(.65rem - 1px); background: #fff; }
.imp-opt.imp-opt-custom { border-style: dashed; }
.imp-opt:disabled { opacity: .4; cursor: not-allowed; }
.imp-buy .single_variation_wrap { display: grid; gap: 1rem; }
.imp-buy .woocommerce-variation { margin: 0 !important; }
.imp-buy .woocommerce-variation-price .price, .imp-buy > .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1rem; color: var(--ink) !important; font-size: 1rem !important; margin: 0; }
.imp-buy .price ins { text-decoration: none; font: 700 2rem/1 var(--serif); order: -1; }
.imp-buy .price del { color: var(--muted); opacity: 1; font-size: 1rem; }
.imp-buy .price > .amount, .imp-buy .price > bdi { font: 700 2rem/1 var(--serif); }
.imp-save-badge { font: 600 .8rem/1 var(--sans); padding: .38rem .55rem; border: 1px solid var(--bronze); color: var(--bronze-ink); }
.imp-price-note { color: var(--muted); font-size: .84rem; margin: 0 !important; }
.imp-buy .woocommerce-variation-add-to-cart, .imp-buy form.cart:not(.variations_form) { display: grid !important; grid-template-columns: auto 1fr; gap: .6rem; }
.imp-buy .quantity { margin: 0 !important; }
.imp-buy .quantity .qty { height: 50px; width: 4.5rem; border: 1px solid var(--line); background: var(--card); font-size: 1rem; text-align: center; border-radius: 3px; }
.imp-buy .single_add_to_cart_button { width: 100%; min-height: 50px; margin: 0 !important; }
.imp-buy .single_add_to_cart_button.disabled { opacity: .5; }
.imp-assure { list-style: none; padding: 1.1rem 0 0 !important; border-top: 1px solid var(--line); display: grid; gap: .7rem; font-size: .92rem; }
.imp-assure li { display: flex; gap: .7rem; align-items: flex-start; }
.imp-assure svg { flex: none; width: 20px; height: 20px; color: var(--bronze-ink); margin-top: .1rem; }
.imp-assure a { color: var(--bronze-ink); }

.imp-subnav { position: sticky; top: var(--head-h); z-index: 40; background: var(--paper); border-block: 1px solid var(--line); }
.admin-bar .imp-subnav { top: calc(var(--head-h) + 32px); }
.imp-subnav .imp-wrap { display: flex; gap: 1.75rem; overflow-x: auto; scrollbar-width: none; }
.imp-subnav a { flex: none; padding: 1rem 0; font: 500 .86rem/1 var(--sans); text-decoration: none; color: var(--muted); }
.imp-subnav a:hover { color: var(--ink); }
.imp-pdp-sec { padding-block: clamp(3.5rem, 6vw, 5.5rem); scroll-margin-top: calc(var(--head-h) + 60px); }
.imp-wrap > .imp-pdp-sec + .imp-pdp-sec { border-top: 1px solid var(--line); }
.imp-prose { color: var(--ink); max-width: 64ch; }
.imp-prose p { margin: 0 0 1rem; }
.imp-prose h2 { font-size: 1.35rem; margin: 1.5rem 0 .75rem; }

.imp-layers { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .imp-layers { grid-template-columns: 1.15fr 1fr; } }
.imp-stack svg { width: 100%; height: auto; max-width: 640px; font-family: var(--sans); }
.imp-layer-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.imp-layer-list li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.imp-mm { font: 700 1.05rem/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.imp-layer-list b { display: block; font-weight: 600; }
.imp-layer-list span { color: var(--muted); font-size: .9rem; }

.imp-fit { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .imp-fit { grid-template-columns: 1fr 1fr; align-items: start; } }
.imp-fit-copy, .imp-fit-scales { display: grid; gap: 1.5rem; }
.imp-ideal-title { font: 600 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: .5rem 0 0; }
.imp-scale { display: grid; gap: .55rem; }
.imp-scale-head { display: flex; justify-content: space-between; align-items: baseline; font: 600 .7rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.imp-scale-head span { font: 700 1.3rem/1 var(--serif); letter-spacing: 0; }
.imp-scale-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.imp-scale-bar i { height: 34px; background: var(--sand); display: grid; place-items: center; font: 600 .78rem/1 var(--sans); font-style: normal; color: var(--muted); }
.imp-scale-bar i.on { background: var(--night); color: var(--sand); }
.imp-scale-ends { display: flex; justify-content: space-between; font: 600 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.imp-weight { font-size: .95rem; color: var(--muted); margin: 0; }
.imp-weight a { color: var(--ink); }

.imp-warranty { display: grid; gap: 2rem; }
@media (min-width: 900px) { .imp-warranty { grid-template-columns: auto 1fr; gap: 4rem; align-items: start; } }
.imp-big { font: 700 clamp(5rem, 12vw, 8.5rem)/.85 var(--serif); color: var(--sand); letter-spacing: -.04em; }
.imp-big small { display: block; font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--bronze); margin-top: 1rem; }
.imp-warranty-copy { display: grid; gap: 2rem; }
.imp-cover { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.imp-cover h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
.imp-cover p { color: rgba(237, 228, 207, .75); font-size: .92rem; margin: 0; }

.imp-mbar { display: none; }
@media (max-width: 959px) {
	.imp-mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: var(--paper); border-top: 1px solid var(--line); gap: .75rem; align-items: center; justify-content: space-between; padding: .7rem max(16px, env(safe-area-inset-right, 0px)) calc(.7rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
	.imp-mbar > div { display: grid; line-height: 1.2; }
	.imp-mbar small { color: var(--muted); font-size: .75rem; }
	.imp-mbar b { font: 700 1.15rem/1.2 var(--serif); }
	.imp-mbar .wp-element-button { flex: 1; max-width: 220px; }
	.single-product .imp-footer { padding-bottom: 76px; }
}

/* ---------- Plain pages (cart, checkout, account, policies) ---------- */
.imp-page { padding: 3rem max(16px, env(safe-area-inset-left, 0px)) 5rem; }
@media (min-width: 720px) { .imp-page { padding-inline: 32px; } }
.imp-page-title { margin-bottom: 2rem !important; }

/* WooCommerce notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner { border-radius: 3px; }
.imp-pdp-wrap .woocommerce-notices-wrapper:empty { display: none; }

/* Cart and checkout pages */
.imp-shop-page { padding: 2.5rem 0 5rem !important; }
.imp-shop-page .imp-page-title { margin: 0 0 2rem !important; }
.imp-shop-page .wp-block-woocommerce-checkout, .imp-shop-page .wp-block-woocommerce-cart { margin-top: 0; }
.wc-block-components-button:not(.is-link) { border-radius: 3px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; font-size: .8rem; }
.wc-block-components-product-name { font-family: var(--serif); font-weight: 600; }

/* Header logo: larger, with a hairline of extra weight. */
.imp-head .imp-logo .imp-logo-img { height: 31px; filter: drop-shadow(0.35px 0 0 #1a2236) drop-shadow(-0.35px 0 0 #1a2236) drop-shadow(0 0.25px 0 #1a2236); }
@media (max-width: 960px) { .imp-head .imp-logo .imp-logo-img { height: 32px; } }
@media (max-width: 360px) { .imp-head .imp-logo .imp-logo-img { height: 27px; } }

/* Footer logo: larger and heavier. */
.imp-foot .imp-logo-img { height: 29px; filter: invert(93%) sepia(14%) saturate(380%) hue-rotate(4deg) drop-shadow(0.4px 0 0 #ede4cf) drop-shadow(-0.4px 0 0 #ede4cf) drop-shadow(0 0.3px 0 #ede4cf); }

/* Header icons: larger, with WhatsApp sitting next to the cart. */
.imp-icon-btn svg, .imp-wa svg { width: 27px; height: 27px; }
.imp-head-r { gap: .6rem; }
@media (max-width: 960px) {
	.imp-head-r { gap: 0; }
	.imp-wa { width: 38px; justify-content: flex-end; }
	.imp-head-r .imp-cart { width: 44px; }
}

/* FAQ: no focus frame on click; keyboard users get an underline instead. */
.imp-faq summary { -webkit-tap-highlight-color: transparent; }
.imp-faq summary:focus { outline: none; }
.imp-faq summary:focus-visible { outline: none; text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: 5px; }

/* Product gallery thumbnails: one swipeable row. */
.imp-pdp .flex-control-thumbs { display: flex !important; flex-wrap: nowrap; gap: .6rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; grid-template-columns: none; }
.imp-pdp .flex-control-thumbs::-webkit-scrollbar { display: none; }
.imp-pdp .flex-control-thumbs li { flex: 0 0 calc((100% - 2.4rem) / 5); scroll-snap-align: start; }
@media (max-width: 959px) { .imp-pdp .flex-control-thumbs li { flex-basis: calc((100% - 2.4rem) / 4.5); } }
.imp-thumbs-wrap { position: relative; }
.imp-thumbs-wrap::after { content: ""; position: absolute; top: .75rem; right: 0; bottom: 0; width: 2.5rem; background: linear-gradient(90deg, rgba(244, 240, 230, 0), var(--paper)); pointer-events: none; transition: opacity .2s; }
.imp-thumbs-wrap.at-end::after { opacity: 0; }

/* Thumbnail row: beat WooCommerce's overflow:hidden so it can be swiped; arrows for mouse users. */
.woocommerce div.product .imp-gallery .flex-control-thumbs,
.imp-pdp .woocommerce-product-gallery .flex-control-thumbs { overflow-x: auto !important; overflow-y: hidden !important; touch-action: pan-x pan-y; }
.imp-thumbs-btn { display: none; position: absolute; top: calc(.75rem + 50%); transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; place-items: center; font: 400 1.1rem/1 var(--sans); box-shadow: 0 1px 4px rgba(14, 26, 43, .12); }
.imp-thumbs-btn.prev { left: -12px; }
.imp-thumbs-btn.next { right: -12px; }
.imp-thumbs-btn[disabled] { display: none !important; }
@media (hover: hover) and (pointer: fine) { .imp-thumbs-btn { display: grid; } }
.imp-thumbs-wrap.at-start::before { opacity: 0; }
.imp-thumbs-wrap::before { content: ""; position: absolute; top: .75rem; left: 0; bottom: 0; width: 2.5rem; background: linear-gradient(270deg, rgba(244, 240, 230, 0), var(--paper)); pointer-events: none; z-index: 2; transition: opacity .2s; }
.imp-thumbs-wrap::after { z-index: 2; }

/* No frames from taps or clicks: focus rings only for keyboard users, and no "sticky" hover on touch screens. */
a, button, summary, .imp-card { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
.imp-card:focus { outline: none; }
.imp-card:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
@media (hover: none) {
	.imp-card:hover { border-color: var(--line); transform: none; }
	.imp-card-cta:hover { border-color: var(--night); }
	.imp-gwho a:hover { background: var(--night); color: var(--sand); }
	.imp-nav a:hover, .imp-link-arrow:hover, .imp-crumbs a:hover { color: inherit; }
	.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: transparent; color: var(--ink); }
}


/* Firmness guide on phones: open on the mattresses, keep band labels in view, show there is more both sides. */
.imp-ghint { display: none; }
.imp-gscroll-wrap { position: relative; }
.imp-gfade { display: none; }
@media (max-width: 759px) {
	.imp-ghint { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .25rem 0 .9rem; }
	.imp-ghint span { font: 600 .64rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; }
	.imp-ghint-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 400 1.05rem/1 var(--sans); display: grid; place-items: center; padding: 0; cursor: pointer; transition: opacity .2s; }
	.imp-ghint-btn:disabled { opacity: .3; cursor: default; }
	.imp-gfade { display: block; position: absolute; top: 0; bottom: .5rem; width: 18px; pointer-events: none; z-index: 3; transition: opacity .2s; }
	.imp-gfade.l { left: 0; background: linear-gradient(90deg, var(--paper), rgba(244, 240, 230, 0)); }
	.imp-gfade.r { right: 0; background: linear-gradient(270deg, var(--paper), rgba(244, 240, 230, 0)); }
	.imp-gscroll-wrap.at-start .imp-gfade.l, .imp-gscroll-wrap.at-end .imp-gfade.r { opacity: 0; }
	.imp-guide-scroll { scrollbar-width: none; overscroll-behavior-x: contain; }
	.imp-guide-scroll::-webkit-scrollbar { display: none; }
	.imp-gband > * { position: sticky; left: 34px; max-width: max-content; }
	.imp-gband small { max-width: 7.2rem; }
}


/* ---------- Comparison table on phones ----------
   Mattress and Firmness feel stay frozen; What's inside and Best for share the space beside them,
   one at a time, snapping so neither is ever cut off. Prices sit under each name. Desktop is unchanged. */
.imp-m, .imp-cmp-hint { display: none; }
.imp-compare .imp-firm-word + .imp-d { display: inline; }
.imp-compare thead .c-best span { display: inline; }
@media (max-width: 759px) {
	.imp-d, .imp-compare .c-price { display: none !important; }
	.imp-m { display: inline; }
	.imp-cmp-hint { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .75rem; }
	.imp-cmp-hint span { font: 600 .64rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
	.imp-cmp-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 400 1.05rem/1 var(--sans); display: grid; place-items: center; padding: 0; cursor: pointer; transition: opacity .2s; }
	.imp-cmp-btn:disabled { opacity: .3; cursor: default; }
	.imp-cmp-wrap { --name: 7rem; --firm: 5.4rem; --avail: calc(100vw - 2 * max(16px, env(safe-area-inset-left, 0px)) - 2px - var(--name) - var(--firm)); }
	.imp-cmp-wrap .imp-table-scroll { scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding-left: calc(var(--name) + var(--firm)); overscroll-behavior-x: contain; }
	.imp-cmp-wrap .imp-table-scroll::-webkit-scrollbar { display: none; }
	.imp-compare { min-width: 0; width: max-content; table-layout: fixed; }
	.imp-compare th, .imp-compare td { box-sizing: border-box; padding: .7rem .55rem; font-size: .84rem; line-height: 1.4; vertical-align: top; }
	.imp-compare thead th { font-size: .58rem; line-height: 1.3; padding: .8rem .55rem; }
	.imp-compare thead th .imp-m > span, .imp-compare thead .c-best span { display: block; }
	.imp-compare tbody tr { height: 6.4rem; }
	.imp-compare .c-name { position: sticky; left: 0; z-index: 2; width: var(--name); padding-left: .8rem; background: var(--paper); }
	.imp-compare .c-firm { position: sticky; left: var(--name); z-index: 2; width: var(--firm); background: var(--paper); box-shadow: 6px 0 8px -6px rgba(14, 26, 43, .28); }
	.imp-compare thead .c-name, .imp-compare thead .c-firm { background: var(--card); }
	.imp-compare .c-inside, .imp-compare .c-best { width: var(--avail); scroll-snap-align: start; }
	.imp-compare tbody th b { display: block; font: 700 1.05rem/1.2 var(--serif); }
	.imp-compare tbody th a { color: var(--ink); }
	.imp-cmp-price { display: grid; gap: .1rem; margin-top: .45rem; font: 400 .74rem/1.35 var(--sans); color: var(--muted); }
	.imp-cmp-price strong { font-weight: 600; color: var(--ink); }
	.imp-firm-word { display: block; }
	.imp-firm-num { display: block; margin-top: .3rem; font-size: .78rem; color: var(--muted); }
	.imp-compare .imp-meter { gap: 2px; margin-top: .35rem; }
	.imp-compare .imp-meter i { width: 4px; height: 5px; }
	.imp-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}


/* Third line under each key spec on the product page (e.g. "Balanced"). */
.imp-specs .imp-spec-note { font: 400 .84rem/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }

.imp-specs > div { align-content: start; }

/* About facts: every label is exactly two lines. */
.imp-facts span { display: block; line-height: 1.5; white-space: nowrap; }
@media (max-width: 380px) { .imp-facts span { white-space: normal; } }
.imp-facts b { white-space: nowrap; }
@media (max-width: 600px) { .imp-facts b { font-size: 1.6rem; } }

/* Category filters on phones: label on its own line, each set of chips on one line. */
@media (max-width: 600px) {
	.imp-filters { gap: .9rem 0; }
	.imp-fgroup { width: 100%; flex-wrap: wrap; gap: .4rem; }
	.imp-fgroup > span { flex-basis: 100%; margin: 0 0 .1rem; }
	.imp-chip { padding: .45rem .6rem; font-size: .8rem; white-space: nowrap; min-height: 34px; }
	.imp-count { margin-left: 0; }
}
@media (max-width: 360px) { .imp-chip { padding: .42rem .5rem; font-size: .76rem; } .imp-fgroup { gap: .3rem; } }
