/*-----------------------
        Common
-----------------------*/
body {
  font-size: 16px;
  line-height: normal;
  font-family: 'Noto Sans TC', ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
    sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
  -webkit-font-smoothing: antialiased;
  letter-spacing: normal;
  word-break: break-word;
  transition: all 0.2s;
  min-height: 100vh;
}

.divider .divider__item {
  position: relative;
}

.divider .divider__item:not(:last-child):before {
  content: '';
  position: absolute;
  inset: 0;
  height: 16px;
  border-right: 1px solid #808080;
  margin: auto;
}

.divider__desktop .divider__item:before {
  display: none;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
}

.aspect {
  position: relative;
  padding-bottom: calc(var(--aspect-h, 1) / var(--aspect-w, 1) * 100%);
  overflow: hidden;
}

.aspect > .aspect__item {
  inset: 0;
  height: 100%;
  position: absolute;
  width: 100%;
}

.hidden {
  display: none;
}

.w-full {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/*-----------------------
        Header
-----------------------*/

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

/* fix the odd white line */
.header:after {
  content: '';
  width: 100%;
  height: 1px;
  display: block;
  background: #313538;
  position: absolute;
}

.header__wrapper {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background: #fff;
}

.logo {
  flex: 1 1 100%;
  display: grid;
  place-items: center;
  height: 52px;
}

.logo img {
  height: 24px;
  object-fit: contain;
}

.search {
  position: absolute;
  top: 0;
  right: 0;
  height: 52px;
  display: grid;
  place-items: center;
  grid-template-rows: auto 0fr;
  margin-right: 16px;
  z-index: 1000;
}

.search img {
  height: 40px;
  object-fit: contain;
}

.search-check,
.search__wrapper {
  grid-column-start: 1;
  grid-row-start: 1;
}

.search-check {
  appearance: none;
  opacity: 0;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.search-action {
  display: none;
}

.search:has(> .search-check:checked) {
  width: 100%;
  margin-right: 0;
  z-index: 1000;
  padding: 6px 10px;
  position: fixed;
  height: 100vh;
  inset: 0;
  place-items: flex-start;
}

.search:has(> .search-check:checked) .search__wrapper {
  height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid #000;
  border-radius: 999px;
  padding: 0 6px 0 20px;
  font-size: 20px;
  line-height: 24px;
  color: #8b572a;
  width: 100%;
  position: relative;
  z-index: 1001;
  background: #fff;
}

.search:has(> .search-check:checked) .search-input {
  flex-grow: 1;
  display: block;
  outline: none;
  width: 100%;
}

.search:has(> .search-check:checked) .search-icon {
  display: none;
}

.search:has(> .search-check:checked) .search-action {
  display: block;
}

.member img,
.cart img {
  height: 44px;
  object-fit: contain;
}

.main-menu {
  flex: 1 1 100%;
  height: 50px;
  background: #313538;
  display: grid;
  place-items: center;
}

.main-menu__content {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: #828282;
}

.main-menu__content li {
  position: relative;
  flex: 1 1 33.3%;
  text-align: center;
  font-size: 16px;
  line-height: 16px;
  height: 100%;
}

.main-menu__content a {
  display: grid;
  place-items: center;
  height: 100%;
  position: relative;
  z-index: 10;
}

.main-menu__content li.active {
  color: #fff;
}

.search-input {
  display: none;
}

.tool-menu {
  position: fixed;
  display: flex;
  background: #313538;
  width: 100%;
  justify-content: space-around;
  color: #fff;
  height: 60px;
  bottom: 0;
  z-index: 999;
}

.tool-menu.divider .divider__item:before {
  height: 24px;
}

.tool-menu .cart-icon {
  position: relative;
}

.tool-menu .cart-count {
  position: absolute;
  background: #8b572a;
  height: 24px;
  width: 24px;
  border-radius: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  right: 0px;
  bottom: 0px;
}

.tool-menu .user-icon {
  background: #e6ebf2;
  border-radius: 999px;
  height: 29px;
  width: 29px;
  margin: 7.5px;
  object-fit: cover;
}

.tool-menu .item {
  position: relative;
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  line-height: 16px;
}

.tool-menu.divider .divider__item:before {
  height: 24px;
  border-color: #828282;
}

.tool-menu .icon-dark {
  display: none;
}

.header-space {
  height: 102px;
}

/*-----------------------
        Home Carousel
-----------------------*/
main {
  min-height: 100vh;
}

.carousel__slides-list {
  width: 100%;
  display: flex;
  overflow: hidden;
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.carousel__wrapper {
  --aspect-h: 185;
  --aspect-w: 360;
  background: #e6ebf2;
}

.carousel__slide {
  position: relative;
  height: 100%;
  width: 100%;
  flex: 1 0 100%;
  scroll-snap-align: center;
  overflow: hidden;
}

.carousel__text {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  font-size: 15px;
  line-height: 28px;
  z-index: 20;
  padding: 0 23px;
}

.carousel__text h2 {
  white-space: break-spaces;
}

.carousel__text h3 {
  font-size: 12px;
}

.carousel__slide img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel__pagination {
  width: 100%;
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 8.8px;
  margin-bottom: 18px;
  z-index: 50;
}

.carousel__pagination .bullet {
  height: 4px;
  width: 4px;
  background: #fff;
  border-radius: 100%;
  cursor: pointer;
}

.carousel__pagination .bullet.active {
  background: #8b572a;
}

/*-----------------------
        Home Products
-----------------------*/

.products {
  padding: 0 24px;
  padding-top: 15px;
  margin-bottom: 47px;
}

.products__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 6px;
}

.products__card {
  display: block;
}

.product-content {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
}

.product-content h4 {
  padding-top: 10px;
}

.product-content .price {
  padding-top: 8px;
}

.colors-list {
  display: flex;
  gap: 6px;
}

.colors-list .color {
  height: 12px;
  width: 12px;
  border: 1px solid #d3d3d3;
}

.colors-list .green {
  background: #ddffbb;
}

.colors-list .gray {
  background: #cccccc;
}

.card-img.aspect {
  --aspect-h: 4;
  --aspect-w: 3;
}

.card-img > * {
  background: #e6ebf2;
  object-fit: cover;
}

.product-content .title,
.product-content .price {
  font-size: 12px;
  line-height: 14px;
  letter-spacing: 2.4px;
}

.skelton {
  height: 10px;
  width: 70%;
  background: #e6ebf2;
  border-radius: 10px;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.card-img .skelton {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.price .skelton {
  width: 40%;
}

.colors-list .skelton {
  width: 20%;
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

.products__noResult {
  display: none;
  place-items: center;
  min-height: 300px;
  font-size: 30px;
  font-weight: 500;
  opacity: 0.5;
  text-align: center;
  padding: 15px;
}

.products__noResult .message {
  font-size: 20px;
  color: red;
}

.products__noResult.show {
  display: grid;
}

/*-----------------------
        Footer
-----------------------*/

footer {
  background: #313538;
  width: 100%;
}

.footer__wrapper {
  color: #d3d3d3;
  font-size: 14px;
  margin-bottom: 60px;
  display: grid;
  place-items: center;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 31px;
  padding-top: 23px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-content: space-between;
  gap: 8px;
  width: 177px;
  height: 76px;
}

.social-link {
  display: flex;
  gap: 14px;
  padding-top: 18px;
}

.social-link img {
  width: 20px;
}

.copyright {
  flex-basis: 100%;
  color: #828282;
  padding: 13px 0 20px 0;
  font-size: 10px;
  text-align: center;
  transform: scale(0.833); /*10/12=0.833, font-size:10px*/
}

/*-----------------------
        Media Query
-----------------------*/

@media screen and (min-width: 480px) {
  /*-----------------------
          Home Carousel
  -----------------------*/

  .carousel__wrapper {
    --aspect-h: 185;
    --aspect-w: 480;
  }
}

@media screen and (min-width: 1280px) {
  /*-----------------------
            Common
    -----------------------*/

  .divider__desktop .divider__item:before {
    display: block;
  }
  .divider__mobile .divider__item:before {
    display: none;
  }

  /*-----------------------
            Header
    -----------------------*/
  header {
    border-bottom: 40px solid #313538;
  }

  .header__wrapper {
    flex-wrap: nowrap;
    height: 100px;
    width: 100%;
    padding: 0 54px 0 60px;
  }

  .logo {
    flex: 0 1 258px;
    height: 100%;
  }

  .logo img {
    height: 48px;
    object-fit: contain;
  }

  .main-menu {
    flex: 0 1 451px;
    height: 100%;
    background: transparent;
    margin-top: 16px;
    margin-left: 56px;
  }

  .main-menu__content li {
    font-size: 20px;
    width: 150px;
    letter-spacing: 30px;
    text-indent: 30px;
  }

  .main-menu__content li.active {
    color: #8b572a;
  }

  .main-menu__content .divider__item:before {
    border-color: #3f3a3a;
  }

  .search {
    flex-grow: 1;
    position: static;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    margin-right: 40px;
  }

  .search__wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #979797;
    border-radius: 999px;
    padding: 0 10px 0 20px;
    width: 214px;
    height: 44px;
    font-size: 20px;
    line-height: 24px;
    color: #8b572a;
  }

  .search-input {
    width: 100%;
    height: 100%;
    outline: none;
    background: transparent;
  }

  .search .search-icon,
  .search-check {
    display: none;
  }

  .search .search-action {
    display: block;
  }

  .search img {
    height: 44px;
  }

  .tool-menu {
    position: relative;
    background: transparent;
    gap: 42px;
    width: auto;
  }

  .tool-menu .item {
    flex: auto;
  }

  .tool-menu > a:hover .icon-static {
    opacity: 0;
  }

  .tool-menu > a:hover .icon-hover {
    opacity: 1;
  }

  .tool-menu > a .icon-hover {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    opacity: 0;
  }

  .header-space {
    height: 140px;
  }

  .cart-text,
  .member-text,
  .tool-menu .icon-light {
    display: none;
  }

  .search-input,
  .tool-menu .icon-dark {
    display: block;
  }

  /*-----------------------
        Home Carousel
  -----------------------*/

  .carousel__wrapper {
    --aspect-h: 25;
    --aspect-w: 64;
  }

  .carousel__slide img {
    transform: scale(1.2);
  }

  .carousel__text {
    font-size: 30px;
    line-height: 57px;
    padding-top: 70px;
  }

  .carousel__text h3 {
    font-size: 20px;
    line-height: 64px;
  }

  .carousel__pagination {
    gap: 22px;
    margin-bottom: 34px;
  }

  .carousel__pagination .bullet {
    height: 10px;
    width: 10px;
    background: #ffffff66;
  }

  /*-----------------------
          Home Products
  -----------------------*/
  .products {
    padding-top: 70px;
    margin-bottom: 96px;
  }

  .products__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 50px 40px;
  }

  .products__card {
    padding-bottom: 14px;
  }

  .colors-list {
    gap: 10px;
  }

  .colors-list .color {
    height: 24px;
    width: 24px;
  }

  .product-content {
    padding-top: 20px;
  }

  .product-content h4 {
    padding-top: 20px;
  }

  .product-content .price {
    padding-top: 10px;
  }

  .product-content .title,
  .product-content .price {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: 4px;
  }

  .skelton {
    height: 15px;
  }

  /*-----------------------
            Footer
    -----------------------*/

  footer {
    height: 115px;
  }

  .footer__wrapper {
    font-size: 16px;
    height: 100%;
  }

  .footer-content {
    gap: 30px;
    flex-wrap: nowrap;
    width: 100%;
    padding-top: 0;
  }

  .footer-links {
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    gap: 0;
    width: auto;
    height: auto;
  }

  .footer-links li {
    width: 134px;
    text-align: center;
    line-height: 16px;
  }

  .social-link {
    flex-grow: 1;
    justify-content: flex-end;
    gap: 30px;
    padding-top: 0;
  }

  .social-link img {
    width: 50px;
  }

  .copyright {
    flex-basis: auto;
    color: #828282;
    padding: 0;
    font-size: 12px;
    text-align: left;
    display: grid;
    place-items: center;
    transform: scale(1);
  }
}

@media screen and (min-width: 1920px) {
  /*-----------------------
          Home Carousel
  -----------------------*/

  .carousel__wrapper {
    padding-bottom: calc(25 / 96 * 100%);
  }
}
