/*
 * Elementor-built pages (inc/elementor-pages.php): adapters so Elementor's wrappers keep the site.css design.
 * Loaded only on pages built with Elementor, after site.css. Each rule names the Elementor default it undoes.
 */

/* Containers: Elementor's flex containers default to a column; ours that are flex rows say so here. */
.e-con.tpk-hero2__ctas,
.e-con.tpk-section__head--split,
.e-con.tpk-story-hero__cta,
.e-con.tpk-el-row { --flex-direction: row; }
.e-con.tpk-el-row { --flex-wrap: wrap; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

/* Widgets: `.e-con .elementor-widget.elementor-widget { margin-block-end: 0 }` drops our margins. */
.e-con .elementor-widget.tpk-section__head { margin-bottom: 2.5rem; }

/* Buttons: Elementor's button widget with our classes on the link (Advanced → custom attributes). */
.tpk-elbtn .elementor-button .elementor-button-content-wrapper { display: inline; }
.tpk-elbtn .elementor-button.tpk-btn { font-size: .95rem; line-height: 1.2; fill: currentColor; }
.tpk-elbtn .elementor-button.tpk-btn:visited { color: var(--tpk-white); }
.tpk-elbtn .elementor-button.tpk-btn--light:visited,
.tpk-elbtn .elementor-button.tpk-btn--ghost:visited { color: var(--tpk-navy); }
.tpk-elbtn .elementor-button.tpk-link-arrow { padding: 0 0 2px; border-radius: 0; font-size: inherit; line-height: inherit; background-color: transparent; }
.tpk-elbtn .elementor-button.tpk-link-arrow,
.tpk-elbtn .elementor-button.tpk-link-arrow:visited { color: var(--tpk-navy); }
.tpk-elbtn .elementor-button.tpk-link-arrow:hover,
.tpk-elbtn .elementor-button.tpk-link-arrow:focus { color: var(--tpk-pink-dark); }

/* Home: floating ingredient tags sit over the photo (the shortcode wrapper takes the photo's box). */
.e-con .elementor-widget.tpk-tags-wrap { position: absolute; inset: 0; width: auto; pointer-events: none; }
.tpk-tags-wrap .elementor-shortcode { position: static; }
.tpk-tags-wrap .tpk-tag { pointer-events: auto; }

/* Home: market photos were <figure>s; Elementor image widgets stand in for them. */
.tpk-markets2__photos > .tpk-el-figure { margin: 0; position: absolute; overflow: hidden; box-shadow: 0 24px 50px rgba(35, 57, 110, .16); border-radius: 28px; }
.tpk-markets2__photos > .tpk-el-figure:first-child { left: 0; top: 0; width: 56%; height: 82%; transform: rotate(-3deg); }
.tpk-markets2__photos > .tpk-el-figure:last-child { right: 0; bottom: 0; width: 58%; height: 52%; transform: rotate(2.5deg); border: 6px solid var(--tpk-paper); }
.tpk-markets2__photos > .tpk-el-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpk-markets2__photos > .tpk-el-figure:last-child img { object-position: center 30%; }

/* Images: Elementor centres image widgets; ours fill their box. */
.elementor-widget-image.tpk-el-fill img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Containers: Elementor sizes every container `width: 100%`, which ignores our side margins (mobile sections
   with `margin: 1rem` overflowed). The page wrapper is a plain block like the <main> it replaces, so its
   sections size like ordinary blocks. */
.e-con.tpk-el-page { display: block; }
.tpk-el-page > .e-con-full.e-flex { --width: auto; }

/* site.css child selectors (`__text > p`) no longer reach text inside an Elementor text widget. */
.tpk-ingredients__text .elementor-widget-text-editor p:not(.tpk-eyebrow) { font-size: 1.08rem; color: var(--tpk-ink); }
.tpk-markets2__text .elementor-widget-text-editor p:not(.tpk-eyebrow) { font-size: 1.08rem; }
.tpk-family__text .elementor-widget-text-editor p:not(.tpk-eyebrow):not(.tpk-family__quote) { font-size: 1.05rem; margin: 0 0 2rem; }

/* Split headers stay on one row (Elementor wraps containers on mobile); the heading side shrinks. */
.e-con.tpk-section__head--split { flex-wrap: nowrap; }
