﻿@charset "UTF-8";

.q4-page {
  position: relative;
  overflow-x: hidden;
  background-color: #720707;
  background-image: url(../_img/bg-page.jpg?v=2), url(../_img/bg-tile.png);
  background-repeat: no-repeat, repeat-y;
  background-position: top center, top center;
  background-size: 100% auto, 100% auto;
  padding-bottom: 140px;
  padding-bottom: max(140px, calc(279 / 1920 * 100vw));
  color: #231815;
}

.q4-page a {
  text-decoration: none;
}

.q4-page .is-hidden,
.q4-page .is-empty,
.q4-page .is-collapsed {
  display: none;
}

/* 內容層在裝飾之上 */
.q4-hero,
.q4-hot,
.q4-panel,
.q4-btn--ghost {
  position: relative;
  z-index: 2;
}

/* 主視覺 */
.q4-hero img {
  display: block;
}

/* 精選卡列 */
.q4-hot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 40px;
  max-width: 1100px;
  margin: 24px auto 0;
}

.q4-hot__item {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 80px) / 3);
  max-width: calc((100% - 80px) / 3);
  border-radius: 8px;
  overflow: hidden;
  color: #fff;
}

.q4-hot__item:hover {
  color: #fff;
}

.q4-hot__pic {
  width: 100%;
  height: 214px;
  overflow: hidden;
}

.q4-hot__pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.q4-hot__tbox {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: #000;
  text-align: center;
}

.q4-hot__tit {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.q4-page .q4-hot__price {
  margin: auto 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  color: #c8020e;
}

.q4-hot__cost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1.3;
  color: #e9e9e9;
  text-decoration: line-through;
}

.q4-hot__cost::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M14.3722 7.66509C14.3721 3.96094 11.3692 0.958014 7.66509 0.958014C3.96095 0.958039 0.958039 3.96095 0.958014 7.66509C0.958014 11.3692 3.96094 14.3721 7.66509 14.3722V15.3302C3.43177 15.3301 0 11.8984 0 7.66509C2.52547e-05 3.43179 3.43179 2.52556e-05 7.66509 0C11.8984 0 15.3301 3.43177 15.3302 7.66509C15.3302 11.8984 11.8984 15.3302 7.66509 15.3302V14.3722C11.3693 14.3722 14.3722 11.3693 14.3722 7.66509Z' fill='black'/><path d='M5.22483 3.97289V11.4981H6.45795V8.61027H8.32345C10.1573 8.61027 11.0743 7.83035 11.0743 6.28104C11.0743 4.74228 10.1573 3.97289 8.34452 3.97289H5.22483ZM6.45795 5.02684H8.24967C8.78718 5.02684 9.18768 5.1217 9.45117 5.32195C9.70412 5.51166 9.83059 5.82785 9.83059 6.28104C9.83059 6.73424 9.70412 7.06097 9.45117 7.26122C9.19822 7.45093 8.79772 7.55632 8.24967 7.55632H6.45795V5.02684Z' fill='black'/></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M14.3722 7.66509C14.3721 3.96094 11.3692 0.958014 7.66509 0.958014C3.96095 0.958039 0.958039 3.96095 0.958014 7.66509C0.958014 11.3692 3.96094 14.3721 7.66509 14.3722V15.3302C3.43177 15.3301 0 11.8984 0 7.66509C2.52547e-05 3.43179 3.43179 2.52556e-05 7.66509 0C11.8984 0 15.3301 3.43177 15.3302 7.66509C15.3302 11.8984 11.8984 15.3302 7.66509 15.3302V14.3722C11.3693 14.3722 14.3722 11.3693 14.3722 7.66509Z' fill='black'/><path d='M5.22483 3.97289V11.4981H6.45795V8.61027H8.32345C10.1573 8.61027 11.0743 7.83035 11.0743 6.28104C11.0743 4.74228 10.1573 3.97289 8.34452 3.97289H5.22483ZM6.45795 5.02684H8.24967C8.78718 5.02684 9.18768 5.1217 9.45117 5.32195C9.70412 5.51166 9.83059 5.82785 9.83059 6.28104C9.83059 6.73424 9.70412 7.06097 9.45117 7.26122C9.19822 7.45093 8.79772 7.55632 8.24967 7.55632H6.45795V5.02684Z' fill='black'/></svg>");
}

.q4-hot__cost.is-blank {
  visibility: hidden;
}

/* P 圖示（比照 Q3 .pditem-point::before），套用於商品卡與精選卡點數 */
.q4-page .pditem-point {
  display: flex;
  justify-content: center;
  align-items: center;
}

.q4-page .pditem-point::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 4px;
  margin-top: 1px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M14.3722 7.66509C14.3721 3.96094 11.3692 0.958014 7.66509 0.958014C3.96095 0.958039 0.958039 3.96095 0.958014 7.66509C0.958014 11.3692 3.96094 14.3721 7.66509 14.3722V15.3302C3.43177 15.3301 0 11.8984 0 7.66509C2.52547e-05 3.43179 3.43179 2.52556e-05 7.66509 0C11.8984 0 15.3301 3.43177 15.3302 7.66509C15.3302 11.8984 11.8984 15.3302 7.66509 15.3302V14.3722C11.3693 14.3722 14.3722 11.3693 14.3722 7.66509Z' fill='black'/><path d='M5.22483 3.97289V11.4981H6.45795V8.61027H8.32345C10.1573 8.61027 11.0743 7.83035 11.0743 6.28104C11.0743 4.74228 10.1573 3.97289 8.34452 3.97289H5.22483ZM6.45795 5.02684H8.24967C8.78718 5.02684 9.18768 5.1217 9.45117 5.32195C9.70412 5.51166 9.83059 5.82785 9.83059 6.28104C9.83059 6.73424 9.70412 7.06097 9.45117 7.26122C9.19822 7.45093 8.79772 7.55632 8.24967 7.55632H6.45795V5.02684Z' fill='black'/></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M14.3722 7.66509C14.3721 3.96094 11.3692 0.958014 7.66509 0.958014C3.96095 0.958039 0.958039 3.96095 0.958014 7.66509C0.958014 11.3692 3.96094 14.3721 7.66509 14.3722V15.3302C3.43177 15.3301 0 11.8984 0 7.66509C2.52547e-05 3.43179 3.43179 2.52556e-05 7.66509 0C11.8984 0 15.3301 3.43177 15.3302 7.66509C15.3302 11.8984 11.8984 15.3302 7.66509 15.3302V14.3722C11.3693 14.3722 14.3722 11.3693 14.3722 7.66509Z' fill='black'/><path d='M5.22483 3.97289V11.4981H6.45795V8.61027H8.32345C10.1573 8.61027 11.0743 7.83035 11.0743 6.28104C11.0743 4.74228 10.1573 3.97289 8.34452 3.97289H5.22483ZM6.45795 5.02684H8.24967C8.78718 5.02684 9.18768 5.1217 9.45117 5.32195C9.70412 5.51166 9.83059 5.82785 9.83059 6.28104C9.83059 6.73424 9.70412 7.06097 9.45117 7.26122C9.19822 7.45093 8.79772 7.55632 8.24967 7.55632H6.45795V5.02684Z' fill='black'/></svg>");
}

.q4-hot__tab {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 38px;
  background: #c8020e;
  border-radius: 0 1.728px 1.728px 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.9px;
  color: #fff;
}

/* 米白面板 */
.q4-panel {
  max-width: 1100px;
  margin: 25px auto 0;
  padding: 40px 17px;
  background: #fffef5;
  border-radius: 10px;
}

.q4-panel__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.q4-anchor {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.q4-anchor__item {
  padding: 5px 10px;
  background: #c8020e;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.1));
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  text-decoration: none;
}

.q4-anchor__item:hover {
  color: #fff;
}

.q4-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  scroll-margin-top: 80px;
}

.q4-cat__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: "Noto Serif TC", serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.72px;
  color: #a21b18;
}

.q4-cat__title img {
  width: 28px;
  height: 33px;
}

/* 商品格（歸零站台 .pditem-list 的 padding / gap） */
.q4-page .q4-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26.24px 16.5px;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* 商品卡 */
.q4-page .q4-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 0 16px;
  background: #fff;
  border: 0;
  border-radius: 7.337px;
  box-shadow: none;
  filter: drop-shadow(1.775px 2.662px 3.106px #cbcbcb);
  text-align: center;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.q4-page .q4-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.12);
}

.q4-page .q4-card .pditem-lazyImg {
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 214 / 157;
  padding: 16.51px;
  object-fit: contain;
}

.q4-page .q4-card .pditem-txt {
  display: flex;
  flex-direction: column;
  margin: 0 16.51px;
  padding: 12.84px 0 12.84px;
  border-top: 1px solid #f5f5f5;
  font-size: 16px;
  line-height: 1.4;
}

.q4-page .q4-card .pditem-txt__tit {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  color: #231815;
}

.q4-page .q4-card .pditem-mprice {
  margin: auto 9.17px 0;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  text-decoration: line-through;
  color: #959595;
}

.q4-page .q4-card .pditem-point {
  margin: 12.84px 9.17px 0;
  font-size: 18px;
  line-height: 1.3;
  white-space: nowrap;
  font-weight: 500;
  color: #c8020e;
}

/* 按鈕 */
.q4-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 209px;
  max-width: 100%;
  height: 56px;
  padding: 0;
  background: #c8020e;
  border: 0;
  border-radius: 5px;
  filter: drop-shadow(3px 3px 1.5px rgba(0, 0, 0, 0.15));
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 2px;
  color: #fff;
  cursor: pointer;
}

.q4-btn:hover {
  color: #fff;
}

.q4-page .q4-btn--ghost {
  width: 230px;
  margin: 48px auto 0;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 5px;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.15);
  filter: none;
  text-decoration: none;
}

/* 散落裝飾 */
.q4-decos {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.q4-decos img {
  position: absolute;
  animation: q4-float 5.5s ease-in-out infinite;
}

.q4-decos img:nth-child(3n + 1) { animation-duration: 4s; }
.q4-decos img:nth-child(3n + 3) { animation-duration: 6.5s; }
.q4-decos img:nth-child(2n) { animation-delay: -1.7s; }
.q4-decos img:nth-child(3n) { animation-delay: -3.1s; }
.q4-decos img:nth-child(5n) { animation-delay: -0.8s; }

.q4-decos img:nth-child(1) { left: 2.8125%; top: 1720px; }
.q4-decos img:nth-child(2) { left: 14.3229%; top: 464px; }
.q4-decos img:nth-child(3) { left: 81.7708%; top: 345px; }
.q4-decos img:nth-child(4) { left: 92.2396%; top: 1564px; }
.q4-decos img:nth-child(5) { left: 12.3958%; top: 2165px; }
.q4-decos img:nth-child(6) { left: 7.8125%; top: 355px; }
.q4-decos img:nth-child(7) { left: 85.6771%; top: 2002px; }
.q4-decos img:nth-child(8) { left: 83.8542%; top: 856px; }
.q4-decos img:nth-child(9) { left: 13.3854%; top: 1296px; }
.q4-decos img:nth-child(10) { left: 4.7396%; top: 693px; }

@keyframes q4-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(3deg);
  }
}

/* 底部裝飾 */
.q4-deco-bottom {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* RWD */
@media (max-width: 1124px) {
  .q4-hot,
  .q4-panel {
    margin-left: 12px;
    margin-right: 12px;
  }
  .q4-hot {
    gap: 20px;
  }
  .q4-hot__item {
    flex-basis: calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
  }
}

@media (max-width: 1199.98px) {
  .q4-decos img {
    display: none;
    max-width: 110px;
    height: auto;
  }
  .q4-decos img:nth-child(3),
  .q4-decos img:nth-child(6),
  .q4-decos img:nth-child(8),
  .q4-decos img.q4-deco--keep {
    display: block;
  }
}

@media (max-width: 48em) {
  .q4-page .q4-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .q4-decos {
    display: none;
  }
}

@media (max-width: 36em) {
  .q4-page .q4-card .pditem-txt__tit {
    font-size: 15px;
  }
  .q4-page .q4-card .pditem-mprice {
    font-size: 14px;
  }
  .q4-page .q4-card .pditem-point {
    font-size: 16px;
  }
  .q4-hot__tit {
    font-size: 16px;
  }
  .q4-page .q4-hot__price {
    font-size: 16px;
  }
  .q4-hot__cost {
    font-size: 14px;
  }
  .q4-hot__cost::before {
    width: 14px;
    height: 14px;
  }
  .q4-hot__tab {
    font-size: 14px;
  }
  .q4-page .pditem-point::before {
    width: 1rem;
    height: 1rem;
  }
  .q4-page .q4-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }
  .q4-hot__item {
    flex-basis: 100%;
    max-width: 100%;
  }
  .q4-panel {
    padding: 24px 12px;
  }
  .q4-cat__title {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .q4-page *,
  .q4-page *::before,
  .q4-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
