@charset "euc-jp";

.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;

  @media screen and (min-width: 1000px) {
    margin: 24px 0;
  }
}

.search-results {
  @media screen and (max-width: 999px) {
    margin-top: 24px;
  }

  h2 {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    background: #e5e5e5;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
  }

  .total {
    font-size: 20px;
    line-height: 1.2;

    .number {
      padding: 0 0.25em;
      font-size: 24px;
    }
  }
}

.search-results .pagenation {
  margin: 40px auto 0;

  @media screen and (min-width: 1000px) {
    margin: 80px auto 0;
  }

  a[aria-current="page"] {
    color: #a7a7a7;
    pointer-events: none;
  }

  .arrow {
    height: 40px;
    vertical-align: middle;

    a {
      display: inline-flex;
      align-items: center;
      height: 100%;

      @media screen and (max-width: 999px) {
        font-size: 0;
      }
    }
  }

  .number {
    display: inline-block;
    padding: 0 1em;
    vertical-align: middle;

    span {
      display: inline-flex;
      align-items: center;
      height: 40px;
    }

    a {
      display: block;
      padding: 0 1em;
    }
  }

  .prev::after,
  .next::before {
    content: "";
    display: inline-flex;
    align-items: center;
    width: 8px;
    height: 8px;
    border-top: solid 1px var(--bordercolor_primary);
    border-right: solid 1px var(--bordercolor_primary);
    background: none;
    vertical-align: 6px;
  }

  .prev::after {
    transform: translateY(1px) rotate(225deg);

    @media screen and (min-width: 1000px) {
      margin-left: 16px;
    }
  }

  .next::before {
    left: -1.5em;
    transform: translateY(1px) rotate(45deg);

    @media screen and (min-width: 1000px) {
      margin-right: 16px;
    }
  }
}

.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 27px 20px;
  grid-template-rows: auto;
  list-style-type: none;

  @media screen and (min-width: 1000px) {
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 32px;
  }

  li {
    display: inline-block;
  }

  a {
    display: block;
  }

  h3 {
    margin: calc(16px - 0.125em) 0;
    font-weight: 700;
    line-height: 1.25;

    @media screen and (min-width: 1000px) {
      font-size: 18px;
      line-height: 1.38;
    }

    span {
      display: block;
      margin-top: 0.5em;
      font-weight: 500;
      font-size: 16px;
      color: #505050;
      line-height: 1.21;

      @media screen and (min-width: 1000px) {
        margin-top: calc(16px - 0.19em);
        line-height: 1.18;
      }
    }

    &.has-icon.new::before {
      content: url("https://www.tsuku-shin.jp/colorme/icon/new.svg");
      display: inline-block;
      padding-right: 0.25em;
      vertical-align: baseline;
    }

    &.has-icon.restock::before {
      content: url("https://www.tsuku-shin.jp/colorme/icon/restock.svg");
      display: inline-block;
      padding-right: 0.25em;
      vertical-align: baseline;
    }
  }

  .prices {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.38;

    > * {
      display: block;
    }
  }

  .description {
    margin-top: 16px;
    text-box-trim: trim-both;
    font-size: 14px;
    line-height: 1.71;
  }
}

.sort-controls {
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 10px;
    display: block;
    width: 0.5em;
    height: 0.5em;
    border-top: solid 1px var(--bordercolor_primary);
    border-right: solid 1px var(--bordercolor_primary);
    transform: rotate(135deg);
  }

  select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    min-width: 120px;
    height: 28px;
    padding: 0 26px 0 7px;
    border-color: var(--bordercolor_secondary);
    border-radius: 0;
    line-height: 1;

    &::-ms-expand {
      display: none;
    }
  }
}
