/* 手機版底部 license_plate 與 footer_pg 區域邊界統一 */
@media (max-width: 480px) {
  .footer-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .footer-images {
    padding-left: 12px !important;
    padding-right: 12px !important;
    width: 100%;
    box-sizing: border-box;
  }
}
@media (min-width: 1024.99px) {
  .app-mobile-main,
  .main-marquee,
  .random-number-block,
  .promotion-swiper {
    max-width: 400px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* 不覆蓋 .promo-modal，電腦版回歸全域樣式 */
  #random-number-text {
    font-size: 2.2rem !important;
    font-weight: bold !important;
    letter-spacing: 0.08em !important;
    color: #26A17B !important;
    text-shadow: 0 2px 8px #1a5e4a33, 0 1px 0 #fff, 0 -1px 0 #b6ffe0;
  }
  /* 桌機下 new-footer-section 與 footer-images 不限制 400px，但保持內距 */
}
/* === 平板模式 (481px - 1024.98px) 統一設定 === */
@media (min-width: 481px) and (max-width: 1024.98px) {
  /* 防止橫向滾動 */
  body, html {
    overflow-x: hidden !important;
  }
  
  /* 隨機數字文字大小 */
  #random-number-text {
    font-size: 5vw !important;
    font-weight: bold !important;
    letter-spacing: 0.08em !important;
    color: #26A17B !important;
    text-shadow: 0 2px 8px #1a5e4a33, 0 1px 0 #fff, 0 -1px 0 #b6ffe0;
  }
  
  /* 主要區塊：導覽列、容器、頁腳內容、新頁腳區塊 */
  .navbar,
  .container,
  .footer-content,
  .new-footer-section {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }
  
  /* 主要內容區域padding設定 */
  main.flex-fill {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }
  
  /* app-mobile-main 確保不超出 */
  .app-mobile-main {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  /* 中間內容區塊：跑馬燈、隨機數字、輪播圖 */
  .main-marquee,
  .random-number-block,
  .promotion-swiper {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* 左右區塊容器 */
  .d-flex.flex-row.w-100 {
    gap: 6px !important;
    box-sizing: border-box;
  }
  
  /* 左側選單區塊 */
  .d-flex.flex-column.align-items-start[style*="max-width:140px"] {
    max-width: 160px !important;
    flex: 0 0 160px !important;
  }
  
  /* 輪播圖特殊設定 */
  .promotion-swiper {
    margin-top: 8px !important;
    margin-bottom: 4px !important;
  }
  .promotion-swiper .swiper {
    border-radius: 16px !important;
  }
  .promotion-swiper .swiper-slide img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }
  
  /* 頁腳內容與圖片區塊 */
  .footer-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .footer-images {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    gap: 8px;
  }
  .footer-images img {
    width: 100%;
    height: auto;
    max-width: unset;
    object-fit: contain;
    display: block;
  }
  
  /* 新頁腳區塊 */
  .new-footer-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }
  
  /* 平板下放大footer-images圖片 */
  .footer-images img {
    width: 120px !important;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
  .footer-images + .footer-images img {
    width: 140px !important;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
  
  /* 平板模式下放大各種按鈕 */
  
  /* 上方主菜單（橫向icon菜單）放大 */
  .main-menu-list.d-flex[style] {
    justify-content: space-between !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    gap: 0 !important;
  }
  .main-menu-list a {
    font-size: 1.3rem !important;
  }
  .main-menu-list a i {
    font-size: 2.1rem !important;
    margin-bottom: 6px !important;
  }
  
  /* 確保輪播圖、隨機數字、主菜單邊界對齊 */
  .promotion-swiper,
  .random-number-block,
  .main-menu-list {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
  
  /* 左側選單按鈕放大 */
  .menu-scroll-btn {
    padding: 16px 0 16px 20px !important;
    min-width: 140px !important;
    font-size: 1.15rem !important;
    border-radius: 20px !important;
  }
  .menu-scroll-btn img {
    width: 28px !important;
    height: 28px !important;
    margin-right: 14px !important;
  }
  
  /* 頁腳導航按鈕放大 */
  .nav-link-footer {
    font-size: 1.4rem !important;
    padding: 14px 0 10px 0 !important;
  }
  .nav-footer-icon {
    font-size: 1.9rem !important;
    margin-bottom: 6px !important;
  }
  .nav-link-footer div {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
  }
  
  /* 頁面頂部導航按鈕放大 */
  .btn-outline-success,
  .btn-success {
    font-size: 1.25rem !important;
    padding: 10px 20px !important;
    min-width: 90px !important;
  }
  
  /* 熱門區塊圖片調整 - 保持原排版 */
  section[data-section="hot"] h5 {
    font-size: 1.3rem !important;
    margin-bottom: 20px !important;
  }
  section[data-section="hot"] h5 img {
    width: 28px !important;
    height: 28px !important;
  }
  section[data-section="hot"] .col > div:first-child {
    width: 110px !important;
    height: 110px !important;
  }
  section[data-section="hot"] .col img {
    width: 100% !important;
    height: 100% !important;
  }
  section[data-section="hot"] .col > div:last-child {
    margin-top: 12px !important;
    font-size: 0.9rem !important;
  }
  
  /* 彈窗設定 */
  .promo-modal {
    max-width: 480px !important;
    width: 96vw !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    border-radius: 18px !important;
  }
}
  
  .promo-modal .promo-modal-img {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 32px !important;
    margin-top: 8px !important;
    display: block;
    border-radius: 18px 18px 0 0 !important;
  }
  .promo-modal .promo-modal-btns {
    gap: 16px !important;
    margin-top: 16px !important;
    margin-bottom: 6px !important;
  }
  .promo-modal .promo-modal-btn {
    font-size: 1.12rem !important;
    padding: 12px 0 !important;
    border-radius: 10px !important;
    min-width: 110px !important;
    flex: 1 1 0 !important;
    box-shadow: 0 2px 8px rgba(38,161,123,0.10);
  }
  .promo-modal .promo-modal-title {
    font-size: 1.38rem !important;
    font-weight: bold !important;
    line-height: 1.3 !important;
    margin-bottom: 18px !important;
  }
  .promo-modal .promo-modal-content,
  .promo-modal .promo-modal-desc {
    font-size: 1.18rem !important;
    line-height: 1.8 !important;
    margin-bottom: 18px !important;
  }


@media (min-width: 768px) and (max-width: 1200px) {
  .navbar .d-flex.align-items-center {
    width: 100%;
    justify-content: center !important;
    gap: 0 !important;
  }
  .navbar img[src*="header_accent.avif"] {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    position: relative;
    left: 0;
    right: 0;
    max-width: 80%;
    height: 36px !important;
    width: auto !important;
  }
}
/* 平板 header_accent.avif 置中 */
@media (min-width: 768px) and (max-width: 1200px) {
  .navbar img[src*="header_accent.avif"] {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    float: none !important;
    position: relative;
    left: 0;
    right: 0;
  }
}
/* 導覽列與頁腳 RWD 修正 - 僅手機版 */
@media (max-width: 767px) {
  .footer {
    /* Removed max-width and width styles */
    min-width: 0;
    margin: 0 !important;
    border-radius: 0 !important;
    left: 0;
    right: 0;
  }
  .footer-content,
  .container-fluid,
  .container {
    /* Removed max-width and width styles */
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .nav-link-footer {
    font-size: 1.05rem !important;
    padding: 8px 0 4px 0 !important;
  }
  .nav-link-footer .nav-footer-icon {
    font-size: 1.4rem !important;
  }
}

@media (max-width: 900px) {
  .nav-link-footer {
    font-size: 0.98rem !important;
  }
  .nav-link-footer .nav-footer-icon {
    font-size: 1.2rem !important;
  }
}
/* app-mobile-main RWD 寬度控制 */
.app-mobile-main {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
}

@media (min-width: 1201px) {
  .app-mobile-main {
    max-width: 400px;
  }
}
.promo-modal-btns {
  width: 100%;
  display: flex;
  gap: 12px;
  margin-top: 4px;
  justify-content: center;
}

.promo-modal-btn {
  flex: 1 1 0;
  font-weight: 600;
  font-size: 1.08rem;
  border-radius: 8px;
  padding: 10px 0;
  box-shadow: 0 2px 8px rgba(38,161,123,0.10);
  transition: background 0.2s, color 0.2s, border 0.2s;
  min-width: 0;
}

.promo-modal-btn-register {
  background: #26A17B;
  color: #fff;
  border: none;
}

.promo-modal-btn-register:hover {
  background: #218e6a;
  color: #fff;
}

.promo-modal-btn-login {
  background: #fff;
  color: #26A17B;
  border: 2px solid #26A17B;
}

.promo-modal-btn-login:hover {
  background: #e8f7f1;
  color: #218e6a;
  border-color: #218e6a;
}

.promo-modal-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.promo-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #26A17B;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-align: center;
}

.promo-modal-desc {
  font-size: 1rem;
  color: #444;
  margin-bottom: 14px;
  text-align: center;
  line-height: 1.5;
}

.promo-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 24px 16px 20px 16px;
  max-width: 100%; /* 移除固定寬度限制 */
  width: 90vw;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.promo-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}

.promo-modal-close:hover {
  color: #26A17B;
}

.promo-modal-img {
  width: 100%;
  max-width: 260px;
  border-radius: 10px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(38,161,123,0.08);
}

.promo-modal-btn {
  width: 100%;
  font-weight: 600;
  font-size: 1.1rem;
  background: #26A17B;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  color: #fff;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(38,161,123,0.10);
  transition: background 0.2s;
}

.promo-modal-btn:hover {
  background: #218e6a;
}

.center-mobile-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.main-mobile-content {
  width: 100%;
  max-width: 100%; /* 移除固定寬度限制 */
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 32px 0 rgba(38,161,123,0.10), 0 1.5px 6px 0 rgba(0,0,0,0.04);
  padding: 32px 20px 28px 20px;
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* 統一區塊寬度設定 */
.main-mobile-content,
.promo-modal {
  max-width: 1400px; /* 與頁腳一致 */
  margin: 0 auto; /* 自動居中 */
}
.new-footer-section,
.footer-images {
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .main-mobile-content,
  .footer-content,
  .navbar,
  .container {
    max-width: 100% !important; /* 設置全寬 */
    margin: 0; /* 移除自動居中 */
    padding: 0; /* 移除內距 */
  }
  .new-footer-section,
  .footer-images {
    max-width: 100% !important;
    margin: 0;
  }

  html, body {
    max-width: 100% !important; /* 設置全寬 */
    margin: 0; /* 移除外距 */
    padding: 0; /* 移除內距 */
  }
}

@media (max-width: 480px) {
  html, body {
    max-width: 100% !important;
    margin: 0;
  }
  .main-mobile-content {
    max-width: 100vw;
    border-radius: 0;
    margin: 0;
    padding: 24px 8px 20px 8px;
  }
  .footer {
    max-width: 100% !important;
    margin: 0 auto;
  }
}

@media (min-width: 768px) {
  .footer-content {
    max-width: 720px; /* 平板裝置的最大寬度 */
  }
  .main-mobile-content {
    max-width: 720px; /* 平板裝置的最大寬度 */
  }
  .promo-modal {
    max-width: 720px; /* 平板裝置的最大寬度 */
  }
}

/* 桌面才限制底部導覽列寬度 */

/* 移除重複設定，避免平板範圍衝突 */

@media (min-width: 1200px) {
  .footer-content {
    max-width: 1140px; /* 桌面裝置的最大寬度 */
  }
  .main-mobile-content {
    max-width: 1140px; /* 桌面裝置的最大寬度 */
  }
  .promo-modal {
    max-width: 1140px; /* 桌面裝置的最大寬度 */
  }

  html, body {
    max-width: 400px; /* 限制最大寬度 */
    margin: 0 auto; /* 居中顯示 */
  }
}

.btn-outline-success,
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active,
.btn-outline-success:active:focus {
  background: #fff !important;
  color: #26A17B !important;
  border-color: #26A17B !important;
  box-shadow: none !important;
}

.nav-link-footer {
  color: #888 !important;
  transition: color 0.2s;
  position: relative;
  z-index: 1;
  text-decoration: none !important;
  font-weight: 400 !important;
}

.nav-link-footer .nav-footer-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 2px;
}

.nav-link-footer.active,
.nav-link-footer.active .nav-footer-icon {
  color: #26A17B !important;
}

.nav-link-footer.active div {
  color: #26A17B !important;
}

.nav-link-footer div {
  font-size: 0.95rem;
  font-weight: 400 !important;
}

/* 強化頁腳寬度和對齊設定 */
/* 桌面寬度下底部導覽列固定 400px 並置中，僅桌機適用 */
@media (min-width: 1024.99px) {
  .new-footer-section {
    max-width: 400px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
  }
  .footer-images {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }
  .footer,
  .footer-content {
    max-width: 400px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* 平板/手機全寬 */
@media (max-width: 1023px) {
  .footer,
  .footer-content {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.footer .footer-bg-imgs {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  z-index: 0;
}

.footer .footer-bg-imgs .footer-bg {
  flex: 1 1 0;
  background-size: auto 48px;
  background-repeat: no-repeat;
  background-position: center bottom;
  opacity: 1 !important;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  align-self: flex-end;
}

.footer .footer-bg-imgs .footer-bg:first-child {
  background-position: left bottom;
}

.footer .footer-bg-imgs .footer-bg:nth-child(2) {
  background-position: center bottom;
}

.footer .footer-bg-imgs .footer-bg:last-child {
  background-position: right bottom;
}

.footer .footer-content {
  position: relative;
  z-index: 1;
  background: none !important;
  border-radius: 0 !important;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  max-width: 100%; /* 確保內容寬度與頁腳一致 */
  padding: 0 16px; /* 增加左右內距以適應不同螢幕尺寸 */
}

.footer-content a.nav-link-footer {
  flex: 1 1 0;
  min-width: 0;
  max-width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  font-size: 1.1rem;
  text-decoration: none !important;
  font-weight: 400 !important;
}

.footer-content .nav-footer-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.footer-content a.nav-link-footer div {
  font-size: 0.95rem;
  font-weight: 400 !important;
}

.promotion-swiper {
  width: 100%;
  margin: 0 auto 0 auto;
  position: relative;
}

.promotion-swiper .swiper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.promotion-swiper .swiper-slide {
  text-align: center;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.promotion-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  display: block;
}

.promotion-swiper .swiper-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--swiper-pagination-bottom,0px) !important;
  width: 100%;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.promotion-swiper .swiper-pagination .swiper-pagination-bullet {
  background: #fff;
  opacity: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 0 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  border: 1px solid transparent;
  transition: all 0.2s;
  pointer-events: auto;
}

.promotion-swiper .swiper-pagination .swiper-pagination-bullet-active {
  width: 16px;
  height: 6px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #26A17B;
  box-shadow: 0 2px 8px rgba(38,161,123,0.10);
}

.promotion-swiper .swiper-pagination .swiper-pagination-bullet {
  pointer-events: auto;
}

/* 統一導覽列和頁腳的寬度設定 */
.navbar {
  max-width: 1400px; /* 與頁腳一致 */
  margin: 0 auto; /* 自動居中 */
}

.container {
  max-width: 1400px; /* 確保所有區塊一致 */
  margin: 0 auto; /* 自動居中 */
}

/* 手機和平板設置全寬 */
@media (max-width: 1200px) {
  html, body {
    max-width: 100% !important; /* 設置全寬 */
    margin: 0; /* 移除外距 */
    padding: 0; /* 移除內距 */
  }
}

/* 電腦版保持最大寬度 400px */
@media (min-width: 1201px) {
  html, body {
    max-width: 400px; /* 限制最大寬度 */
    margin: 0 auto; /* 居中顯示 */
  }
}
