/* ================= Header Styling ================= */
header.navbar {
  height: 70px;
}

/* ================= Sidebar Logic ================= */
#wrapper {
  overflow-x: hidden;
  /* 计算高度：视口高度 - Header(70px) - SubNav(大约40px) */
  min-height: calc(100vh - 110px);
}

#sidebar-wrapper {
  min-width: 250px;
  max-width: 250px;
  transition: margin-left 0.25s ease-out;
  margin-left: 0;
}

#wrapper.toggled #sidebar-wrapper {
  margin-left: -250px;
}

/* ================= Hover Cart ================= */
.cart-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  z-index: 1000;
  margin-top: 10px;
}

/* Bridge the hover gap between the cart button and the dropdown (caused by margin-top) */
.cart-dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.cart-wrapper:hover .cart-dropdown {
  display: block;
}

/* ================= UI Enhancement & Utilities (No Inline CSS) ================= */
.product-card-hover {
  transition: transform 0.2s;
}
.product-card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* 首页商品图片容器 */
.product-img-container {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(108, 117, 125, 0.1); /* bg-secondary bg-opacity-10 */
}

/* 首页商品图片填充 */
.product-img-fit {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 详情页大图容器 */
.detail-img-box {
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 详情页大图限制 */
.detail-img-fit {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 400px;
}

/* 详情页数量输入框宽度 */
.qty-width {
  width: 130px;
}

/* 详情页推荐小图容器 */
.recommend-img-box {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(108, 117, 125, 0.1);
}

/* ================= Footer ================= */
.site-footer {
  background-color: #343a40; /* bg-dark */
  color: #fff;
  padding: 20px 0;
  margin-top: auto; /* 配合 flex 布局沉底 */
}
