/* =========================================================
   WordPress + Elementor compatibility for the Q-Furniture theme.
   Imported pages use one Elementor container per section with an
   HTML widget inside. These rules make the containers invisible so
   the section markup renders exactly like the approved mockup.
   ========================================================= */

/* Elementor containers that wrap a section: no padding, no gap. */
.elementor .e-con.qf-block {
  --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px;
  --margin-top: 0px; --margin-bottom: 0px;
  --gap: 0px; --row-gap: 0px; --column-gap: 0px;
  --min-height: 0px;
  padding: 0;
}
.elementor .e-con.qf-block > .elementor-widget,
.elementor .e-con.qf-block > .e-con-inner > .elementor-widget { width: 100%; max-width: 100%; margin: 0; }
.elementor .qf-block .elementor-widget-html,
.elementor .qf-block .elementor-widget-html > .elementor-widget-container { margin: 0; padding: 0; }

/* Elementor sets img { height:auto } inside .elementor; keep the design's cropped figures. */
.elementor .tile-fig img,
.elementor .gallery-main img,
.elementor .gallery-thumbs img,
.elementor .related-products img,
.elementor .hero-fig img,
.elementor .buyer-fig img,
.elementor .project-fig img,
.elementor .post-fig img,
.elementor .split-fig img,
.elementor .factory-fig img { height: 100%; }

/* Inline style heights set in content still win (style attribute). */

/* Admin bar offset for the sticky header. */
.admin-bar .site-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.admin-bar .nav-drawer { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav-drawer { top: 46px; } }

/* Skip link. */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; }
.skip-link:focus { top: 12px; }

/* Forms: honeypot, error message, upload label state. */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-error { display: flex; gap: 10px; padding: 12px 14px; background: #FBEDE4; border-left: 3px solid var(--signal); color: #7A2F08; font-size: 14px; border-radius: 0 var(--radius) var(--radius) 0; }
.form-error[hidden] { display: none; }
.upload.has-files { border-style: solid; border-color: var(--green); background: var(--green-tint); }

/* Footer menus rendered by wp_nav_menu. */
.footer .menu-item a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Content pages without Elementor. */
.prose img { height: auto; }
.nav-links { display: flex; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.nav-links .page-numbers { padding: 6px 10px; border: 1px solid var(--line); border-radius: 2px; }
.nav-links .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Catalogue (WooCommerce): category chips, 4-up related grid, spec table from the old site. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-family: var(--font-display); font-weight: 500; font-size: 14.5px; color: var(--ink-2); }
.chip-link:hover { border-color: var(--navy); color: var(--ink); }
.chip-link span { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spec-wrap .spec { font-size: 14.5px; }
.spec-wrap .spec th, .spec-wrap .spec td { width: auto !important; }
.tile-fig img, .gallery-main img { object-fit: contain; background: #fff; }

/* Migrated blog posts. */
.post-cover { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; }
.post-cover img { width: 100%; height: auto; display: block; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose table th, .prose table td { border-bottom: 1px solid var(--rule); padding: 10px 8px; text-align: left; vertical-align: top; }
.prose iframe { max-width: 100%; }
/* The old site's Foxtool plugin baked its own TOC widget into some posts; the theme builds its own. */
.ft-toc-placeholder, .ft-toc-close { display: none !important; }
@media (max-width: 560px) {
  .tiles--catalogue { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .tiles--catalogue .tile-cap h3 { font-size: 15px; }
  .tiles--catalogue .tile-cap .ic { display: none; }
}
