/* Load after benefit-copy 1.0.0. Both Procera brand blocks are shop-local. */
.of-apparel[data-of-template="apparel@2.2.0"]:has(> section:is(
  [data-shared-block^="oramat_sk-procera-brand@"],
  [data-shared-block^="fixmat_cz-procera-brand@"]
)) {
  /* Astryx 0.7.17 default shape and spacing values, scoped to static A3. */
  --of-a3-radius-element: 8px;
  --of-a3-radius-container: 12px;
  --of-a3-space-2: 8px;
  --of-a3-space-3: 12px;
  --of-a3-space-4: 16px;
  --of-a3-space-6: 24px;
  --of-a3-space-8: 32px;
  --of-a3-space-12: 48px;

  & :is(.hero-grid > .intro-photo, .zig > article > .optic > img) {
    border-radius: var(--of-a3-radius-container);
    box-shadow: 0 0 0 1px var(--line);
  }

  & .hero-grid {
    gap: clamp(var(--of-a3-space-4), 4cqw, var(--of-a3-space-12));
    padding-block: clamp(var(--of-a3-space-6), 5cqw, var(--of-a3-space-12));
  }

  & > .doc-section {
    padding-block: clamp(var(--of-a3-space-8), 4cqw, var(--of-a3-space-12));
  }

  & > .doc-section > h3 {
    margin-block-end: var(--of-a3-space-6);
  }

  & .anchors > a {
    border-radius: var(--of-a3-radius-element);
  }

  & .use-grid {
    gap: var(--of-a3-space-4);
  }

  & .use-grid > div {
    border-radius: var(--of-a3-radius-container);
    padding: var(--of-a3-space-6);
  }

  @container oa-apparel (max-width: 619px) {
    & .hero-grid {
      padding-block-end: var(--of-a3-space-4);
    }

    & .use-grid > div {
      padding: var(--of-a3-space-4);
    }
  }

  & .zig > article:has(> .optic > img) {
    --of-benefit-media-width: clamp(112px, 30%, 360px);
    display: grid !important;
    grid-template-columns: var(--of-benefit-media-width) minmax(0, 1fr);
    gap: var(--of-a3-space-4);
    align-items: center;
    padding-block: clamp(var(--of-a3-space-3), 2vw, var(--of-a3-space-6));
  }

  & .zig > article > .optic:has(> img) {
    position: relative !important;
    inset: auto;
    width: 100%;
    max-height: 240px;
    min-width: 0;
    grid-area: 1 / 1;
  }

  & .zig > article > .optic > img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
  }

  & .zig > article:has(> .optic > img) > .detail-copy {
    grid-area: 1 / 2;
    min-width: 0;
    max-width: 50ch;
  }

  & .zig > article > .detail-copy > h4 {
    margin-block-end: var(--of-a3-space-2);
  }

  & .zig > article:nth-of-type(even):has(> .optic > img) {
    grid-template-columns: minmax(0, 1fr) var(--of-benefit-media-width);
  }

  & .zig > article:nth-of-type(even) > .optic:has(> img) {
    grid-area: 1 / 2;
  }

  & .zig > article:nth-of-type(even):has(> .optic > img) > .detail-copy {
    grid-area: 1 / 1;
    justify-self: end;
    width: 100%;
    box-sizing: border-box;
  }

  @media (max-width: 620px) {
    & .zig > article:has(> .optic > img) {
      --of-benefit-media-width: clamp(84px, 32%, 160px);
      gap: var(--of-a3-space-3);
    }

    & .zig > article:has(> .optic > img) > .detail-copy {
      overflow-wrap: anywhere;
    }
  }

  @media (min-width: 768px) {
    & .zig > article:has(> .optic > img) {
      column-gap: clamp(var(--of-a3-space-6), 4cqw, var(--of-a3-space-12));
    }
  }

  & .zig > article:has(> .optic > img) > .detail-copy {
    border-inline-start: 0;
    padding-inline-start: 0;
  }

  /* Match the current WKCP technical@3.6.0 parameter table. */
  & > section[id$="-material"] > table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    font-family: "OF Public Sans", Arial, sans-serif;
    font-variant-numeric: tabular-nums;

    & :is(th, td) {
      padding: 13px 16px;
      border: 0;
      border-bottom: 1px solid #fff;
      font-size: 14px;
      line-height: 1.5;
      text-align: left;
      vertical-align: middle;
      color: var(--ink);
      overflow-wrap: break-word;
    }

    & th {
      width: 53%;
      font-weight: 480;
      border-right: 1px solid #fff;
    }

    & td {
      font-weight: 730;
    }

    & tr:nth-child(odd) > * {
      background: #f7f8fa;
    }

    & tr:nth-child(even) > * {
      background: #edf0f3;
    }

    & tr:last-child > * {
      border-bottom: 0;
    }

    @container oa-apparel (max-width: 619px) {
      & :is(th, td) {
        padding: 12px;
      }
    }
  }
}
