/* Tek Cabinets × Hello Elementor compatibility */

/* Hello's theme.css limits ".site-header"/".site-footer" to 1140px; Tek's are full width. */
:where(.site-header, .site-footer) { max-width: none; width: auto; margin-inline: 0; padding-inline: 0; }

/* Tek pages: full width, no Hello page wrapper spacing. */
.tek-main { display: block; width: 100%; margin: 0; padding: 0; }
.tek-main .wp-block-post-content > * { margin-block: 0; }

/* Normal (non-Tek, non-Elementor) pages and posts: keep Hello's centred layout readable under the fixed Tek header. */
body:not(.tek-page):not(.elementor-page) .site-main { padding-block: clamp(32px, 6vw, 72px); }
body:not(.tek-page) .site-main .page-header .entry-title { font-family: var(--font-head); }

/* Elementor Canvas pages have no header: remove the header offset. */
body.page-template-elementor_canvas, body.elementor-template-canvas { padding-top: 0; }

/* Skip link (Hello's class name). */
.skip-link.screen-reader-text:focus { z-index: 300; }

/* Readable content on normal pages and posts (Hello's templates, not Tek or Elementor pages). */
body:not(.tek-page):not(.elementor-page) .site-main { max-width: 860px; margin-inline: auto; padding-inline: var(--gutter, 24px); }
/* Product Hub catalog and product pages: wide layout so the filter sidebar sits beside the grid
   (the plugin's own wrapper caps the width at its container setting, 1280px by default). */
body:is(.sls-pm-catalog-page, .sls-pm-single-page):not(.tek-page):not(.elementor-page) .site-main { max-width: none; width: 100%; }
/* Catalog grid: 3 columns beside the filters on desktop (the plugin still drops columns on smaller screens). */
.sls-pm-catalog-page .sls-pm-shop-main .sls-pm-product-grid { --sls-pm-cols: 3 !important; }
body:not(.tek-page):not(.elementor-page) .site-main .page-header { margin-bottom: var(--s4, 32px); }
body:not(.tek-page):not(.elementor-page) .site-main .entry-title { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h2, 40px); line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
body:not(.tek-page):not(.elementor-page) .page-content { color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
body:not(.tek-page):not(.elementor-page) .page-content > * + * { margin-top: 1.1em; }
body:not(.tek-page):not(.elementor-page) .page-content :is(h2, h3, h4) { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin-top: 1.6em; }
body:not(.tek-page):not(.elementor-page) .page-content h2 { font-size: var(--fs-h3, 28px); }
body:not(.tek-page):not(.elementor-page) .page-content h3 { font-size: 22px; }
body:not(.tek-page):not(.elementor-page) .page-content :is(ul, ol) { padding-left: 1.4em; }
body:not(.tek-page):not(.elementor-page) .page-content li + li { margin-top: .4em; }
body:not(.tek-page):not(.elementor-page) .page-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
body:not(.tek-page):not(.elementor-page) .page-content blockquote { border-left: 3px solid var(--brand); padding-left: 1em; color: var(--ink); }
body:not(.tek-page):not(.elementor-page) .page-content img { height: auto; border-radius: 6px; }

/* Hello's reset gives every <button> 8px 16px padding and nowrap, which squeezed Tek icon buttons
   (search, menu, close, arrows, contact toggle). Undo that for Tek UI only; :where() keeps it at zero
   specificity so each Tek component's own padding still wins. */
:where(.site-header, .hsearch, .mega, .drawer, .dock, .tek-main, .site-footer) :where(button, [type="button"], [type="submit"]) {
	padding: 0;
	white-space: normal;
}
:where(.site-header, .hsearch, .drawer, .dock, .tek-main) :where(.ib, .round, .dock-toggle) svg { flex: none; }
