/* STA-BIL — «the first pull» skeleton. Своя разметка: слои @layer, логические
   свойства, grid-таблица сравнения без горизонтального скролла. Палитра — с
   пикселей овального лого: красный e03020, оксид 8f1400, сталь a3a4ab. */
@layer base, layout, blocks, mobile;

@layer base {
  :root {
    --red: #e03020;
    --oxide: #8f1400;
    --ink: #16171b;
    --coal: #22242a;
    --paper: #f6f4ef;
    --card: #ffffff;
    --steel: #a3a4ab;
    --steel-d: #6f7076;
    --ok: #1d7a4f;
    --c-storage: #e03020;
    --c-marine: #1f5f93;
    --c-diesel: #246b44;
    --c-inseason: #c96a12;
    --c-small: #4a4e55;
    --c-garage: #7a5c2e;
    --disp: "Barlow Condensed", "Arial Narrow", sans-serif;
    --body: "Barlow", Arial, sans-serif;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
  }
  img { max-width: 100%; height: auto; display: block; }
  a { color: var(--oxide); text-decoration-thickness: 1px; text-underline-offset: 2px; }
  a:hover { color: var(--red); }
  h1, h2, h3, h4 {
    font-family: var(--disp);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .015em;
    line-height: 1.04;
    margin: 0 0 .45em;
  }
  h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); }
  h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
  h3 { font-size: 1.25rem; }
  p { margin: 0 0 1em; }
  .fp-kick {
    font-family: var(--disp);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--red);
    font-size: .95rem;
    margin: 0 0 .5em;
  }
}

@layer layout {
  .fp-wrap { max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
  .fp-sect { padding-block: 56px; }
  .fp-sect--ink { background: var(--ink); color: var(--paper); }
  .fp-sect--ink a { color: #ffd9d2; }
  .fp-sect--red { background: var(--red); color: #fff; }
  .fp-sect--card { background: var(--card); }
  .fp-grid { display: grid; gap: 22px; }
  .fp-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .fp-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .fp-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@layer blocks {
  /* ── девиз-полоса + шапка (Gold Eagle + Sea Foam) ── */
  .fp-motto {
    background: var(--ink);
    color: var(--steel);
    font-family: var(--disp);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .82rem;
    text-align: center;
    padding: 7px 14px;
  }
  .fp-motto b { color: #fff; font-weight: 700; }
  .fp-head {
    background: var(--card);
    border-block-end: 3px solid var(--red);
    position: sticky;
    inset-block-start: 0;
    z-index: 40;
  }
  .fp-head__row {
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 74px;
  }
  .fp-head__logo img { width: 86px; height: 86px; margin-block: -6px; }
  .fp-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; }
  .fp-nav a {
    font-family: var(--disp);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 1.02rem;
    text-decoration: none;
    color: var(--ink);
    padding: 9px 11px;
    border-radius: 4px;
  }
  .fp-nav a:hover, .fp-nav a[aria-current] { background: var(--paper); color: var(--red); }
  .fp-head__cta { flex: 0 0 auto; }
  .fp-head__cta img { width: 168px; height: auto; }
  #fp-burger, .fp-burger-lab { display: none; }

  /* ── хиро-триптих (Gold Eagle brand page) ── */
  .fp-hero { position: relative; color: #fff; background: var(--ink); }
  .fp-hero__strip { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .fp-hero__strip img { width: 100%; height: 500px; object-fit: cover; opacity: .62; }
  .fp-hero__core {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 24px;
    background: linear-gradient(180deg, rgba(22,23,27,.1), rgba(22,23,27,.68));
  }
  .fp-hero__core h1 { max-width: 17ch; margin-inline: auto; text-shadow: 0 2px 14px rgba(0,0,0,.55); }
  .fp-hero__lead { max-width: 62ch; margin-inline: auto; font-size: 1.06rem; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
  .fp-hero__cta img { width: 300px; margin: 14px auto 0; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }

  /* ── траст-ряд ── */
  .fp-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 38px;
    padding-block: 16px;
    background: var(--card);
    border-block-end: 1px solid #e5e2da;
    font-family: var(--disp);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 1rem;
  }
  .fp-trust b { color: var(--red); font-size: 1.25rem; margin-inline-end: 6px; }

  /* ── сезонные плитки стора ── */
  .fp-rail { position: relative; border-radius: 10px; overflow: hidden; min-height: 240px; display: grid; }
  .fp-rail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .fp-rail span {
    position: relative;
    align-self: end;
    justify-self: start;
    margin: 14px;
    background: var(--red);
    color: #fff;
    font-family: var(--disp);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 1.2rem;
    padding: 7px 16px;
    border-radius: 4px;
    box-shadow: 0 3px 0 var(--oxide);
  }
  a.fp-rail:hover span { background: var(--oxide); }

  /* ── карточка товара ── */
  .fp-card {
    background: var(--card);
    border: 2px solid #e2dfd6;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
  }
  .fp-card:hover { border-color: var(--steel); }
  .fp-card__img { aspect-ratio: 1; object-fit: contain; }
  .fp-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .fp-chip {
    font-family: var(--disp);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: .8rem;
    color: #fff;
    padding: 3px 9px;
    border-radius: 3px;
  }
  .fp-card h3 { font-size: 1.18rem; margin: 0; }
  .fp-card h3 a { color: inherit; text-decoration: none; }
  .fp-card h3 a:hover { color: var(--red); }
  .fp-stars { color: var(--red); letter-spacing: 2px; font-size: .95rem; }
  .fp-stars small { color: var(--steel-d); font-family: var(--body); letter-spacing: 0; margin-inline-start: 6px; }
  .fp-card__price {
    margin-block-start: auto;
    font-family: var(--disp);
    font-weight: 800;
    font-size: 1.7rem;
  }
  .fp-card__price s { color: var(--steel-d); font-size: 1rem; font-weight: 400; }
  .fp-card__price .fp-noprice { font-size: 1.05rem; font-weight: 700; color: var(--steel-d); }
  .fp-stampbtn { border: 0; background: none; padding: 0; cursor: pointer; width: 100%; }
  .fp-stampbtn img { width: 100%; height: auto; }
  .fp-stampbtn:active { transform: translateY(2px); }
  /* размерные штампы — после базового правила, чтобы победить каскад */
  .fp-head .fp-stampbtn { width: auto; }
  .fp-head .fp-stampbtn img { width: 172px; }
  .fp-hero .fp-stampbtn { width: auto; }
  .fp-hero .fp-stampbtn img { width: 300px; margin-inline: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
  .fp-best {
    position: absolute;
    inset-block-start: -11px;
    inset-inline-start: 14px;
    background: var(--ink);
    color: #ffd24a;
    font-family: var(--disp);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .78rem;
    padding: 3px 10px;
    border-radius: 3px;
  }

  /* ── грид-таблица «какой стабилизатор» (TruFuel advantage) ── */
  .fp-match { border: 2px solid var(--coal); border-radius: 10px; overflow: hidden; background: var(--card); }
  .fp-match__row { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); }
  .fp-match__row:nth-child(even) { background: #faf8f2; }
  .fp-match__row > div { padding: 11px 14px; border-block-start: 1px solid #e5e2da; }
  .fp-match__row--h { background: var(--coal); color: #fff; font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
  .fp-match__row--h > div { border: 0; }
  .fp-match__yes { color: var(--ok); font-weight: 800; }
  .fp-match__no { color: var(--steel); }
  .fp-match__lab { font-weight: 600; }

  /* ── красный Q&A-грид (Sea Foam) ── */
  .fp-qa details {
    background: var(--red);
    border-radius: 6px;
    box-shadow: 0 3px 0 var(--oxide);
    overflow: hidden;
  }
  .fp-qa summary {
    list-style: none;
    cursor: pointer;
    color: #fff;
    font-family: var(--disp);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 1.08rem;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .fp-qa summary::-webkit-details-marker { display: none; }
  .fp-qa summary::after { content: "+"; font-size: 1.3rem; }
  .fp-qa details[open] summary::after { content: "\2212"; }
  .fp-qa details > div { background: #fff; padding: 14px 18px 6px; }

  /* ── отзывы ── */
  .fp-rev {
    background: var(--card);
    border-inline-start: 5px solid var(--red);
    border-radius: 0 8px 8px 0;
    padding: 16px 18px;
    box-shadow: 0 1px 4px rgba(22,23,27,.08);
  }
  .fp-rev__who { font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .92rem; color: var(--steel-d); }
  .fp-rev__for { font-size: .88rem; }

  /* ── PDP ── */
  .fp-pdp { display: grid; grid-template-columns: minmax(0, 46%) 1fr; gap: 40px; align-items: start; }
  .fp-pdp__gal { position: sticky; inset-block-start: 96px; }
  .fp-pdp__gal img { background: #fff; border: 2px solid #e2dfd6; border-radius: 10px; }
  .fp-pdp__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-block-start: 10px; }
  .fp-pdp__price { font-family: var(--disp); font-weight: 800; font-size: 2.4rem; }
  .fp-pdp__buy { max-width: 420px; }
  .fp-pdp__feat { border-block-start: 2px solid #e2dfd6; padding-block-start: 14px; }
  .fp-specs { width: 100%; border-collapse: collapse; }
  .fp-specs th, .fp-specs td { text-align: start; padding: 8px 10px; border-block-end: 1px solid #e5e2da; vertical-align: top; }
  .fp-specs th { font-family: var(--disp); text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; color: var(--steel-d); width: 38%; }
  .fp-bullets li { margin-block-end: .55em; }

  /* ── крошки, футер ── */
  .fp-crumbs { font-size: .9rem; padding-block: 14px 0; color: var(--steel-d); }
  .fp-crumbs a { color: var(--steel-d); }
  .fp-foot { background: var(--ink); color: var(--steel); }
  .fp-foot__motto {
    font-family: var(--disp);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #fff;
    text-align: center;
    font-size: 1.3rem;
    padding-block: 26px 4px;
  }
  .fp-foot__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; padding-block: 28px 20px; }
  .fp-foot h4 { color: #fff; font-size: 1.05rem; }
  .fp-foot ul { list-style: none; margin: 0; padding: 0; }
  .fp-foot li { margin-block-end: .5em; }
  .fp-foot a { color: var(--steel); text-decoration: none; }
  .fp-foot a:hover { color: #fff; }
  .fp-foot__legal { border-block-start: 1px solid #33353c; padding-block: 16px; font-size: .86rem; }
  .fp-foot__logo img { width: 92px; height: 92px; }

  /* нумерованные шаги сервисных страниц */
  .fp-steps { list-style: none; margin: 1.2em 0; padding: 0; counter-reset: fpstep; }
  .fp-steps li {
    counter-increment: fpstep;
    position: relative;
    padding: 0 0 1.1em 58px;
    border-inline-start: 3px solid #e2dfd6;
    margin-inline-start: 20px;
  }
  .fp-steps li::before {
    content: counter(fpstep);
    position: absolute;
    inset-inline-start: -22px;
    inset-block-start: -2px;
    width: 40px; height: 40px;
    display: grid; place-content: center;
    background: var(--red);
    color: #fff;
    font-family: var(--disp);
    font-weight: 800;
    font-size: 1.25rem;
    border-radius: 50%;
    box-shadow: 0 3px 0 var(--oxide);
  }
  .fp-steps li:last-child { border-color: transparent; padding-block-end: .2em; }
  .fp-steps b { font-family: var(--disp); text-transform: uppercase; letter-spacing: .04em; }

  .fp-seo h2 { font-size: 1.5rem; }
  .fp-seo { max-width: 76ch; }
  .fp-note { font-size: .88rem; color: var(--steel-d); }
  .fp-pick { background: var(--card); border: 2px solid #e2dfd6; border-radius: 10px; padding: 18px; text-decoration: none; color: inherit; display: block; }
  .fp-pick:hover { border-color: var(--red); color: inherit; }
  .fp-pick b { font-family: var(--disp); text-transform: uppercase; font-size: 1.1rem; letter-spacing: .04em; display: block; margin-block-end: .3em; }
  .fp-pick span { color: var(--oxide); font-weight: 600; }
}

@layer mobile {
  @media (max-width: 1020px) {
    .fp-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .fp-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .fp-pdp { grid-template-columns: 1fr; }
    .fp-pdp__gal { position: static; }
  }
  @media (max-width: 760px) {
    .fp-sect { padding-block: 38px; }
    .fp-grid--2, .fp-grid--3, .fp-grid--4 { grid-template-columns: 1fr; }
    .fp-hero__strip { grid-template-columns: 1fr; }
    .fp-hero__strip img { height: 150px; }
    .fp-hero__strip img:nth-child(n+2) { display: none; }
    .fp-hero__strip { min-height: 420px; }
    .fp-hero__strip img:first-child { height: 420px; }
    /* бургер */
    .fp-burger-lab {
      display: block;
      margin-inline-start: auto;
      cursor: pointer;
      font-family: var(--disp);
      font-weight: 800;
      text-transform: uppercase;
      border: 2px solid var(--ink);
      border-radius: 5px;
      padding: 7px 13px;
    }
    .fp-nav {
      display: none;
      position: absolute;
      inset-inline: 0;
      inset-block-start: 100%;
      background: var(--card);
      border-block-end: 3px solid var(--red);
      flex-direction: column;
      padding: 10px 16px 16px;
    }
    #fp-burger:checked ~ .fp-nav { display: flex; }
    .fp-head__cta { display: none; }
    /* сравнение превращается в стопку — никакого горизонтального скролла */
    .fp-match__row { grid-template-columns: 1fr 1fr; }
    .fp-match__row > div:first-child { grid-column: 1 / -1; background: #efede6; font-weight: 700; }
    .fp-match__row--h { display: none; }
    .fp-match__row > div[data-m]::before {
      content: attr(data-m) ": ";
      font-family: var(--disp);
      text-transform: uppercase;
      font-size: .85rem;
      color: var(--steel-d);
    }
    .fp-foot__grid { grid-template-columns: 1fr 1fr; }
  }
}
