:root {
    --orange-primary: #f97316; /* 主橙色 */
    --orange-dark: #ea580c;    /* 深橙色 */
    --red-primary: #ef4444;    /* 主红色 */
    --red-dark: #dc2626;       /* 深红色 */
    --orange-light: #ffedd5;   /* 浅橙色背景 */
}

/* 可以根据需要覆盖默认样式 */
.btn-orange {
    background-color: var(--orange-primary);
    color: white;
}

.btn-orange:hover {
    background-color: var(--orange-dark);
    color: white;
}

.text-orange-600 {
    color: var(--orange-primary) !important;
}

.text-red-500 {
    color: var(--red-primary) !important;
}
.border-orange-500 {
    border-color: #f97316 !important; /* 标准橙色 */
}

.hover\:border-orange-400:hover {
    border-color: #fb923c !important; /* 浅橙色 */
}

/* 轮播图样式 - 居顶显示 */
.carousel-container {
  width: 100%;
  margin: 0;
  padding: 0;
    /* 关键：容器设为相对定位，作为子元素的定位基准 */
    position: relative;
    /* 确保容器高度与轮播图一致（避免背景被截断） */
    /*min-height: 450px;*/
}
.carousel-bg {
    /* 绝对定位：覆盖整个容器 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 背景图（原.carousel-container的背景） */
    background: url('/shop/images/beijingtu3.jpg') center/cover no-repeat;
    /* 背景模糊效果（数值越大越模糊） */
    /*filter: blur(2px);*/
    /* 降低透明度（可选，增强轮播图可读性） */
    /*opacity: 0.98;*/
    /* 层级：低于轮播内容 */
    z-index: 1;
}
.carousel-banner {
    position: relative;
    z-index: 3;
}
.carousel-item {
  height: 450px; /* 调整轮播图高度（原500px，避免过高） */
}
.carousel-item img {
  height: 100%;
  object-fit: cover;
}

/* 中小屏响应式调整 */
@media (max-width: 991px) { /* 中屏 */
    .carousel-item {
        height: 350px; /* 降低高度 */
    }
}

@media (max-width: 575px) { /* 小屏手机 */
    .carousel-item {
        height: 250px; /* 进一步降低高度 */
    }
    .carousel-item img {
        object-position: center; /* 确保图片中心内容可见 */
    }
}

/* 导航栏样式 - 轮播图下方 */
.navbar {
  margin-top: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 增加阴影区分层级 */
    background-color: #1858c5;
}
#navbarNav {
    color: #FFFDD0;
    font-weight: 600;
    flex-basis: auto; /* 取消默认收缩 */
}
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}
.nav-link {
  margin: 0 8px;
  color: #FFFDD0 !important;
}
.nav-link:hover {
  color: #a9a711 !important;
}

/* 导航容器修正 */
.navbar-nav-container {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 横向滚动导航 */
.nav-scroll {
    display: flex;
    /*flex: 1; !* 占据可用空间 *!*/
    overflow-x: auto; /* 横向滚动 */
    overflow-y: hidden;
    padding: 8px 0;
    scrollbar-width: none; /* 隐藏Firefox滚动条 */
}

/* 隐藏滚动条 */
.nav-scroll::-webkit-scrollbar {
    display: none;
}

/* 导航项样式 */
.nav-item {
    margin: 0 5px;
    white-space: nowrap; /* 防止文字换行 */
}

/* 登录区域容器 */
.auth-container {
    flex-shrink: 0; /* 不被压缩 */
    margin-left: 15px;
}

/* 大屏适配（关键修复） */
@media (min-width: 992px) {
    .nav-scroll {
        overflow-x: visible; /* 大屏不滚动 */
        justify-content: center; /* 导航居中 */
    }

    .auth-container {
        margin-left: auto; /* 登录区域靠右 */
    }
}

/* 中小屏适配 */
@media (max-width: 991px) {
    .navbar {
        padding: 5px 0;
    }

    .nav-item {
        margin: 0 0;
    }

    .nav-link {
        padding: 6px 12px;
        margin: 1px 1px;
    }
}
.navbar-expand-lg .navbar-nav {
    flex-direction: row; /* 强制横向排列 */
}



/* 主体内容容器 */
.main-container {
  padding: 30px 0;
}

/* 左侧分类列表样式 */
.category-list {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.category-title {
  background-color: #f8f9fa;
  padding: 15px 20px;
  font-weight: bold;
  border-bottom: 1px solid #eee;
}
.category-item {
    font-size: 14px;
  padding: 12px 5px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f1f1f1;
}
.category-item:last-child {
  border-bottom: none;
}
.category-item:hover {
  background-color: #f0f7ff;
  color: #007bff;
}
.category-item.active {
  background-color: #e6f0ff;
  color: #007bff;
  font-weight: bold;
}
.category-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-right: 2px;
  vertical-align: middle;
}

/* 右侧商品列表样式 */
.product-list {
  padding-left: 20px;
}
.product-filters {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}
.product-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.product-img {
  height: 200px;
  object-fit: contain;
  padding: 15px;
}
.product-title {
  font-size: 1rem;
  height: 40px;
  overflow: hidden;
  margin-bottom: 10px;
}
.product-price {
  color: #dc3545;
  font-weight: bold;
  font-size: 1.1rem;
}

/* 分页样式 */
.pagination-container {
  margin-top: 30px;
  text-align: center;
}
.page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
}
.page-link {
  color: #333;
}
.page-link:hover {
  color: #007bff;
}

/* 服务支持和页脚样式保持不变 */
.service-module {
  background-color: #f8f9fa;
  padding: 40px 0;
  margin-top: 40px;
}
.service-item {
  text-align: center;
}
.service-icon {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #007bff;
}
footer {
  background-color: #333;
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 30px;
}
.footer-link {
  color: #ccc;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}
.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* 卡片内容器样式（用于3D效果） */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* 图片悬停缩放 */
.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* 阴影过渡 */
.transition-shadow {
    transition: box-shadow 0.3s ease;
}

/* 图片加载失败时隐藏 */
img.error-hidden {
    display: none !important;
}

/* 自定义容器：最大宽度900px，小于900px时自适应100% */
.container-900 {
    width: 100%; /* 基础宽度100% */
    padding-right: var(--bs-gutter-x, 0.75rem); /* 保持与Bootstrap容器一致的内边距 */
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}

/* 当屏幕宽度≥900px时，限制最大宽度为900px */
@media (min-width: 900px) {
    .container-900 {
        max-width: 900px;
    }
}

/* 适配移动端的超小按钮 */
@media (max-width: 575px) {
    .btn-sm {
        padding: 0.1rem 0.25rem;
        font-size: 0.7rem;
    }

    /* 缩小导航文字大小 */
    .nav-link {
        font-size: 13px !important; /* 进一步减小字体 */
        padding: 4px 8px !important; /* 缩小内边距 */
        margin: 0 2px !important; /* 缩小导航项之间的间距 */
    }

    /* 调整登录按钮样式 */
    #loginBtn {
        font-size: 12px;
        padding: 4px 12px;
    }
}
