/* 針對所有錨點目標設定 */
#section_01,
#section_02,
#section_03,
#section_04,
#section_05,
#section_06,
#section_07 {
  scroll-margin-top: 200px; /* 選單高度 + 想要預留的間距 */
}
.pc_show {
  display: block;
}
.mb_show {
  display: none;
}

body {
  background: url(../../images/bg.jpg) top center repeat #0e1730 fixed;
  background-size: auto;
}

.wrapper {
  width: 100%;
  background: url(../../images/bg_kv.png) top center no-repeat;
  background-size: auto;
}

@media (max-width: 1240px) {
  .wrapper {
    background: url(../../images/bg_kv1240.png) top center no-repeat;
    background-size: 100% auto;
  }
  .side-menu2 {
    /* 設定縮放比例為 0.8 (即 80%) */
    transform: scale(0.8);
    /* 設定縮放後的基準點在右側中心，這樣縮小後會自動靠右 */
    transform-origin: right center;
    /* 確保容器寬度不會因為縮放而撐開，並強制靠右 */
    margin-left: auto;
    margin-right: 0;
    /* 如果原先有固定 left 或 right，請視情況調整 */
    right: 0;
    left: auto;
    /* 避免縮放後的空白區域影響到原本的滾動條或點擊 */
    max-width: 80%;
  }
}
@media (max-width: 767px) {
  .wrapper {
  }
  .pc_show {
    display: none;
  }
  .mb_show {
    display: block;
  }
}
.main {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.kv {
  position: relative;
  width: 100%; /* 寬度撐滿 */
  max-width: 1240px; /* 根據你的設計設定最大寬度 */
  height: auto; /* 讓高度隨比例縮放 */
  aspect-ratio: 1240 / 770; /* 重要：保持原圖比例，避免容器塌陷 */
  margin: 0 auto;
  pointer-events: auto;
}
.kv > div {
  position: absolute;
}
.kv img {
  width: 100%;
  height: auto;
  display: block;
}
.kv_w1 {
  top: 0;
  left: 0;
  width: 25%;
}
.kv_w2 {
  top: 0;
  left: 0;
  width: 100%;
}
.kv_w3 {
  top: 0;
  left: 0;
  width: 100%;
}
.kv_w4 {
  top: 0;
  left: 50%;
  width: 62%;
}

@media (max-width: 767px) {
  .kv {
    background: url(../../images/bg-750.jpg) top center no-repeat;
    background-size: 100% auto;
    height: 140vw;
    pointer-events: auto;
  }
  .kv_w1,
  .kv_w2,
  .kv_w3 {
    top: 0;
    left: 0;
    width: 100%;
  }
}
.category-hobby {
  width: 100%;
  max-width: 1240px;
  height: auto;
  margin: 0 auto 5rem auto;
  padding-bottom: 50px;
  background-color: #8f1d2c;
  border-radius: 30px;
  text-align: center;
}
.category-hero {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 10px;
}
.hero-content {
  max-width: 520px;
  margin: auto;
  position: relative;
  z-index: 2;
}
.hero-center h2 {
  color: #fff;
  font-size: 3.6rem;
  font-weight: 900;
  text-align: center;
}
.sub {
  color: #ffe000;
  font-size: 2rem;
  font-weight: 500;
  text-align: center;
}
.desc {
  color: #f0d6d9;
  font-size: 1.2rem;
  font-weight: 400;
  text-align: center;
  display: block;
}
.hero-deco {
  position: absolute;
  transform: translateY(-50%);
  z-index: 1;
}
.hero-deco.left {
  left: 0;
}
.hero-deco.right {
  right: 0;
}
.hero-left img,
.hero-right img,
.hero img {
  max-width: 100%;
  height: auto;
  transform: translateY(-10%);
}
@media (max-width: 1000px) {
  .hero-center {
    padding: 0 10px;
  }
  .hero-center h2 {
    font-size: 2.6rem;
  }
  .hero-center .sub {
    font-size: 1.4rem;
  }
  .hero-center .desc {
    font-size: 0.9rem;
  }
}
@media (max-width: 767px) {
  .category-hero {
    grid-template-columns: 1fr;
  }
  .hero-center {
    padding: 0 10px;
  }
  .hero-center h2 {
    font-size: 2.4rem;
  }
  .hero-center .sub {
    font-size: 1.4rem;
  }
  .hero-center .desc {
    font-size: 1rem;
  }
}

.category-tcg {
  background-color: #0c2643;
}
.category-tcg .desc {
  color: #b8c7d9;
}
.btn-yellow {
  background-color: #ffe000; /* 使用黃色，#ffc107 較亮眼 */
  color: #000000; /* 文字黑色 */
  padding: 10px 30px; /* 增加內距 */
  border: none; /* 去除邊框 */
  border-radius: 50px; /* 圓角效果 */
  cursor: pointer; /* 滑鼠移上變手型 */
  font-size: 2rem;
  font-weight: bold; /* 字體加粗 */
  text-decoration: none; /* 若是 <a> 標籤，去除底線 */
  display: inline-block; /* 確保在行內排列正常 */
  transition: background-color 0.3s; /* 滑鼠移入效果 */
  margin-top: 30px;
}

.category-optics {
  background-color: #1e4a3a;
}
.category-optics .desc {
  color: #c9ded6;
}

.category-luxury {
  background-color: #3b2a6f;
}
.category-luxury .desc {
  color: #d4cff1;
}

/* 滑鼠移入時的樣式 */
.btn-yellow:hover {
  background-color: #ffa000; /* 稍微深一點的黃色 */
}

/*購物流程*/
.customs-rule {
  width: 100%;
  background-color: #f9f8f4;
  border-top: 2px solid #dfdbcb;
  text-align: center;
  padding: 30px 0;
}
.customs-rule img {
  width: 100%;
  max-width: 960px;
}

/* =========================================
   1. 佈局工具類 (Layout Utilities)
   ========================================= */
.grid-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(1, 1fr); /* 預設手機 1 欄 */
  padding: 10px;
  margin: 0 50px;
}
/* 針對 grid 容器內的空 a 標籤 */
.grid-layout > a:empty {
  display: none;
}
.full-row {
  grid-column: 1 / -1;
  /* "1 / -1" 代表從第一格寬度跨越到最後一格，不管你原本是幾欄都會自動滿版 */
}
.full-row:hover img {
  transform: none;
}
/* 桌機版欄位控制 (768px 以上) */
@media (min-width: 768px) {
  .pc-col-1 {
    grid-template-columns: repeat(1, 1fr);
  }
  .pc-col-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .pc-col-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .pc-col-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .pc-col-5 {
    grid-template-columns: repeat(5, 1fr);
  }
  .pc-col-6 {
    grid-template-columns: repeat(6, 1fr);
  }
  .pc_show.grid-layout {
    display: grid !important;
  }
}

/* 手機版欄位控制 (767px 以下) */
@media (max-width: 767px) {
  .grid-layout {
    margin: 0 3vw 3vw 3vw;
    padding: 10px 0;
  }
  .mb-col-1 {
    grid-template-columns: repeat(1, 1fr);
  }
  .mb-col-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .mb-col-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .mb-gap-sm {
    gap: 10px 5px;
  } /* 手機縮小間距用 */
}

/* =========================================
   2. 主題系統 (Theme System)
   ========================================= */

/* 主題 A：一番賞 */
.theme-ichi {
  --card-bg: #fff;
  --card-border: #fff;
  --card-borderPx: 2px;
  --name-color: #000;
  --price-label: #000;
  --price-num: #ff3b3b;
}

/* 主題 B：競標 */
.theme-bidding {
  --card-bg: #311e17;
  --card-border: #ffa33d;
  --card-borderPx: 2px;
  --name-color: #fff;
  --price-label: #ffc329;
  --price-num: #ffc329;
}

/* 主題 C：一般商品卡 */
.theme-pd {
  --card-bg: #fff;
  --card-border: #dfdfdf;
  --card-borderPx: 2px;
  --name-color: #333;
  --price-label: #e21c00;
  --price-num: #e21c00;
}

.theme-ichi .grid-item:hover,
.theme-bidding .grid-item:hover,
.theme-pd .grid-item:hover {
  transform: translateY(-5px);
}

@media (max-width: 767px) {
  .theme-pd {
    --card-borderPx: 1px;
  }
}

/* =========================================
   3. 商品卡結構 (Component)
   ========================================= */
.grid-item {
  background: var(--card-bg);
  border: var(--card-borderPx) solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  padding: 0;
}
/* --- 1. 保持原樣 (不需要寫 hover，或者強制重設) --- */
.hvr-none:hover {
  transform: none !important;
  box-shadow: none !important;
  cursor: default;
}

/* --- 2. 放大 --- */
.hvr-grow:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* --- 3. 往上移動  --- */
.hvr-up:hover {
  /* 注意：通常上移是負值，translateY(-4px) 才是往上 */
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  transition: all 0.5s ease-out;
}

.imgbox {
  width: 100%;
  aspect-ratio: 1 / 1; /* 固定比例 */
  overflow: hidden; /* 超出部分隱藏 */
  display: flex; /* 讓圖片置中 */
  align-items: center;
  justify-content: center;
  background-color: #fff;
}
.imgbox img {
  max-width: 100%; /* 寬度最多 100% */
  max-height: 100%; /* 高度最多 100% */
  object-fit: contain; /* 確保整張圖都看得到，不被裁切 */
}

/* 內容區 */
.pd-content {
  padding: 12px 5px;
  display: flex;
  flex-direction: column;
}

.name {
  color: var(--name-color);
  font-size: 1rem;
  height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  text-align: center;
}

.price {
  color: var(--price-label);
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
}
.price b {
  color: var(--price-num);
  font-size: 1.8rem;
  line-height: 1;
  display: inline-block;
  letter-spacing: 0.05rem;
}

/* 額外元件：競標橫條 & 副標題 */
aside {
  display: flex;
  justify-content: space-between;
  background-color: #e27c37;
}
.rt-auction-time {
  text-align: right;
  flex: 1; /* 讓這個區塊佔滿剩下的空間，文字才能在裡面靠右 */
}
.rt-auction-text,
.rt-auction-time {
  word-break: break-all;
  color: #fff !important;
  font-size: 15px !important;
  padding: 2px 5px;
}

.promo-tag {
  background: #ffe000;
  color: #000;
  text-align: center;
  padding: 4px;
  font-size: 15px;
  font-weight: 900;
}

@media (max-width: 767px) {
  .grid-item span {
    line-height: 14px;
  }
  .name,
  .promo-tag,
  .price {
    font-size: 12px;
  }
  .rt-auction-text,
  .rt-auction-time {
    font-size: 10px !important;
  }
  .price b {
    font-size: 20px;
    transform: translateY(4px);
  }
}

.month {
  margin: 0 40px;
  padding: 20px;
  background: #fffcdb;
}
@media (max-width: 767px) {
  .month {
    margin: 0 8px;
    padding: 0px;
  }
  .month > .sticker-grid {
    gap: 5px;
  }
}

.bank {
  clear: both;
  padding: 30px 0 50px 0;
}

/* 精選賣家 */
.shop-section {
  max-width: 1200px;
  margin: 80px auto;
  text-align: center;
}
.shop-section h2 {
  font-size: 3rem;
  font-weight: bolder;
  color: #000;
}
/* 分類列 */
.shop-filter {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px 0;
}
.filter-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 10px 25px;
  position: relative;
}

.filter-btn.active {
  color: #000;
  background-color: #ffe000;
}

/* 店家列表 */

.shop-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 30px 10px 0 10px;
  align-items: start;
}

/* 卡片 */

.shop-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid #ccc;
  width: 100%;
  display: block;
}

.shop-card img {
  width: 100%;
  display: block;
}

/* 店名白底 */

.shop-name {
  position: absolute;
  bottom: 0;
  width: 100%;
  color: #fff;
  text-align: center;
  padding: 10px 5px;
  font-weight: 600;
  font-size: 14px;
}

/* 滑鼠移上去時的效果，讓使用者知道這是可以點的 */
.shop-card:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
  .shop-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-btn {
    font-size: 13px;
    padding: 10px 5px;
  }
  .shop-card {
    border-radius: 6px;
  }
}

/* Hashtag 矩形圓角 */
.Hashtag strong,
.Hashtag strong a,
.Hashtag strong span {
  border-radius: 50px !important; /* 數值可依據想要的圓潤程度調整，若要藥丸狀可改成 50px */
}
