/* Core — Trust Bar
   Compact editorial discovery strip.
   Shared by Builder, Preview and Live. */

/* The spacing control multiplies the shared Core rhythm. `.section.storly-trust`
   already out-specifies the base `.section` rule, so no !important is needed. */
.section.storly-trust {
  padding-block: calc(var(--core-rhythm, 64px) * var(--tb-space, .62));
}

/* Colour + line tokens come from the `.trust-section` contract in core-dna.css
   and are overridden per-instance by section.php. This file only consumes them. */
.storly-trust {
  /* The same track as every other Core section — this used to be a private
     1280px width with a 32px gutter of its own, which is why the trust bar
     started at a different x than Featured products on a wide desktop. */
  --tb-max-width: var(--core-track-default, 1360px);

  width: 100%;
  background: var(--tb-bg);
  color: var(--tb-ink);
}

/* The section's markup is .container > .storly-trust__inner, and .container
   already carries the Core track (max-width + gutter). The inner only widens
   or narrows that track — giving it a padding of its own is what pushed the
   trust bar 32px to the right of every other section. */
.storly-trust__inner {
  width: 100%;
  padding-block: 0;
}

.storly-trust > .container { max-width: var(--tb-max-width); }
.storly-trust[data-container="narrow"] { --tb-max-width: var(--core-track-narrow, 1040px); }
.storly-trust[data-container="wide"]   { --tb-max-width: var(--core-track-wide, 1520px); }
.storly-trust[data-container="full"]   { --tb-max-width: var(--core-track-full, none); }

/* Header */

.storly-trust__header {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: 6px;
  align-items: end;
  margin: 0 0 18px;
}

.storly-trust__eyebrow {
  grid-column: 1;
  margin: 0 0 7px;
  color: var(--tb-accent);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.storly-trust__heading {
  grid-column: 1;
  margin: 0;
  max-width: 360px;
  color: var(--tb-ink);
  font-family: var(--font-display, inherit);
  font-size: clamp(21px, 1.55vw, 28px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.025em;
}

.storly-trust__description {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  margin: 0;
  max-width: 500px;
  color: var(--tb-muted);
  font-size: 13px;
  line-height: 1.5;
}

.storly-trust__cta {
  grid-column: 2;
  margin-top: 10px;
  width: max-content;
  color: var(--tb-ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

/* Items */

.storly-trust__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--tb-line);
  border-bottom: 1px solid var(--tb-line);
}

.storly-trust__item {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.storly-trust__item + .storly-trust__item {
  border-inline-start: 1px solid var(--tb-line);
}

.storly-trust__item-inner {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  height: 100%;
  padding: 17px 18px;
  color: inherit;
  text-decoration: none;
  box-sizing: border-box;
}

.storly-trust__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--tb-icon);
  line-height: 1;
}

.storly-trust__icon svg {
  display: block;
  width: 19px;
  height: 19px;
}

.storly-trust__copy {
  display: block;
  min-width: 0;
}

.storly-trust__title {
  display: block;
  margin: 0 0 4px;
  color: var(--tb-ink);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 650;
}

.storly-trust__text {
  display: block;
  color: var(--tb-muted);
  font-size: 13px;
  line-height: 1.45;
}

.storly-trust__link-label {
  display: inline-block;
  margin-top: 8px;
  color: var(--tb-ink);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 650;
}

.storly-trust__chevron {
  display: none;
}

/* Tablet */

@media (max-width: 1024px) {
  .storly-trust__inner {
    width: min(var(--tb-max-width), calc(100% - 40px));
    padding-block: 0;
  }

  .storly-trust__header {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-bottom: 20px;
  }

  .storly-trust__eyebrow,
  .storly-trust__heading,
  .storly-trust__description,
  .storly-trust__cta {
    grid-column: 1;
    grid-row: auto;
  }

  .storly-trust__description {
    max-width: 600px;
    margin-top: 3px;
  }

  .storly-trust__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storly-trust__item:nth-child(3) {
    border-inline-start: 0;
  }

  .storly-trust__item:nth-child(n+3) {
    border-top: 1px solid var(--tb-line);
  }
}

/* Mobile */

@media (max-width: 767px) {
  .storly-trust__inner {
    width: min(var(--tb-max-width), calc(100% - 32px));
    padding-block: 0;
  }

  .storly-trust__header {
    margin-bottom: 18px;
  }

  .storly-trust__heading {
    font-size: 25px;
  }

  .storly-trust__description {
    font-size: 13px;
  }

  .storly-trust__list {
    grid-template-columns: 1fr;
  }

  .storly-trust__item + .storly-trust__item,
  .storly-trust__item:nth-child(3) {
    border-inline-start: 0;
    border-top: 1px solid var(--tb-line);
  }

  .storly-trust__item-inner {
    padding: 16px 2px;
  }
}
