/* ==========================================
   電商直銷平台 - 主題樣式
   色系: 紅橘色系 (類似淘寶、拼多多)
   ========================================== */

/* ========== CSS 變數 ========== */
:root {
  /* 主色調 */
  --primary-color: #FF4D4F;
  --primary-dark: #CF1322;
  --primary-light: #FFA39E;
  
  /* 輔助色 */
  --orange: #FF7A45;
  --orange-light: #FFD8BF;
  --gold: #FAAD14;
  --gold-light: #FFF1B8;
  
  /* 功能色 */
  --success: #52C41A;
  --warning: #FAAD14;
  --danger: #FF4D4F;
  --info: #1890FF;
  
  /* 中性色 */
  --text-primary: #262626;
  --text-secondary: #595959;
  --text-muted: #8C8C8C;
  --border-color: #F0F0F0;
  --bg-color: #F5F5F5;
  
  /* 間距 */
  --header-height: 56px;
  --search-bar-height: 52px;
  --bottom-nav-height: 56px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ========== 基礎樣式 ========== */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== 主題色彩類 ========== */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.btn-primary-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.btn-primary-custom:hover,
.btn-primary-custom:active {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

/* 漸變背景 */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #FF7875 100%);
}

.bg-gradient-orange {
  background: linear-gradient(135deg, var(--orange) 0%, #FFA940 100%);
}

.bg-gradient-red {
  background: linear-gradient(135deg, #FF4D4F 0%, #FF7A45 100%);
}

.bg-gradient-gold {
  background: linear-gradient(135deg, #FAAD14 0%, #FF7A45 100%);
}

/* 淺色背景 */
.bg-red-light { background-color: #FFF1F0; }
.bg-orange-light { background-color: #FFF7E6; }
.bg-blue-light { background-color: #E6F7FF; }
.bg-green-light { background-color: #F6FFED; }
.bg-purple-light { background-color: #F9F0FF; }
.bg-pink-light { background-color: #FFF0F6; }
.bg-cyan-light { background-color: #E6FFFB; }
.bg-yellow-light { background-color: #FFFBE6; }
.bg-warning-light { background-color: #FFFBE6; }
.bg-danger-light { background-color: #FFF1F0; }

/* 文字顏色 */
.text-orange { color: #FF7A45; }
.text-purple { color: #722ED1; }
.text-pink { color: #EB2F96; }
.text-cyan { color: #13C2C2; }
.text-warning-dark { color: #AD6800; }

/* ========== 頂部導航欄 ========== */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #fff;
}

.header-transparent {
  background-color: transparent;
}

.header-transparent .navbar {
  background-color: transparent !important;
}

.search-bar {
  border-bottom: 1px solid var(--border-color);
}

.search-bar .input-group {
  border-radius: 20px;
  overflow: hidden;
}

.search-bar .form-control {
  border-radius: 0;
}

.search-bar .btn {
  border-radius: 0 20px 20px 0;
}

/* 徽章點 */
.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.badge-dot-sm {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 6px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

/* ========== 主要內容區域 ========== */
.main-content {
  padding-top: calc(var(--header-height) + var(--search-bar-height));
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  min-height: 100vh;
}

.main-content-no-header {
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  min-height: 100vh;
}

.main-content-no-bottom {
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  min-height: 100vh;
}

/* ========== 輪播圖 ========== */
.banner-section {
  padding: 10px;
}

.banner-swiper {
  border-radius: 12px;
  overflow: hidden;
}

.banner-item {
  height: 150px;
  display: flex;
  align-items: center;
  padding: 20px;
  color: #fff;
}

.banner-content h3 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.banner-content p {
  opacity: 0.9;
  margin-bottom: 10px;
}

.swiper-pagination-bullet-active {
  background: var(--primary-color) !important;
}

/* ========== 快捷菜單 ========== */
.quick-menu .menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  color: var(--text-primary);
}

.quick-menu .menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.quick-menu .menu-item span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ========== 直銷專區 ========== */
.mlm-section .commission-banner {
  position: relative;
  overflow: hidden;
}

.team-stats .stat-card h5 {
  font-size: 1rem;
}

/* ========== 限時秒殺 ========== */
.countdown {
  display: flex;
  align-items: center;
}

.countdown-item {
  background-color: #262626;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  margin: 0 2px;
}

.flash-swiper {
  padding: 0 5px;
}

.flash-item {
  text-align: center;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
}

.flash-img img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 8px;
}

.flash-progress {
  height: 6px;
  margin-top: 5px;
  border-radius: 3px;
}

/* ========== 商品卡片 ========== */
.product-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-card .product-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  padding: 2px 6px;
}

.commission-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #FAAD14 0%, #FF7A45 100%);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 0;
  text-align: center;
}

.product-title {
  font-size: 0.85rem;
  line-height: 1.3;
  height: 2.2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
}

.product-card .price {
  font-size: 1.1rem;
}

/* ========== 商品列表頁 ========== */
.products-page {
  padding-top: calc(var(--header-height) + var(--search-bar-height));
}

.category-sidebar {
  position: fixed;
  top: calc(var(--header-height) + var(--search-bar-height));
  left: 0;
  bottom: var(--bottom-nav-height);
  width: 25%;
  background-color: #F7F7F7;
  overflow-y: auto;
  z-index: 100;
}

.category-list {
  padding: 0;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-left: 3px solid transparent;
}

.category-item.active {
  background-color: #fff;
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.category-item i {
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.product-list-container {
  margin-left: 25%;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
}

.filter-bar {
  z-index: 99;
}

.filter-item {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 5px 10px;
}

.filter-item.active {
  color: var(--primary-color);
  font-weight: bold;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.product-card-small {
  display: block;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.product-card-small .product-img {
  position: relative;
  aspect-ratio: 1;
}

.product-card-small .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.commission-tag-sm {
  position: absolute;
  top: 5px;
  right: 5px;
  background: linear-gradient(135deg, #FAAD14 0%, #FF7A45 100%);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 10px;
}

.product-title-sm {
  font-size: 0.75rem;
  line-height: 1.3;
  height: 2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
}

.product-card-small .product-info {
  padding: 8px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.price-row .price {
  font-size: 0.9rem;
  font-weight: bold;
}

/* ========== 商品詳情頁 ========== */
.product-gallery {
  background: #fff;
}

.product-swiper .swiper-slide img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.price-main .fs-4 {
  font-size: 1.75rem !important;
}

.price-tags .badge {
  font-size: 0.7rem;
  font-weight: normal;
  padding: 3px 8px;
  margin-right: 5px;
}

.product-detail-title {
  font-size: 1rem;
  line-height: 1.5;
}

.product-subtitle span {
  font-size: 0.75rem;
}

.commission-info {
  background: linear-gradient(135deg, #FFF7E6 0%, #FFE7BA 100%);
  padding: 10px 15px;
  border-radius: 8px;
}

.commission-banner-sm {
  background: linear-gradient(135deg, #FAAD14 0%, #FF7A45 100%);
}

.shop-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

/* 底部購買欄 */
.product-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 10px 15px;
  padding-bottom: calc(10px + var(--safe-area-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.product-action-bar .action-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 12px;
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.product-action-bar .action-icon i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.action-buttons {
  display: flex;
  gap: 0;
}

.action-buttons .btn {
  border-radius: 0;
  padding: 10px 20px;
  font-size: 0.9rem;
}

.action-buttons .btn:first-child {
  border-radius: 20px 0 0 20px;
}

.action-buttons .btn:last-child {
  border-radius: 0 20px 20px 0;
}

.cart-badge-xs {
  position: absolute;
  top: -5px;
  right: 0;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 10px;
}

/* Modal 底部彈出 */
.modal-dialog-bottom {
  margin: 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(0);
}

.modal-dialog-bottom .modal-content {
  border-radius: 16px 16px 0 0;
  max-height: 80vh;
  overflow-y: auto;
}

/* ========== 會員中心 ========== */
.member-header {
  position: relative;
  padding-top: 20px;
  padding-bottom: 40px;
}

.member-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #FF7875 100%);
}

.member-avatar {
  position: relative;
}

.member-avatar img {
  width: 70px;
  height: 70px;
  border: 3px solid rgba(255,255,255,0.3);
}

.vip-badge {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FAAD14 0%, #FF7A45 100%);
  color: #fff;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.asset-overview {
  backdrop-filter: blur(10px);
}

/* 訂單入口 */
.order-entry {
  margin-top: -30px !important;
}

.order-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
}

.order-icon {
  position: relative;
  color: var(--text-primary);
  margin-bottom: 5px;
}

/* ========== 訂單頁面樣式 ========== */
.order-tabs {
  z-index: 50;
  top: 60px;
}

.order-tabs .btn-link {
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  white-space: nowrap;
  font-size: 0.9rem;
}

.order-tabs .btn-link:hover,
.order-tabs .btn-link.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.order-list-container {
  min-height: calc(100vh - 120px);
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

.order-list-container .order-item {
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0,0,0,0.05);
}

.order-list-container .order-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 77, 79, 0.15) !important;
}

.order-products img {
  object-fit: cover;
  width: 60px;
  height: 60px;
}

.shipping-info {
  background-color: rgba(24, 144, 255, 0.05) !important;
  border: 1px solid rgba(24, 144, 255, 0.1);
}

.refund-info {
  background-color: rgba(255, 77, 79, 0.05) !important;
  border: 1px solid rgba(255, 77, 79, 0.1);
}

.order-list-container .btn {
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 0.875rem;
  font-weight: 500;
}

.order-list-container .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
}

.order-list-container .btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.order-list-container .btn-outline-secondary {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.empty-state {
  background: white;
  border-radius: 12px;
  margin: 20px 0;
}

.empty-state i {
  opacity: 0.3;
}

.empty-content {
  max-width: 400px;
  margin: 0 auto;
}

.empty-icon i {
  opacity: 0.4;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.quick-link-item {
  display: block;
  transition: transform 0.2s;
}

.quick-link-item:hover {
  transform: translateY(-2px);
}

.quick-link-icon {
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-link-item:hover .quick-link-icon {
  background-color: var(--primary-color) !important;
}

.quick-link-item:hover .quick-link-icon i {
  color: white !important;
}

.shopping-tips {
  background: linear-gradient(135deg, #FFF7E6 0%, #FFF1F0 100%) !important;
  border: 1px solid rgba(255, 173, 51, 0.2);
}

/* ========== 地址管理頁面樣式 ========== */
.address-item {
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0,0,0,0.05);
}

.address-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 77, 79, 0.1) !important;
}

.contact-info {
  flex: 1;
}

.address-content .badge {
  font-size: 0.7rem;
  padding: 3px 8px;
}

.empty-address-state {
  margin-top: 20px;
}

.empty-address-state .empty-content {
  max-width: 400px;
  margin: 0 auto;
}

.empty-address-state .empty-icon i {
  opacity: 0.4;
  animation: float 3s ease-in-out infinite;
}

.address-tips {
  background: linear-gradient(135deg, #E6F7FF 0%, #F0F9FF 100%) !important;
  border: 1px solid rgba(24, 144, 255, 0.2);
}

.fixed-add-button {
  position: sticky;
  bottom: calc(var(--bottom-nav-height) + 10px);
  z-index: 50;
  background: linear-gradient(to top, var(--bg-color) 70%, transparent);
  margin-top: auto;
}

.modal-dialog-bottom {
  align-items: flex-end;
}

.modal-dialog-bottom .modal-content {
  margin-bottom: 0;
  max-height: 90vh;
  overflow-y: auto;
}

/* 表單樣式增強 */
.modal-body .form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-body .form-control,
.modal-body .form-select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 77, 79, 0.25);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 收益卡片 */
.income-card {
  background: linear-gradient(135deg, #FAAD14 0%, #FF7A45 100%);
}

/* 功能列表 */
.list-group-item {
  padding: 15px;
  border: none;
  border-bottom: 1px solid var(--border-color);
}

.list-group-item:last-child {
  border-bottom: none;
}

.service-item {
  display: block;
  padding: 10px;
  color: var(--text-secondary);
}

/* ========== 團隊頁面 ========== */
.team-page {
  padding-top: var(--header-height);
}

.team-stats-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #FF7875 100%);
}

.performance-card {
  transition: transform 0.2s;
}

.performance-card:active {
  transform: scale(0.98);
}

.level-progress .progress {
  background-color: #E8E8E8;
}

.level-progress .progress-bar {
  background: linear-gradient(90deg, #FAAD14 0%, #FF7A45 100%);
}

.member-item {
  transition: background-color 0.2s;
}

.member-item:active {
  background-color: var(--bg-color);
}

/* 邀請浮動按鈕 */
.invite-fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--bottom-nav-height) + 80px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.invite-fab .btn {
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* ========== 購物車頁面 ========== */
.cart-page {
  padding-top: var(--header-height);
}

.promo-banner {
  position: sticky;
  top: var(--header-height);
  z-index: 99;
}

.cart-item-img img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.cart-item-title {
  font-size: 0.9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-spec {
  background-color: var(--bg-color);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.quantity-control button {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 1rem;
}

.commission-hint {
  color: var(--gold);
}

/* 結算欄 */
.cart-checkout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 10px 15px;
  padding-bottom: calc(10px + var(--safe-area-bottom));
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

/* ========== 底部導航 ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background-color: #fff;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  box-shadow: 0 -1px 10px rgba(0,0,0,0.1);
  z-index: 999;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  position: relative;
}

.bottom-nav .nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.bottom-nav .nav-item.active {
  color: var(--primary-color);
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(12px);
  background: var(--primary-color);
  color: #fff;
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.cart-badge-sm {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 10px;
}

/* ========== 響應式調整 ========== */

/* 小屏手機 */
@media (max-width: 375px) {
  .quick-menu .menu-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .quick-menu .menu-item span {
    font-size: 0.65rem;
  }
  
  .product-title {
    font-size: 0.8rem;
  }
  
  .countdown-item {
    padding: 1px 4px;
    font-size: 0.65rem;
  }
}

/* 平板橫式和小電腦 */
@media (min-width: 768px) {
  body {
    background-color: #f8f9fa;
  }
  
  .main-content,
  .main-content-no-header,
  .main-content-no-bottom {
    max-width: 768px;
    margin: 0 auto;
    background-color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
  }
  
  .header-fixed {
    max-width: 768px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .bottom-nav {
    max-width: 768px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  }
  
  .product-action-bar,
  .cart-checkout-bar {
    max-width: 768px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* 商品網格調整為3列 */
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  /* 首頁熱門商品調整 */
  .hot-products .row.g-2 {
    --bs-gutter-x: 1rem;
  }
  
  /* 快捷菜單圖標加大 */
  .quick-menu .menu-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }
  
  .quick-menu .menu-item span {
    font-size: 0.8rem;
  }
  
  /* 輪播圖高度調整 */
  .banner-item {
    height: 200px;
    padding: 30px;
  }
  
  .banner-content h3 {
    font-size: 2rem;
  }
  
  .banner-content p {
    font-size: 1.1rem;
  }
  
  /* 分類頁面調整 */
  .category-sidebar {
    width: 200px;
  }
  
  .product-list-container {
    margin-left: 200px;
  }
  
  .category-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 15px 20px;
  }
  
  .category-item i {
    margin-right: 8px;
    margin-bottom: 0;
  }
  
  /* 商品詳情頁調整 */
  .product-gallery {
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* 會員中心卡片佈局 */
  .order-entry .row {
    justify-content: center;
  }
  
  .order-entry .col {
    flex: 0 0 auto;
    width: auto;
    min-width: 80px;
  }
  
  /* 團隊頁面優化 */
  .team-stats-header .row {
    justify-content: center;
    gap: 2rem;
  }
  
  .team-stats-header .col-4 {
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
  }
  
  .performance-stats .row {
    justify-content: center;
  }
  
  /* 購物車頁面調整 */
  .cart-item {
    padding: 20px;
  }
  
  .cart-item-img img {
    width: 100px;
    height: 100px;
  }
  
  /* 限時秒殺商品調整 */
  .flash-swiper {
    padding: 0 10px;
  }
  
  .flash-item {
    padding: 15px;
  }
  
  .flash-img img {
    width: 120px;
    height: 120px;
  }
}

/* 大平板和小電腦 */
@media (min-width: 992px) {
  .main-content,
  .main-content-no-header,
  .main-content-no-bottom {
    max-width: 992px;
  }
  
  .header-fixed,
  .bottom-nav,
  .product-action-bar,
  .cart-checkout-bar {
    max-width: 992px;
  }
  
  /* 商品網格調整為4列 */
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
  
  /* 首頁熱門商品保持2列但增加間距 */
  .hot-products .row.g-2 {
    --bs-gutter-x: 2rem;
    justify-content: center;
  }
  
  .hot-products .col-6 {
    flex: 0 0 auto;
    width: 280px;
  }
  
  /* 分類sidebar更寬 */
  .category-sidebar {
    width: 220px;
  }
  
  .product-list-container {
    margin-left: 220px;
  }
  
  /* 限時秒殺顯示更多商品 */
  .flash-swiper .swiper {
    overflow: visible;
  }
  
  .flash-swiper .swiper-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .flash-swiper .swiper-slide {
    width: calc(25% - 7.5px);
    flex: none;
  }
  
  /* 團隊成員列表雙列佈局 */
  .team-members .member-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
  }
  
  .member-item {
    background-color: #fff;
    margin: 1px;
    border-radius: 8px;
  }
  
  /* 購物車商品佈局優化 */
  .cart-list .row {
    margin: 0 auto;
    max-width: 800px;
  }
  
  /* 會員中心三列佈局 */
  .team-overview .row,
  .performance-stats .row {
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
  }
}

/* 大電腦屏幕 */
@media (min-width: 1200px) {
  .main-content,
  .main-content-no-header,
  .main-content-no-bottom {
    max-width: 1200px;
  }
  
  .header-fixed,
  .bottom-nav,
  .product-action-bar,
  .cart-checkout-bar {
    max-width: 1200px;
  }
  
  /* 商品網格調整為5列 */
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
  
  /* 首頁佈局調整 */
  .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* 輪播圖和內容區域並排 */
  .banner-section {
    padding: 20px;
  }
  
  .banner-item {
    height: 250px;
    padding: 40px;
  }
  
  /* 快捷菜單保持兩行但居中 */
  .quick-menu .container-fluid {
    max-width: 800px;
  }
  
  /* 限時秒殺6列 */
  .flash-swiper .swiper-slide {
    width: calc(16.666% - 8.33px);
  }
  
  /* 首頁熱門商品3列 */
  .hot-products .row.g-2 {
    justify-content: center;
  }
  
  .hot-products .col-6 {
    flex: 0 0 auto;
    width: 300px;
  }
  
  /* 可以顯示3個熱門商品 */
  .hot-products .row.g-2 {
    display: grid;
    grid-template-columns: repeat(3, 300px);
    gap: 1rem;
    justify-content: center;
  }
  
  /* 分類頁面sidebar */
  .category-sidebar {
    width: 250px;
  }
  
  .product-list-container {
    margin-left: 250px;
  }
  
  /* 商品詳情頁雙列佈局 */
  .product-detail-content {
    max-width: 1000px;
    margin: 0 auto;
  }
  
  /* 會員中心卡片佈局優化 */
  .member-info {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .order-entry {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .order-entry .row {
    justify-content: space-around;
  }
  
  /* 團隊頁面優化佈局 */
  .team-stats-header .row,
  .performance-stats .row {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* 超大屏幕 */
@media (min-width: 1400px) {
  .main-content,
  .main-content-no-header,
  .main-content-no-bottom {
    max-width: 1400px;
  }
  
  .header-fixed,
  .bottom-nav,
  .product-action-bar,
  .cart-checkout-bar {
    max-width: 1400px;
  }
  
  /* 商品網格最多6列 */
  .product-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
  
  /* 首頁熱門商品4列 */
  .hot-products .row.g-2 {
    grid-template-columns: repeat(4, 280px);
  }
  
  /* 限時秒殺8列 */
  .flash-swiper .swiper-slide {
    width: calc(12.5% - 8.75px);
  }
}

/* ========== 動畫效果 ========== */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* 觸摸反饋 */
.product-card:active,
.menu-item:active,
.category-item:active {
  opacity: 0.8;
  transform: scale(0.98);
}

/* ========== 安全區域 ========== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  }
  
  .main-content {
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  }
}

/* ========== 滾動條美化 ========== */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ========== 圖片佔位 ========== */
.placeholder-img {
  background: linear-gradient(135deg, #F0F0F0 0%, #E8E8E8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}


    /* 自定義樣式 */
    .category-tabs-wrapper {
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    
    .category-tabs-wrapper::-webkit-scrollbar {
      display: none;
    }
    
    .category-tag {
      display: inline-flex;
      align-items: center;
      padding: 8px 16px;
      margin-right: 10px;
      background: #f8f9fa;
      border: 1px solid #e9ecef;
      border-radius: 20px;
      text-decoration: none;
      color: #6c757d;
      font-size: 14px;
      white-space: nowrap;
      transition: all 0.2s ease;
      cursor: pointer;
    }
    
    .category-tag.active {
      background: #FF4D4F;
      border-color: #FF4D4F;
      color: white;
      font-weight: bold;
    }
    
    .category-tag:hover:not(.active) {
      color: #FF4D4F;
      border-color: #FF4D4F;
      background: #fff5f5;
    }
    
    .sort-button {
      display: flex;
      align-items: center;
      background: none;
      border: none;
      color: #6c757d;
      font-size: 14px;
      transition: color 0.2s ease;
      cursor: pointer;
    }
    
    .sort-button.active {
      color: #FF4D4F;
      font-weight: bold;
    }
    
    .sort-button:hover {
      color: #FF4D4F;
    }
    
    .product-card {
      transition: all 0.3s ease;
      border: 1px solid #f0f0f0;
    }
    
    .product-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
      border-color: #FF4D4F;
    }
    
    .product-img {
      aspect-ratio: 1;
      object-fit: cover;
      transition: transform 0.3s ease;
    }
    
    .product-card:hover .product-img {
      transform: scale(1.05);
    }
    
    .product-title {
      font-size: 14px;
      line-height: 1.4;
      height: 2.8em;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    
    .favorite-btn {
      opacity: 0;
      transform: scale(0.8);
      transition: all 0.3s ease;
    }
    
    .product-card:hover .favorite-btn {
      opacity: 1;
      transform: scale(1);
    }
    
    .filter-btn.active {
      background: #FF4D4F !important;
      border-color: #FF4D4F !important;
      color: white !important;
    }
    
    .current-price {
      font-size: 18px;
    }
    
    @media (max-width: 576px) {
      .current-price {
        font-size: 16px;
      }
      
      .product-info {
        padding: 0.75rem;
      }
      
      .category-tag {
        font-size: 12px;
        padding: 6px 12px;
      }
    }
/*language*/

    .flag-icon {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: #f8f9fa;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
    }

    .language-item {
      border-bottom: 1px solid #eee;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .language-item:last-child {
      border-bottom: none;
    }

    .language-item:hover {
      background: #f8f9fa;
    }

    .language-item.active {
      background: #e3f2fd;
      border-left: 4px solid #2196f3;
    }

    .language-content {
      display: flex;
      align-items: center;
      padding: 1rem;
    }

    .flag-container {
      font-size: 2rem;
      margin-right: 1rem;
      width: 50px;
      text-align: center;
    }

    .language-info {
      flex-grow: 1;
    }

    .language-info h6 {
      margin-bottom: 0.25rem;
      font-weight: 600;
    }

    .language-status {
      font-size: 1.2rem;
    }

    .notice-item {
      display: flex;
      align-items: flex-start;
      margin-bottom: 0.75rem;
      padding: 0.5rem 0;
    }

    .notice-item:last-child {
      margin-bottom: 0;
    }

    .notice-item i {
      margin-top: 0.1rem;
      flex-shrink: 0;
    }

    .auto-detect-option,
    .region-detect-option {
      padding: 1rem;
      background: #f8f9fa;
      border-radius: 0.5rem;
      border: 1px solid #dee2e6;
    }

    .form-check-input:checked {
      background-color: #0d6efd;
      border-color: #0d6efd;
    }

    .form-switch .form-check-input {
      width: 3rem;
      height: 1.5rem;
    }

    .current-lang-card {
      border-left: 4px solid #28a745;
    }

