.section__product,
.store__nav {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.product-content {
  display: contents;
}

.store__nav {
  padding-top: calc(var(--spacing) * 1);
  padding-bottom: calc(var(--spacing) * 0.5);
  color: var(--color-txt-light);
  font-size: var(--fs-small);

  a {
    text-decoration: none;

    &::before {
      content: "← ";
    }

    &:hover {
      text-decoration: underline;
    }
  }

  @media #{$small} {
    a {
      padding-top: 0;
      font-size: var(--fs-small);
    }
  }
}

.section__product {
  .details {
    ul {
      margin-left: 2ch;

      li {
        padding-bottom: 0.2em;
      }
    }
  }

  @media #{$small} {
    display: flex;
    flex-direction: column;
    margin-bottom: 10vh;

    .col-left {
      display: contents;
    }

    .hero {
      margin-top: calc(var(--spacing) * 0.5);
      order: 1;
    }

    figure {
      order: 2;
      margin-bottom: calc(var(--spacing) * 1);
    }

    .details {
      order: 3;
      margin-bottom: calc(var(--spacing) * 1.5);
    }

    .product-options {
      border-top: var(--border-light);
      order: 4;
    }

    .add-to-cart {
      order: 5;
    }

    .product-gallery {
      width: 100vw;
      position: relative;
      left: calc(var(--padding-body) * -1);

      .swiper-button-prev,
      .swiper-button-next {
        display: none;
      }
    }
  }

  @media #{$small-up} {
    .product-content {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: calc(var(--padding-body) * 2);
      margin-bottom: calc(var(--spacing) * 3);
    }

    .details {
      margin-bottom: calc(var(--spacing) * 2);
      flex-grow: 1;
    }

    .product-options {
      border-top: var(--border-light);
    }

    .col-left {
      min-height: 100%;
      padding-bottom: 40px;
      display: flex;
      flex-direction: column;
    }
  }
}

.product-options {
  border-bottom: var(--border-light);
  padding: calc(var(--spacing) * 0.25) 0;
}

.product-options__list {
  list-style: none;
  display: flex;
  gap: 2ch;

  li {
    position: relative;

    input[type="radio"] {
      position: fixed;
      opacity: 0;
      pointer-events: none;

      &:checked + label {
        border-color: var(--color-txt);
      }

      &:not(:checked) + label:hover {
        border-color: var(--grey-600);
        background-color: var(--grey-800);
      }
    }

    label {
      font-family: var(--title);
      font-size: var(--fs-normal);
      height: 4ch;
      width: 4ch;
      border-radius: 50%;
      border: var(--border);
      border-color: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      padding-top: 0px;
      cursor: pointer;
    }
  }
}

.product-gallery {
  position: relative;
  aspect-ratio: 4 / 3;

  .swiper-slide {
    width: 100%;

    figure {
      aspect-ratio: 4 / 3;
      width: 100%;
      height: 100%;

      img {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
    }

    @media #{$small-up} {
      figure {
        width: calc(100% - 60px);
      }
    }
  }

  .swiper-button-prev,
  .swiper-button-next {
    color: var(--color-txt);
    width: 20px;
    height: 20px;

    &:after {
      font-size: 20px;
      font-weight: bold;
    }

    &:hover {
      opacity: 0.7;
    }
  }

  .swiper-pagination {
    position: relative;
    margin-top: calc(var(--spacing) * 0.5);
    bottom: 0;

    .swiper-pagination-bullet {
      width: 8px;
      height: 8px;
      background: var(--grey-600);
      opacity: 0.5;
      transition: opacity 0.3s;

      &:hover {
        opacity: 0.7;
      }

      &.swiper-pagination-bullet-active {
        background: var(--color-txt);
        opacity: 1;
      }
    }
  }
}

.hero {
  margin-bottom: calc(var(--spacing) * 1);
  padding: calc(var(--spacing) * 0.5) 0;
  border-top: var(--border-light);
  border-bottom: var(--border-light);

  .p__baseline-big {
    margin: 0;
    text-align: left;
  }
}

.add-to-cart {
  margin: 0;
  border-bottom: var(--border-light);
  padding: calc(var(--spacing) * 0.5) 0;
}
