/* Sense Roastery 8.2 — purchase consultation + responsive hardening.
 * Only new theme-controlled components; stored Elementor layouts are untouched. */
:root { --sr-consult-bar-height:52px; --sr-header-main-height:91px; }

/* Text remains legible on the colored/light surfaces across custom palettes. */
body .sr-consult-section,
body .sr-consult-section * { box-sizing:border-box; }
body .sr-consult-section {
  position:relative; isolation:isolate; margin-block:50px;
  padding:clamp(44px,6vw,92px) max(20px,var(--sr-gutter,24px));
  background:var(--sr-alt,#eee9df)!important; color:var(--sr-alt-ink,#24231f)!important;
  direction:rtl; text-align:right; min-width:0;
}
body .sr-consult-section-inner {
  max-width:var(--sr-width,1320px); margin-inline:auto; width:100%;
  display:grid; grid-template-columns:minmax(0,1fr) minmax(250px,.42fr);
  align-items:center; column-gap:clamp(28px,5vw,80px); row-gap:28px;
}
body .sr-consult-copy, body .sr-consult-action {min-width:0;}
body .sr-consult-eyebrow {
  display:flex; flex-direction:row; align-items:center; justify-content:flex-start;
  gap:12px; text-align:right; direction:rtl; width:100%;
  color:var(--sr-alt-accent,#6b5844)!important; font-size:11px; font-weight:700;
  letter-spacing:.09em; line-height:1.8; overflow-wrap:anywhere;
}
body .sr-consult-eyebrow::after {content:""; height:1px; width:30px; flex:0 0 30px; background:currentColor; }
body .sr-consult-section h2 {
  font-size:clamp(28px,3.3vw,52px); font-weight:650; line-height:1.5;
  letter-spacing:-.025em; margin:18px 0 16px; overflow-wrap:anywhere;
  color:var(--sr-alt-ink,#24231f)!important; -webkit-text-fill-color:var(--sr-alt-ink,#24231f)!important;
}
body .sr-consult-section p {
  font-size:clamp(14px,1.18vw,17px); line-height:2.2; margin:0; max-width:690px;
  color:var(--sr-alt-ink,#24231f)!important; -webkit-text-fill-color:var(--sr-alt-ink,#24231f)!important;
}
body .sr-consult-action { display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
body .sr-consult-caption {font-size:12px; font-weight:600; color:var(--sr-alt-ink,#24231f)!important;}
body .sr-consult-privacy {font-size:11px;color:var(--sr-alt-ink,#24231f)!important;}
body .sr-consult-button {
  display:inline-flex; justify-content:center; align-items:center; gap:11px;
  min-height:48px; max-width:100%; padding:12px 22px;
  font-size:13px; font-weight:700; line-height:1.65; text-align:center;
  text-decoration:none!important; border:1px solid var(--sr-ink,#24231f);
  background:var(--sr-ink,#24231f); color:var(--sr-button-text,#fff)!important;
  -webkit-text-fill-color:var(--sr-button-text,#fff)!important;
  border-radius:4px; transition:transform .2s,box-shadow .2s; white-space:normal;
  overflow-wrap:anywhere; cursor:pointer;
}
body .sr-consult-button span { color:inherit!important; -webkit-text-fill-color:inherit!important; }
body .sr-consult-button svg {display:block; flex:none; width:20px; height:20px; }
body .sr-consult-button:hover { transform:translateY(-2px);box-shadow:0 7px 16px rgba(0,0,0,.12); }
body .sr-consult-button:focus-visible {outline:3px solid var(--sr-accent,#6b5844);outline-offset:3px;}

/* Secondary consultation line sits INSIDE both the Elementor and PHP header.
   Unlike inserting Elementor widgets, this remains editable via theme settings. */
body .site-header.sr-has-consult-header {height:auto!important;min-height:0!important;}
body .site-header.sr-has-consult-header.sr-elementor-site-header>.elementor {height:var(--sr-header-main-height);}
body .site-header .sr-consult-header-bar {
  width:100%; height:var(--sr-consult-bar-height);
  background:var(--sr-deep,#292b24)!important; color:var(--sr-inverse,#faf8f2)!important;
  border-top:1px solid rgba(255,255,255,.14); position:relative; z-index:1;
}
body .site-header .sr-consult-header-inner {
  height:100%;display:flex;align-items:center;justify-content:space-between; gap:15px;
  width:calc(100% - 2*var(--sr-gutter,24px)); max-width:var(--sr-width,1320px);
  margin-inline:auto; direction:rtl;
}
body .site-header .sr-consult-header-text {
  min-width:0; font-size:12px; font-weight:500; line-height:1.5;
  color:var(--sr-inverse,#fff)!important; -webkit-text-fill-color:var(--sr-inverse,#fff)!important;
}
body .site-header .sr-consult-button--header {
  min-height:38px; padding:7px 16px; font-size:12px; border-color:var(--sr-inverse,#fff);
  background:var(--sr-inverse,#fff);color:var(--sr-deep,#292b24)!important;
  -webkit-text-fill-color:var(--sr-deep,#292b24)!important;flex:none;
}
body .site-header .sr-consult-button--header svg {width:17px;height:17px;}

/* Keep the new CTA visible with pre-existing, user-edited Elementor footers. */
body .site-footer .sr-consult-footer {
  width:100%; background:var(--sr-alt,#eee9df)!important; border-top:1px solid var(--sr-border,#d8d1c6);
  color:var(--sr-alt-ink,#24231f)!important;
}
body .site-footer .sr-consult-footer-inner {
  max-width:var(--sr-width,1320px); width:calc(100% - 2*var(--sr-gutter,24px));
  margin-inline:auto; padding:25px 0; display:flex; direction:rtl;
  align-items:center; justify-content:space-between; gap:18px;
}
body .site-footer .sr-consult-footer p {
  font-size:14px;font-weight:600;line-height:1.8;margin:0;
  color:var(--sr-alt-ink,#24231f)!important; -webkit-text-fill-color:var(--sr-alt-ink,#24231f)!important;
}
body .site-footer .sr-consult-button--footer {flex:none;}

/* Across existing Elementor sections: avoid text overflow on small screens. */
body .sense-main-content,body .sense-main-content .elementor,body .sense-main-content .e-con,
body .sense-main-content .elementor-widget,body .sense-main-content .elementor-widget-container {min-width:0;}
body .sense-main-content :is(img,video,iframe) {max-width:100%;}
body .sense-main-content :is(.elementor-heading-title,.product-body h3,.sr-consult-copy h2) {overflow-wrap:anywhere;}
body .sense-main-content :is(input,select,textarea) {max-width:100%;min-width:0;}
body .sr-consult-section :is(a,button),body .sr-consult-footer :is(a,button) {touch-action:manipulation;}

@media(max-width:1120px) {
  :root { --sr-header-main-height:87px; }
  body .site-header.sr-has-consult-header .sense-el-navigation .mobile-nav {
    top:calc(var(--sr-header-main-height) + var(--sr-consult-bar-height))!important;
    max-height:calc(100dvh - var(--sr-header-main-height) - var(--sr-consult-bar-height))!important;
    z-index:1010;
  }
  body.admin-bar .site-header.sr-has-consult-header .sense-el-navigation .mobile-nav {
    top:calc(var(--sr-header-main-height) + var(--sr-consult-bar-height) + 32px)!important;
    max-height:calc(100dvh - var(--sr-header-main-height) - var(--sr-consult-bar-height) - 32px)!important;
  }
}
@media(max-width:820px) {
  body .sr-consult-section-inner {grid-template-columns:minmax(0,1fr);}
  body .sr-consult-action {align-items:stretch;}
  body .sr-consult-action .sr-consult-button{width:100%;}
}
@media(max-width:782px) {
  body.admin-bar .site-header.sr-has-consult-header .sense-el-navigation .mobile-nav {
    top:calc(var(--sr-header-main-height) + var(--sr-consult-bar-height) + 46px)!important;
    max-height:calc(100dvh - var(--sr-header-main-height) - var(--sr-consult-bar-height) - 46px)!important;
  }
}
@media(max-width:600px) {
  :root { --sr-header-main-height:72px; --sr-consult-bar-height:49px; }
  body .sr-consult-section {padding:42px 20px;margin-block:50px;}
  body .sr-consult-section h2{font-size:clamp(27px,7vw,36px);line-height:1.5;}
  body .sr-consult-section p {font-size:14px;line-height:2;}
  body .sr-consult-button{width:100%;min-height:48px;padding:12px 14px;}
  body .site-header .sr-consult-header-inner{width:calc(100% - 32px);}
  body .site-header .sr-consult-header-text {font-size:11px;}
  body .site-header .sr-consult-button--header {width:auto;flex:none;max-width:65%;min-height:37px;padding:6px 11px;font-size:11px;gap:6px;}
  body .site-footer .sr-consult-footer-inner {width:calc(100% - 40px);flex-direction:column;align-items:stretch;text-align:right;padding:23px 0;gap:13px;}
  body .site-footer .sr-consult-footer p{font-size:13px;}
  body .site-footer .sr-consult-button--footer{width:100%;}
  body .sense-main-content .elementor .e-con {max-width:100%;}
  body .sense-main-content .elementor .products-grid,body .sense-main-content .service-grid,body .sense-main-content .process-grid{min-width:0;}
  body .sense-main-content :is(.sr-hero-actions,.hero-buttons) :is(a,.elementor-button){min-height:44px;}
}
@media(max-width:390px) {
  body .site-header .sr-consult-header-text{display:none;}
  body .site-header .sr-consult-header-inner{justify-content:center;}
  body .site-header .sr-consult-button--header{width:100%;max-width:100%;}
  body .sr-consult-eyebrow {font-size:10px;letter-spacing:.035em;}
}
@media(prefers-reduced-motion:reduce){body .sr-consult-button{transition:none!important;transform:none!important;}}
/* Match the PHP navigation fallback when Elementor is not active. */
body .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .header-inner {height:91px;}
@media(max-width:960px) {
  body .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .mobile-nav {
    top:calc(91px + var(--sr-consult-bar-height))!important;
    max-height:calc(100dvh - 91px - var(--sr-consult-bar-height));
    overflow-y:auto;z-index:1005;
  }
  body.admin-bar .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .mobile-nav {
    top:calc(91px + var(--sr-consult-bar-height) + 32px)!important;
    max-height:calc(100dvh - 91px - var(--sr-consult-bar-height) - 32px);
  }
}
@media(max-width:782px) and (min-width:761px) {
  body.admin-bar .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .mobile-nav {
    top:calc(91px + var(--sr-consult-bar-height) + 46px)!important;
    max-height:calc(100dvh - 91px - var(--sr-consult-bar-height) - 46px);
  }
}
@media(max-width:760px) {
  body .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .header-inner {height:77px;}
  body .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .mobile-nav {
    top:calc(77px + var(--sr-consult-bar-height))!important;
    max-height:calc(100dvh - 77px - var(--sr-consult-bar-height));
    overflow-y:auto;z-index:1005;
  }
  body.admin-bar .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .mobile-nav {
    top:calc(77px + var(--sr-consult-bar-height) + 46px)!important;
    max-height:calc(100dvh - 77px - var(--sr-consult-bar-height) - 46px);
  }
}
@media(max-width:600px) {
  body .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .header-inner {height:72px;}
  body .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .mobile-nav {
    top:calc(72px + var(--sr-consult-bar-height))!important;
    max-height:calc(100dvh - 72px - var(--sr-consult-bar-height));
  }
  body.admin-bar .site-header.sr-has-consult-header:not(.sr-elementor-site-header) .mobile-nav {
    top:calc(72px + var(--sr-consult-bar-height) + 46px)!important;
    max-height:calc(100dvh - 72px - var(--sr-consult-bar-height) - 46px);
  }
}
/* Edits from the panel should not turn a short header utility row into a tall banner. */
body .site-header .sr-consult-button--header span {
  display:block;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body .site-header .sr-consult-header-text {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
}
