@layer base, components, utilities;

@layer base {
  html {
    scroll-behavior: smooth;
    @media (768px <= width) {
      font-size: min(calc(100vw / 118), 10px);
    }
    @media (width < 768px) {
      font-size: calc(100vw / 37.5);
    }
  }

  body {
    font-family: var(--font-main);
    font-size: 1.6rem;
    font-weight: 600;
    background-color: #fdfbec;
    font-optical-sizing: auto;
    font-feature-settings: "palt";
    -webkit-font-smoothing: 
    antialiased;
    line-height: 1.6;
    letter-spacing: 0.08em;
  }
}


@layer utilities {
  @media (768px <= width) {
    .sp { display: none !important; }
  }
  @media (width < 768px) {
    .pc { display: none !important; }
  }
}

main{
  color: #003214 !important;
}

.ctn-title{
  width: fit-content;
  margin: 0 auto 6.4rem;
  padding: 2rem 3.5rem;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 2;
  @media (width < 768px) {
    padding: 1.2rem 2rem 1.5rem;
    font-size: 2rem;
  }
  background: url("../img/bg-title.webp") no-repeat;
  background-size: 100%;
}

  .gold-title{
    width: fit-content;
    margin: 5.6rem 0 4rem;
    padding: 5px 1.2rem;
    background-color: #a79a45;
    font-family: "Zen Maru Gothic", sans-serif;
    font-size: 2.4rem;
    color: #fff;
    @media (width < 768px) {
      margin: 5rem 0 3.2rem;
      font-size: 1.8rem;
    }
  }

  .btn-primary{
    display: flex;
    align-items: center;
    width: fit-content;
    background-color: #003214;
    color: #fff;
    padding: 1.2rem 3rem 1.2rem 3.8rem;
    border-radius: 100vmax;
    gap: 1.4rem;
    font-family: "Zen Maru Gothic", sans-serif;
    font-size: 2rem;
    transition: all 0.3s ease;
    @media (width < 768px) {
      display: flex;
      width: max-content;
      margin-inline: auto;
    }
    img{
      width: 3rem;
      height: auto;
      @media (width < 768px) {
        width: 2.4rem;
      }
    }
    @media (width < 768px) {
      padding: 1rem 2rem 1rem 2.8rem;
      font-size: 1.6rem;
    }
    &:hover{
      opacity: 0.8;
    }
  }

  .ctn-ranking{
    @media (width >= 768px) {
      background: url("../img/bg-snow-icon.webp") no-repeat;
      background-size: 95%;
      background-position: top 10rem center;
      position: relative;
    }
    .bg-snow-icon{
      width: 90%;
      position: absolute;
      bottom: 10rem;
      left: 6%;
    }
    .icon-snow-no3{
      margin-bottom: 3rem;
      margin-left: 2rem;
    }
    .inner{
      width: 110rem;
      max-width: 100%;
      margin-inline: auto;
      padding: 8rem 0 18rem;
      @media (width < 768px) {
        padding: 0 5% 1rem;
      }
    }
    .grid-container{
      display: grid;
      &.col2 {
        grid-template-columns: minmax(0,47rem) 1fr;
        gap: 8rem;
        .img-box{
          height: 47rem;
          @media (width < 768px) {
            height: auto;
          }
        }
        +.col2{
          margin-top: 20rem;
          @media (width < 768px) {
            margin-top: 11rem;
          }
        }
        @media (width < 768px) {
          grid-template-columns: 1fr;
          gap: 4rem;
        }
        &.reverse{
          .img-box{
            &:before{
              left: auto;
              right: 3rem;
              transform: rotate(-74deg);
              @media (width < 768px) {
                right: 0;
                bottom: -5rem
              }
            }
          }
          .ranking{
            left: auto;
            right: 1rem;
          }
          @media (width >= 768px) {
            .img-box{
              order: 1;
              .ranking{
                left: auto;
                right: 1.5rem;
              }
            }
          }
        }
      }
      .img-box{
        position: relative;
        &::before{
          content: "";
          display: block;
          width: 17rem;
          height: 17rem;
          background: url("../img/logo-merry-christmas.webp") no-repeat;
          background-size: 100%;
          position: absolute;
          bottom: -7rem;
          left: 0;
          @media (width < 768px) {
            width: 13rem;
            height: 13rem;
            bottom: -5rem;
            left: 0;
          }
        }
        .ranking{
          font-family: 
          "Josefin Slab", serif;
          font-size: 4.5rem;
          font-weight: 700;
          color: #db334a;
          position: absolute;
          top: -3rem;
          left: -1.5rem;
          @media (width < 768px) {
            font-size: 3.2rem;
            left: 0.5rem;
          }
          span{
            font-size: 14.4rem;
            font-weight: 600;
            @media (width < 768px) {
              font-size: 9.8rem;
            }
          }
          &.no1{
            color: #a79a45;
          }
        }
        .item-img{
            width: 47rem;
            height: 47rem;
            border-radius: 100vmax;
            overflow: hidden;
            margin-inline: auto;
            @media (width < 768px) {
              width: 95%;
              height: auto;
            }
          img{  
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
        }
        .icon-snow-no1{
          position: absolute;
          bottom: -8rem;
          right: -1rem;
        }
        .icon-snow-no2{
          position: absolute;
          top: -9rem;
          left: -1rem;
        }
        .icon-snow-no3{
          position: absolute;
          top: -7.5rem;
          right: 0;
        }
      }
      .text-box{
        font-family: "Zen Maru Gothic", sans-serif;
        line-height: 1.8;
        position: relative;
        z-index: 2;
        .gold-title{
          @media (width < 768px) {
            margin: 2rem 0;
            font-size: 1.8rem !important;
          }
        }
        .price{
          margin: 2rem 0;
          font-family: "Inter", sans-serif;
          font-size: 3.2rem;
          letter-spacing: 0.15em;
          @media (width < 768px) {
            margin: 2rem 0 1rem;
            font-size: 2.8rem;
          }
          .currency{
            font-size: 2.8rem;
            @media (width < 768px) {
              font-size: 2rem;
            }
          }
          .tax{
            font-size: 1.4rem;
            letter-spacing: 0.08em;
            @media (width < 768px) {
              font-size: 1.2rem;
            }
          }
        }
        .btn-primary{
          margin-top: 7rem;
          @media (width < 768px) {
            margin-top: 4rem !important;
            margin-inline: auto;
          }
        }
      }
      &.col3{
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6rem;
        margin-top: 26rem;
        @media (width < 768px) {
          grid-template-columns: 1fr;
          gap: 8rem;
          margin-top: 11rem;
        }
        .img-box{
          &:before{
            width: 13rem;
            height: 13rem;
            bottom: -5.2rem;
            left: 0px;
          }
          .ranking{
            font-size: 2.8rem;
            span{
              font-size: 9.2rem;
            }
          }
          .item-img{
            width: 33rem;
            height: 33rem;
            object-fit: cover;
          }
        }
        .text-box{
          .gold-title{
            margin-bottom: 2rem;
            font-size: 2rem;
            @media (width < 768px) {
              margin: 6rem 0 2rem !important;
            }
          }
          .price{
            margin: 2rem 0 1rem;
            font-size: 2.8rem;
            @media (width < 768px) {
              font-size: 2rem;
            }
            .currency{
              font-size: 2.4rem;
              @media (width < 768px) {
                font-size: 2rem;
              }
            }
            .tax{
              font-size: 1.2rem;
            }
          }
          .btn-primary{
            margin-top: 6rem;
          }
        }
      }
    }
  }

.ctn-item-list{
  background: url("../img/bg-list.webp") no-repeat;
  background-size: cover;
  background-position: bottom center;
  position: relative;
  .bg-list-icon{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
  }
  .inner{
    width: 110rem;
    max-width: 100%;
    margin-inline: auto;
    padding: 16rem 0 17rem;
    @media (width < 768px) {
      padding: 8rem 5%;
    }
  }
  ul{
    display: grid;
    grid-template-columns: repeat(4, minmax(26rem, 1fr));
    gap: 4rem 2rem;
    @media (width < 768px) {
      grid-template-columns: 1fr 1fr;
      gap: 3rem 1rem;
    }
    li{
      a{
        color: #fff;
        transition: all 0.3s ease;
        &:hover{
          opacity: 0.8;
        }

      }
      .item-name{
        margin-top: 2rem;
        font-family: "Zen Maru Gothic", sans-serif;
        font-size: 1.6rem;
        @media (width < 768px) {
          margin-top: 1rem;
          font-size: 1.4rem;
        }
      }
      .price{
        margin-top: 5px;
        font-family: "Inter", sans-serif;
        font-size: 3.2rem;
        letter-spacing: 0.15em;
        @media (width < 768px) {
          font-size: 2.8rem;
        }
        .currency{
          font-size: 2.8rem;
          @media (width < 768px) {
            font-size: 2rem;
          }
        }
        .tax{
          font-size: 1.4rem;
          letter-spacing: 0.08em;
          @media (width < 768px) {
            font-size: 1.2rem;
          }
        }
      }
    }
  }
}

.ctn-gift{
  padding: 18rem 0;
  background: url("../img/bg-gift.webp") no-repeat ;
  background-size: 100%;
  background-position: top center;
  background-color: #c4bc8b;
  position: relative;
  @media (width < 768px) {
    padding: 11rem 3%;
    background: url("../img/bg-gift-sp.webp") no-repeat ;
    background-size: 100%;
    background-color: #c4bc8b;
  }
  .gift-detail{
    width: 110rem;
    margin-inline: auto;
    padding: 9rem;
    background-color: #fdfbec;
    border-radius: 20px;
    position: relative;
    @media (width < 768px) {
      width: 100%;
      padding: 5.8rem 3.3rem 5.8rem 4.4rem;
      border-radius: 12px;
    }
    &:before{
      content: "";
      display: block;
      width: 2rem;
      height: 100%;
      background: linear-gradient(90deg, #C90D0C 0%, #EB201C 49.04%, #C90D0C 100%);
      position: absolute;
      top: 0;
      left: 4rem;
      @media (width < 768px) {
        width: 1.8rem;
        left: 9px;
      }
    }
    &:after{
      content: "";
      display: block;
      width: 100%;
      height: 2rem;
      background: linear-gradient(90deg, #C90D0C 0%, #EB201C 49.04%, #C90D0C 100%);
      position: absolute;
      top: 4.5rem;
      right: 0;
      @media (width < 768px) {
        top: 17px;
        height: 1.8rem;
      }
    }
    h2{
      font-family: "Zen Maru Gothic", sans-serif;
      font-size: 3.2rem;
      font-weight: 700;
      color: #be0420;
      text-align: center;
      @media (width < 768px) {
        font-size: 2rem;
      }
    }
    .icon-title-gift{
      display: block;
      width: 26rem;
      max-width: 100%;
      height: auto;
      margin: 0 auto 4rem;
      @media (width < 768px) {
        width: 16rem;
        margin: 0 auto 2.5rem;
      }
    }
    .inner{
      display: grid;
      grid-template-columns: minmax(0, 40rem) 1fr;
      align-items: flex-start;
      gap: 4rem;
      @media (width < 768px) {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin: 0;
      }
      .img{
        img{
          width: 100%;
          height: auto;
        }
      }
      .desc{
        font-family: "Zen Maru Gothic", sans-serif;
        @media (width < 768px) {
          font-size: 1.6rem;
        }
        .gold-title{
          margin-top: 0;
        }
        .price{
          margin-bottom: 2.4rem;
          font-family: "Inter", sans-serif;
          font-size: 3.2rem;
          letter-spacing: 0.15em;
          line-height: 1;
          @media (width < 768px) {
            margin-bottom: 1.5rem;
            font-size: 2.8rem;
          }
          .currency{
            font-size: 2.8rem;
            @media (width < 768px) {
              font-size: 2rem;
            }
          }
          .tax{
            font-size: 1.4rem;
            letter-spacing: 0.08em;
            @media (width < 768px) {
              font-size: 1.2rem;
            }
          }
        }
        .gift-desc{
          margin-bottom: 6rem;
          line-height: 1.8;
          @media (width < 768px) {
            margin-bottom: 4rem;
            font-size: 1.6rem;
          }
        }
      }
    }
  }
  .icon-ribbon{
    width: 26rem;
    position: absolute;
    top: -5rem;
    left: 6.5rem;
    z-index: 2;
    transform: translateX(-50%);
    @media (width < 768px) {
      width: 16rem;
      top: -4.5rem;
      left: 4rem;
    }
  }
  .icon-snow{
    width: 100%;
    position: absolute;
    bottom: -30px;
    right: 0;
  }
}



