/* ============================================================
   Content — page hero, entry/prose, posts, search, pagination
   ============================================================ */

/* Page hero band */
.page-hero { background: var(--c-mist); border-bottom: 1px solid var(--c-line); padding-block: clamp(32px, 5vw, 64px); }
.page-hero h1 { font-size: var(--fs-h1); color: var(--c-blue); }
.page-hero .breadcrumb { font-family: var(--font-head); font-weight:700; font-size: var(--fs-xs); letter-spacing:.08em; text-transform:uppercase; color: var(--c-muted); margin-bottom: 10px; }
.page-hero .breadcrumb a { color: var(--c-blue); }
.post-meta { color: var(--c-muted); font-size: var(--fs-sm); margin-top: 8px; }

/* Entry / prose */
.page-entry, .post-entry { padding-block: clamp(32px, 5vw, 64px); }
.entry { max-width: 1000px; }
.entry > * + * { margin-top: 1.1rem; }
.entry h2 { font-size: var(--fs-h2); margin-top: 2rem; }
.entry h3 { font-size: var(--fs-h3); margin-top: 1.6rem; }
.entry img { border-radius: var(--r); }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin: .35em 0; }
.entry a { text-decoration: underline; text-underline-offset: 3px; }
.entry-fullwidth { width: 100%; }   /* Elementor pages manage their own width */
.post-featured { margin-bottom: 1.6rem; }
.post-featured img { width: 100%; border-radius: var(--r); }

/* Post grid / cards */
.post-grid { margin-top: 8px; }
.post-card { background:#fff; border:1px solid var(--c-line); border-radius: var(--r); overflow:hidden; display:flex; flex-direction:column; transition: transform .15s var(--ease), box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.post-card__media { display:block; aspect-ratio: 16/10; background: var(--c-mist); }
.post-card__media img { width:100%; height:100%; object-fit:cover; }
.post-card__body { padding: 18px 20px 22px; display:flex; flex-direction:column; gap:8px; }
.post-card__body h3 { font-size: 1.15rem; }
.post-card__body p { color: var(--c-muted); font-size: var(--fs-sm); }
.readmore { font-family: var(--font-head); font-weight:800; text-transform:uppercase; font-size:.78rem; letter-spacing:.04em; }

/* Search */
.search-list { list-style:none; padding:0; margin:0; }
.search-item { padding: 18px 0; border-bottom: 1px solid var(--c-line); }
.search-item h3 { font-size: 1.2rem; }
.search-item p { color: var(--c-muted); margin-top: 4px; }

.ts-search { display:flex; align-items:center; gap:8px; position:relative; }
.ts-search__ic { position:absolute; left:14px; color: var(--c-muted); }
.ts-search input[type="search"] { flex:1; height:52px; padding: 0 14px 0 44px; border:1px solid var(--c-line); border-radius: var(--r-sm); font-size:1rem; background:#fff; }
.ts-search input[type="search"]:focus { border-color: var(--c-blue); outline:none; }

/* Header search drawer */
.header-search { max-height:0; overflow:hidden; transition: max-height .25s var(--ease); border-top:0 solid var(--c-line); background:#fff; }
.header-search.is-open { max-height: 120px; border-top:1px solid var(--c-line); }
.header-search .container { padding-block: 14px; }
.site-header.is-scrolled { box-shadow: var(--sh-sm); }

/* Pagination */
.pagination, .woocommerce-pagination { margin-top: 36px; }
.pagination .page-numbers, .woocommerce-pagination .page-numbers { display:inline-grid; place-items:center; min-width:44px; height:44px; padding:0 12px; border:1px solid var(--c-line); border-radius: var(--r-sm); margin:0 3px; font-family:var(--font-head); font-weight:800; color: var(--c-ink); list-style:none; }
.pagination .page-numbers.current, .woocommerce-pagination .page-numbers.current { background: var(--c-blue); color:#fff; border-color: var(--c-blue); }
.woocommerce-pagination ul { display:flex; justify-content:center; gap:6px; border:0 !important; }
.woocommerce-pagination ul li { border:0 !important; }

/* ============================================================
   Empty-paragraph cleanup.
   wpautop wraps block-level shortcode output (e.g. <p><div class="fl-col">),
   and the browser auto-closes those into empty <p></p> that add 1rem of dead
   vertical space. Collapse empty / whitespace-only / <br>-only paragraphs.
   ============================================================ */
.entry p:empty, .entry-fullwidth p:empty, .page-entry p:empty, .post-entry p:empty,
.fl-section__inner p:empty, .fl-row p:empty, .fl-col p:empty,
.woocommerce-Tabs-panel p:empty,
.woocommerce-product-details__short-description p:empty { display: none !important; margin: 0 !important; }
/* whitespace-only and <br>-only paragraphs (modern browsers: :blank / :has) */
.entry p:blank, .fl-section__inner p:blank, .fl-col p:blank, .woocommerce-Tabs-panel p:blank,
.entry p:has(> br:only-child), .fl-section__inner p:has(> br:only-child),
.fl-col p:has(> br:only-child), .woocommerce-Tabs-panel p:has(> br:only-child) { display: none !important; margin: 0 !important; }

/* ============================================================
   Rich-text / prose defaults — applies to page content, product
   descriptions, Flatsome content sections, posts & the Woo tabs.
   ============================================================ */
.entry,
.fl-section__inner,
.woocommerce-Tabs-panel,
.woocommerce-product-details__short-description,
.woocommerce-tabs .panel {
  color: var(--c-text); line-height: 1.7;
}
/* Headings */
.entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6,
.fl-section__inner h1, .fl-section__inner h2, .fl-section__inner h3, .fl-section__inner h4,
.woocommerce-Tabs-panel h1, .woocommerce-Tabs-panel h2, .woocommerce-Tabs-panel h3, .woocommerce-Tabs-panel h4 {
  font-family: var(--font-head); font-weight: 800; color: var(--c-ink); line-height: 1.15; letter-spacing: -0.01em;
  margin: 1.6em 0 .5em;
}
.entry h2, .fl-section__inner h2, .woocommerce-Tabs-panel h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.entry h3, .fl-section__inner h3, .woocommerce-Tabs-panel h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
.entry h4, .fl-section__inner h4, .woocommerce-Tabs-panel h4 { font-size: 1.1rem; }
.entry > :first-child, .woocommerce-Tabs-panel > :first-child { margin-top: 0; }

/* Paragraphs, links, inline */
.entry p, .fl-section__inner p, .woocommerce-Tabs-panel p, .woocommerce-product-details__short-description p { margin: 0 0 1rem; }
.entry a, .fl-section__inner a, .woocommerce-Tabs-panel a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 2px; }
.entry a:hover, .fl-section__inner a:hover, .woocommerce-Tabs-panel a:hover { color: var(--c-blue-600); }
.entry strong, .woocommerce-Tabs-panel strong, .fl-section__inner strong { font-weight: 700; color: var(--c-ink); }

/* Lists */
.entry ul, .entry ol, .fl-section__inner ul, .fl-section__inner ol,
.woocommerce-Tabs-panel ul, .woocommerce-Tabs-panel ol,
.woocommerce-product-details__short-description ul { margin: 0 0 1rem; padding-left: 1.35em; }
.entry li, .fl-section__inner li, .woocommerce-Tabs-panel li { margin: .35em 0; }
.entry ul li::marker, .woocommerce-Tabs-panel ul li::marker, .fl-section__inner ul li::marker { color: var(--c-blue); }

/* Media */
.entry img, .fl-section__inner img, .woocommerce-Tabs-panel img { height: auto; border-radius: var(--r-sm); }
.entry figure, .woocommerce-Tabs-panel figure { margin: 1.5rem 0; }
.entry figcaption { font-size: var(--fs-sm); color: var(--c-muted); margin-top: 6px; text-align: center; }

/* Blockquote */
.entry blockquote, .woocommerce-Tabs-panel blockquote {
  margin: 1.5rem 0; padding: .6rem 1.2rem; border-left: 4px solid var(--c-volt);
  background: var(--c-mist); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--c-ink); font-size: 1.05rem;
}

/* Horizontal rule */
.entry hr, .woocommerce-Tabs-panel hr { border: 0; border-top: 1px solid var(--c-line); margin: 2rem 0; }

/* ---- Tables (price lists, spec tables, Woo attributes) ---- */
.entry table, .fl-section__inner table, .woocommerce-Tabs-panel table,
table.shop_attributes, table.woocommerce-product-attributes {
  width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: var(--fs-sm);
  border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden;
}
.entry th, .fl-section__inner th, .woocommerce-Tabs-panel th,
table.shop_attributes th, table.woocommerce-product-attributes th {
  background: var(--c-ink); color: #fff; font-family: var(--font-head); font-weight: 800;
  text-transform: uppercase; font-size: var(--fs-xs); letter-spacing: .04em;
  text-align: left; padding: 12px 14px; border: 0;
}
.entry td, .fl-section__inner td, .woocommerce-Tabs-panel td,
table.shop_attributes td, table.woocommerce-product-attributes td {
  padding: 10px 14px; border-top: 1px solid var(--c-line); vertical-align: top;
}
.entry tbody tr:nth-child(even), .fl-section__inner tbody tr:nth-child(even),
.woocommerce-Tabs-panel tbody tr:nth-child(even) { background: var(--c-mist); }
.entry tbody tr:hover, .fl-section__inner tbody tr:hover { background: var(--c-blue-050); }
/* WooCommerce attributes table: first column is a label */
table.shop_attributes th, table.woocommerce-product-attributes th { background: var(--c-mist); color: var(--c-ink); width: 30%; }

/* Let very wide content tables scroll instead of breaking layout */
.entry, .fl-col, .woocommerce-Tabs-panel { max-width: 100%; }
.entry table, .fl-col table, .woocommerce-Tabs-panel table { display: table; }
@media (max-width: 640px) {
  .entry table, .fl-col table, .woocommerce-Tabs-panel table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Builder pages (Flatsome/Elementor) bring their own section padding —
   the page wrapper shouldn't add another ~64px above and below. */
.page-entry--builder { padding-block: 0; }

/* Builder pages sometimes carry loose content outside any [section]
   (e.g. the Contact page's heading + form). Constrain it like a container
   instead of letting it run edge-to-edge. */
.entry-fullwidth > :not(section):not(div):not(style):not(script),
.entry-fullwidth > div.wpforms-container,
.entry-fullwidth > .fl-row {
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
	box-sizing: border-box;
}
