/* 布局容器 */
.products-page {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-gap: 24px;
  animation: fadeIn 0.6s ease-in-out;
}

/* 页面渐入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 可用区域占位符样式 */
.regions-sidebar-placeholder {
  margin: 0;
  padding: 0;
  height: auto;
}
.mt-4, .my-4{
  margin-top: 0 !important;
}

/* 左侧区域列表 */
.regions-sidebar {
  background: #fff;
  border: 1px solid #e9ecef;
  /* border-radius: var(--radius-lg); */
  box-shadow: var(--box-shadow,0 2px 10px rgba(0,0,0,.06));
  width: 280px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  /* 隐藏滚动条但保持滚动功能 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 和 Edge */
}

/* Chrome, Safari 隐藏滚动条 */
.regions-sidebar::-webkit-scrollbar {
  display: none;
} 


/* PC端侧边栏 */
@media (min-width: 993px) {
  .regions-sidebar {
    margin-top: 10px !important;
    margin-bottom: 80px !important; /* 底部留出80px外边距 */
    align-self: flex-start; /* 在grid布局中顶部对齐 */
    overflow-y: auto; /* 允许滚动 */
    overflow-x: hidden;
  }
  
  /* 侧边栏内容区域 - 不限制高度，根据内容自适应 */
  .regions-sidebar .card-body {
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 和 Edge */
  }
  
  /* Chrome, Safari 隐藏滚动条 */
  .regions-sidebar .card-body::-webkit-scrollbar {
    display: none;
  }
}
.regions-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #e9ecef !important;
  color: #000 !important;
}
.regions-list { list-style: none; padding: 0; margin: 0; }
.regions-item { 
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #edf2f7 !important;
  position: relative;
  transition: border-color .15s ease;
}
.regions-item:hover {
  border-bottom-color: #e5ecf4 !important;
}
.regions-item.active {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.regions-link {
  display: block;
  padding: 10px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #333;
  font-size: 15px !important;
  font-weight: 500;
  transition: color .15s ease, transform .15s ease;
  text-decoration: none;
}
.regions-link:hover {
  color: #0D65D8 !important; /* 文字变蓝 */
  transform: translateX(5px); /* 往右移动5px,产生悬浮感 */
}
.region-headline {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #999;
}
.regions-list .regions-link:hover,
.regions-item.active .regions-link {
  color: var(--primary, #0D65D8) !important;
  text-decoration: none !important;
}

/* 公告卡片样式 */
.announcement-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px !important;
  margin-top: 12px !important;
  margin-bottom: 12px !important;
  border-radius: 0px !important;
  background-color: #E0EAFA !important;
  border: none !important;
  box-shadow: none !important;
}
.announcement-card.single-line .announcement-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.announcement-card .announcement-text {
  padding: 12px 16px;
  display: block;
  font-size: 14px !important;
  color: #666;
}
.announcement-icon { color: var(--primary,#0D65D8); font-size: 20px; }
.announcement-title { font-weight: 600; color: var(--primary,#0D65D8); }


/* 商品描述中的图标样式 */
.card-text {
  font-size: 14px;
  line-height: 1.8;
}

.card-text ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.card-text li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.card-text li i {
  flex-shrink: 0;
  margin-top: 2px;
}

/* 确保 Font Awesome 图标正确显示 */
.card-text .fa-solid,
.card-text .fa-regular,
.card-text .fa-brands {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.card-text .fa-regular {
  font-weight: 400 !important;
}

.card-text strong {
  font-weight: 600;
  color: #333;
}

/* 响应式 */
@media (max-width: 992px) {
  .products-page { grid-template-columns: 1fr; }
}

/* 手机端和平板端样式优化 */
@media (max-width: 992px) {
  /* 选择区域按钮 */
  .mobile-region-toggle {
    display: inline-block;
    width: 80px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #0D65D8 0%, #219FFA 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(13, 101, 216, 0.2);
    white-space: nowrap;
  }
  
  /* 标题和按钮容器 */
  .selected-region-header-wrapper {
    margin-bottom: 10px !important;
  }
  
  /* 侧边栏默认隐藏 */
  .regions-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 !important; /* 左边不要圆角 */
  }
  
  /* 侧边栏内容区域可滚动 */
  .regions-sidebar .card-body {
    max-height: calc(100vh - 60px); /* 留出标题和间距 */
    overflow-y: auto; /* 允许滚动 */
    overflow-x: hidden;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 和 Edge */
  }
  
  /* Chrome, Safari 隐藏滚动条 */
  .regions-sidebar .card-body::-webkit-scrollbar {
    display: none;
  }
  
  /* 显示侧边栏 */
  .regions-sidebar.mobile-show {
    left: 0;
  }
  
  /* 遮罩层 */
  body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  }
  
  /* 产品类型卡片宽度100% */
  .yy-bth {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
  
  .yy-bth.pl-1.pr-1.pb-1.p-2.text-primary {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
  
  /* 商品标题左外边距和上外边距 */
  h4.ml-3 {
    margin-left: 3px !important;
    margin-top: 8px !important;
  }
  
  /* 价格信息左内边距统一 */
  .price-info-row,
  .product-price,
  .product-original-price {
    padding-left: 3px !important;
  }
  
  /* 分割线行不要下外边距 */
  .col-12.px-0 {
    margin-bottom: 0 !important;
  }
  
  /* 立即购买按钮宽度 */
  .product-buy-btn {
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* 按钮容器宽度 */
  .mt-4.card-footer.text-center.p-0.product-footer {
    width: 100% !important;
    margin: 10px auto 0 !important; /* 上margin 10px */
  }
  
  /* 商品卡片内容区域优化 */
  .card-body.row.align-content-start {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-bottom: 0 !important; /* 移除下padding */
    overflow-y: hidden; /* 不显示滚动条 */
  }
  
  /* 价格区域不要左边距 */
  .col-12.px-3.mb-0 {
    padding-left: 0 !important;
  }
}

/* 右侧当前区域标题样式 */
.selected-region-header {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}


/* 一级产品类型项：确保左右边框可见 */
.firstgroup_box .firstgroup_item {
  border: 1px solid #e9ecef !important;
}
/* yy-bl 文本统一黑色与 20px */
.yy-bl {
  color: #000 !important;
  font-size: 20px !important;
}

/* 防御性覆盖：确保所有层级的 a 标签继承黑色并统一样式 */
.products-page .firstgroup_box a,
.products-page .secondgroup_box a,
.products-page .pro_box a,
.products-page .firstgroup_box .firstgroup_item a,
.products-page .secondgroup_box .secondgroup_item a,
.products-page .pro_box .pro_item a {
  color: #000 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

/* 产品价格颜色统一为黑色 */
.text-right.mr-3.ml-3.pr-1.product-price,
.text-right.mr-3.ml-3.pr-1.product-price a,
.text-right.mr-3.ml-3.pr-1.product-price .cart-num {
  color: #000 !important;
}

/* 试用价格颜色为黑色 */
.text-right.mr-3.ml-3.pr-1.product-trial-price,
.text-right.mr-3.ml-3.pr-1.product-trial-price small {
  color: #000 !important;
}

/* 原价颜色为黑色 */
.text-right.color-999.mr-3.ml-3.pr-1,
.text-right.color-999.mr-3.ml-3.pr-1 small {
  color: #000 !important;
}