/*
 * BuyEverything / Premium Fit v8.0
 * Shared responsive layout for legacy HTML pages rendered by PHP.
 * Keeps every image source and natural image ratio unchanged.
 * Loaded AFTER the original inline CSS and earlier CMS enhancements.
 */
:root { --bv-page-width: 1180px; --bv-page-gutter: 32px; --bv-ink-strong: #0a2e48; }

/* Every major section aligns to the same 1180px content grid. */
body .container,
#contact.bv-site-footer .bv-footer-wrap {
  box-sizing: border-box;
  width: min(var(--bv-page-width), calc(100% - var(--bv-page-gutter)));
  max-width: var(--bv-page-width);
  margin-inline: auto;
}
body .container > *, body main, body main > section,
body .grid2 > *, body .imageBand > *, body .featureStack > *,
body .heroGrid > *, body .bluePanel > *, body .check > div {
  min-width: 0;
}
body img, body video, body iframe {max-width: 100%;}
body :is(.check,.bluePanel,.posterCaption,.card) {overflow-wrap: break-word;}

/* Reduce vertical waste while preserving all original text and image assets. */
body section.section:not(.bv-article-section) {padding-block: clamp(23px, 2.4vw, 32px);}
body .hero {padding-block: 18px 25px;}
body .heroGrid {gap: clamp(12px, 1.6vw, 20px);}
body .heroText {padding: clamp(16px, 2.1vw, 24px);}
body .ctaRow {gap: 9px; margin-block: 15px;}
body .trust {gap: 8px; margin-top: 12px;}
body .trust > div {padding: 10px; border-radius: 12px;}
body .title {margin-bottom: 18px;}
body .title h2 {font-size: clamp(24px, 2.6vw, 34px);line-height:1.23;margin-bottom: 7px;}
body .title p {font-size: 15px;line-height:1.62;}
body .cards {gap: 12px;}
body .cards .card {padding: 16px;border-radius: 17px;}
body .cards .card b {font-size: 27px;line-height:1;}
body .cards .card h3 {font-size: 18px;margin: 6px 0 5px;line-height:1.3;}
body .cards .card p {font-size: 14px;line-height: 1.65;}

/* Remove legacy browser-default figure indent causing uneven edges. */
body figure:is(.mainVisual,.featurePoster,.poster,.bigPoster) {margin: 0;}
body .featureStack {gap: 14px;}
body .featurePoster {
  border: 1px solid #dcecf4;
  border-radius: 18px;
  padding: 5px;
  background: #fff;
  box-shadow: 0 9px 25px rgba(8,45,73,.08);
}
body .featurePoster img,
body .poster img,
body .bigPoster img,
body .mainVisual img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  object-fit: contain !important;
  aspect-ratio: auto !important;
}
body .posterCaption {padding: 14px 18px 17px;}
body .posterCaption h3 {font-size: clamp(18px,1.8vw,23px);line-height:1.32;margin-bottom:6px;}
body .posterCaption p {font-size: 14px;line-height:1.65;}
body .posterCaption .miniTags {gap:6px;margin-top: 9px;}
body .posterCaption .miniTags span {padding: 5px 9px;font-size: 12px;}
body .imageBand {gap: 16px;}
body .imageBand > * {min-width:0;}

/* Compact and visually balanced preparation panel from the user's screenshot. */
body #howto .container.grid2 {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: clamp(14px, 1.8vw, 20px);
  align-items: stretch;
}
body #howto .bigPoster {
  width: 100%;
  max-width: 500px;
  align-self: start;
  justify-self: center;
  border: 6px solid #fff;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(8,46,74,.11);
  overflow: hidden;
  background: #fff;
}
body #howto .bluePanel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: stretch;
  padding: clamp(17px, 1.8vw, 23px);
  border: 1px solid #cde5ef;
  border-radius: 22px;
  background: linear-gradient(148deg,#eaf8fd 0%,#f4fbfd 43%,#ffffff 100%);
  box-shadow: 0 10px 27px rgba(8,51,77,.07);
  color: #25465a;
  font-size: 14px;
  line-height: 1.57;
}
body #howto .bluePanel::before {
  content: "";
  width: 44px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #079bc8, #2ac6b6);
  margin-bottom: 11px;
  flex: none;
}
body #howto .bluePanel h2 {
  color: var(--bv-ink-strong);
  font-size: clamp(21px,2.2vw,27px);
  line-height: 1.29;
  letter-spacing: -.02em;
  font-weight: 900;
  margin: 0 0 8px;
  text-wrap: pretty;
}
body #howto .bluePanel > p {margin: 0 0 7px;line-height:1.55;font-size: 14px;color:#405d6d;}
body #howto .checklist {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  grid-auto-rows: minmax(min-content,1fr);
  flex: 1 0 auto;
  min-height: 0;
  gap: 8px;
  margin: 13px 0 0;
}
body #howto .check {
  display: grid;
  grid-template-columns: 29px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #deebf1;
  border-left: 3px solid #54b7d8;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 7px rgba(15,66,94,.025);
  font-size: 13.6px;
  line-height: 1.5;
  color: #455e6e;
}
body #howto .check:nth-child(2n) {border-left-color: #40bcae;}
body #howto .check i {
  display: grid;
  place-items: center;
  flex: none;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: linear-gradient(145deg,#1f9fce,#0e77ae);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
  color: #fff;
  box-shadow: none;
}
body #howto .check strong {display:inline-block;font-size: 14.5px;line-height:1.4;color:#123d56;margin-bottom:2px;font-weight:900;}
body #howto .check br {display:block;content:"";}

/* Other original large posters match the same container edges but retain ratio. */
body section.section > .container > .bigPoster:not(#howto .bigPoster) {
  width: 100%;
  border-radius: 18px;
  border: 5px solid #fff;
  background: #fff;
  box-shadow: 0 10px 27px rgba(8,46,74,.08);
}

/* Shared footer follows the identical left/right grid lines. */
#contact.bv-site-footer .bv-footer-wrap {width:min(var(--bv-page-width),calc(100% - var(--bv-page-gutter)))!important;max-width:var(--bv-page-width)!important;}

/* Avoid layout overflow at all narrow viewports, without hiding actual content. */
@media (max-width: 980px) {
  body #howto .container.grid2 {grid-template-columns: minmax(0, 1fr);gap: 13px;}
  body #howto .bigPoster {max-width: 500px;width:100%;margin-inline:auto;}
  body #howto .bluePanel {padding: 18px;}
  body #howto .checklist {grid-auto-rows:auto;}
  body .imageBand {grid-template-columns: minmax(0,1fr);}
}
@media (max-width: 600px) {
  :root {--bv-page-gutter: 24px;}
  body section.section:not(.bv-article-section) {padding-block: 20px;}
  body .hero {padding-block:12px 18px;}
  body .heroText {padding:15px;}
  body .title {margin-bottom: 13px;}
  body .title h2 {font-size: clamp(22px,6vw,28px);}
  body .title p {font-size: 14px;}
  body .cards {grid-template-columns: minmax(0, 1fr);gap: 8px;}
  body .cards .card {padding: 13px 14px;}
  body .featurePoster {border-radius: 13px;}
  body .posterCaption {padding: 13px 14px;}
  body #howto .bigPoster {border-width:4px;border-radius:16px;}
  body #howto .bluePanel {padding: 15px;border-radius:16px;}
  body #howto .bluePanel h2 {font-size:clamp(20px,5.6vw,24px);}
  body #howto .bluePanel > p {font-size:13.5px;}
  body #howto .checklist {gap: 7px;margin-top: 10px;}
  body #howto .check {padding: 10px;grid-template-columns: 27px minmax(0,1fr);gap:9px;font-size:13px;}
  body #howto .check strong {font-size:14px;}
  body #howto .check i {width:27px;height:27px;font-size:14px;}
  body section.section > .container > .bigPoster:not(#howto .bigPoster) {border-width:4px;border-radius:14px;}
}
@media (max-width: 360px) {
  :root {--bv-page-gutter: 20px;}
  body #howto .bluePanel {padding: 12px;}
  body #howto .check {padding: 9px;gap:7px;}
  body .posterCaption {padding:12px;}
  body .posterCaption .miniTags span {font-size:11px;}
}
@media (prefers-reduced-motion: reduce) {
  body #howto .check {scroll-behavior:auto;}
}

/* v6-v7 article previously used a separate 1240px max-width, making it
   protrude past the header, photographs and footer. Respect the one site grid. */
body article.bv-editorial {
  box-sizing: border-box !important;
  width: min(var(--bv-page-width), calc(100% - var(--bv-page-gutter))) !important;
  max-width: var(--bv-page-width) !important;
  margin-inline: auto !important;
}

/* On phone screens, the original floating circles cover the checklist and
   long-form text. Hero CTAs and footer phone/LINE links remain available. */
@media (max-width: 600px) {
  body .floatBtns {display: none !important;}
}
