/* ===== 威士忌网站 - 静态仿制版样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

ul, li { list-style: none; }
a { text-decoration: none; color: inherit; }
img { border: 0; vertical-align: middle; }

.container {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== 顶部 header ===== */
.site-header {
  background: #f2f2f2;
  padding: 18px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo img { height: 44px; width: auto; display: block; }

/* 搜索框 */
.search-box {
  display: flex;
  width: 280px;
}

.search-box form {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.search-input-wrap {
  position: relative;
  display: block;
  flex: 1;
  min-width: 0;
}

.search-input {
  width: 100%;
  height: 32px;
  border: 1px solid #ccc;
  border-right: 0;
  padding: 0 30px 0 30px;
  font-size: 12px;
  color: #555;
  outline: none;
  background: #fff;
}

.search-input::placeholder { color: #aaa; }

.search-ico {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid #999;
  border-radius: 50%;
  pointer-events: none;
}
.search-ico::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  background: #999;
  bottom: -3px;
  right: -4px;
  transform: rotate(45deg);
}

.search-btn {
  height: 32px;
  padding: 0 18px;
  flex-shrink: 0;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.search-btn:hover { background: #333; }

/* ===== 导航 ===== */
.site-nav {
  background: #000;
}

.nav-inner { position: relative; }

.nav-menu {
  display: flex;
  padding-left: 60px;
}

.nav-menu li a {
  display: block;
  padding: 0 32px;
  line-height: 47px;
  color: #fff;
  font-size: 15px;
  transition: color .3s;
}

.nav-menu li:hover a,
.nav-menu li.active a { color: #c9152c; }

/* 移动端汉堡按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px 6px;
  position: relative;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #333;
  margin: 6px 0;
  transition: all .3s;
}
/* 遮罩打开时汉堡变白色 X */
body.nav-open .nav-toggle span { background: #fff; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Banner ===== */
.banner {
  width: 100%;
  height: 622px;
  display: block;
}

/* ===== 产品中心 ===== */
.products-section {
  padding: 60px 0 80px;
  background: #fff;
}

.section-title { text-align: center; margin-bottom: 45px; }
.section-title h2 {
  font-size: 30px;
  color: #555;
  font-weight: normal;
  letter-spacing: 2px;
}
.section-title p {
  margin-top: 10px;
  font-size: 15px;
  color: #ccc;
  letter-spacing: 3px;
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* minmax(0,1fr) 强制四列等宽，防止长名称撑开列 */
  gap: 26px;
}

.prod-item {
  border: 1px solid #eee;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s, transform .3s;
}

.prod-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  transform: translateY(-3px);
}

/* 固定正方形图片框：宽高比恒为 1:1，与原始图片尺寸无关 */
.prod-img {
  display: block;
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;
  overflow: hidden;
  background: #fff;
}

/* 图片铺满整个方形区域（居中裁切），所有卡片视觉大小完全一致 */
.prod-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform .4s;
}

.prod-item:hover .prod-img img { transform: scale(1.05); }

/* 名称区固定在图片正下方，所有卡片文字位置一致 */
.prod-name {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 14px 10px 16px;
  min-height: 46px;
}

.prod-name a {
  font-size: 13px;
  color: #444;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prod-name a:hover { color: #c9152c; }

/* ===== 页脚 ===== */
.site-footer {
  background: #000;
  padding: 45px 0 50px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.footer-col h3 {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 16px;
}

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: #fff;
  font-size: 12px;
  opacity: .9;
  transition: opacity .2s, color .2s;
}
.footer-col a:hover { color: #c9152c; opacity: 1; }

/* ===== 平板 (641px - 1200px) ===== */
@media screen and (max-width: 1200px) {
  .banner { height: 413px; }
  .prod-grid { gap: 18px; }
  .section-title h2 { font-size: 26px; }
}

/* ===== 移动端 (<= 640px) ===== */
@media screen and (max-width: 640px) {
  /* 顶栏：logo 左、汉堡右、垂直居中，隐藏搜索 */
  .site-header {
    padding: 10px 0;
    position: relative;
    z-index: 1001;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .logo img { height: 38px; }

  .search-box { display: none; }

  /* 黑色导航条视觉上隐藏（保留节点，遮罩菜单在其内部） */
  .site-nav { background: none; }
  .nav-inner { height: 0; overflow: visible; }

  .nav-toggle { display: block; }

  /* 全屏遮罩导航 */
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 17, .92);
    flex-direction: column;
    padding: 105px 0 40px;
    padding-left: 0;
    z-index: 1000;
    overflow-y: auto;
  }
  .nav-menu.open { display: flex; }

  .nav-menu li { border-bottom: 1px solid rgba(255,255,255,.25); }

  .nav-menu li a {
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 30px 48px;
    text-align: left;
  }
  .nav-menu li a:hover,
  .nav-menu li.active a { color: #fff; }

  /* 遮罩打开时锁定页面滚动 */
  body.nav-open { overflow: hidden; }

  .banner { height: 196px; }

  .products-section { padding: 35px 0 45px; }
  .section-title { margin-bottom: 25px; }
  .section-title h2 { font-size: 22px; }
  .section-title p { font-size: 12px; }

  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .prod-name a { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }

  .site-footer { padding: 30px 0 35px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .footer-col h3 { margin-bottom: 10px; }
  .footer-col li { margin-bottom: 8px; }
}

/* ===== 超小屏 (<= 380px) ===== */
@media screen and (max-width: 380px) {
  .prod-grid { gap: 8px; }
}

/* ===== 内页 Banner（列表页） ===== */
.inner-banner {
  width: 100%;
  height: 290px;
  background: url("../images/list_banner.jpg") no-repeat center center;
  background-size: cover;
}

/* ===== 面包屑 ===== */
.crumb-bar { border-bottom: 1px solid #eee; }

.breadcrumb {
  padding: 15px 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb li {
  font-size: 12px;
  color: #999;
}

.breadcrumb li + li::before {
  content: ">";
  margin: 0 8px;
  color: #ccc;
}

.breadcrumb a { color: #666; transition: color .2s; }
.breadcrumb a:hover { color: #c9152c; }

/* ===== 列表页布局 ===== */
.list-section { padding: 40px 0 80px; }

.list-layout {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

/* 左侧分类栏 */
.list-side { width: 200px; flex-shrink: 0; }

.side-title {
  font-size: 18px;
  font-weight: normal;
  color: #333;
  padding: 14px 16px;
  border: 1px solid #eee;
  border-bottom: 2px solid #333;
}

.side-cats li { border: 1px solid #eee; border-top: 0; }

.side-cats a {
  display: block;
  padding: 12px 16px;
  font-size: 13px;
  color: #555;
  transition: all .2s;
}

.side-cats a:hover,
.side-cats a.active {
  color: #c9152c;
  background: #fafafa;
  padding-left: 22px;
}

/* 右侧产品区 */
.list-main { flex: 1; min-width: 0; }

.list-title {
  font-size: 22px;
  font-weight: normal;
  color: #333;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 28px;
}

/* ===== 平板 (641px - 1200px) ===== */
@media screen and (max-width: 1200px) {
  .inner-banner { height: 220px; }
  .list-grid { grid-template-columns: repeat(3, 1fr); }
  .list-side { width: 170px; }
}

/* ===== 移动端 (<= 640px) ===== */
@media screen and (max-width: 640px) {
  .inner-banner { height: 130px; }

  .list-section { padding: 25px 0 45px; }

  /* 侧栏变为横向分类条 */
  .list-layout { flex-direction: column; gap: 18px; }

  .list-side { width: 100%; }

  .side-title { padding: 10px 14px; font-size: 16px; }

  .side-cats { display: flex; }
  .side-cats li { border: 1px solid #eee; border-left: 0; flex: 1; }
  .side-cats li:first-child { border-left: 1px solid #eee; }

  .side-cats a { text-align: center; padding: 10px 6px; }
  .side-cats a:hover,
  .side-cats a.active { padding-left: 6px; }

  .list-title { font-size: 18px; margin-bottom: 18px; }

  .list-grid { grid-template-columns: repeat(2, 1fr); }

  .prod-name { min-height: 42px; padding: 10px 8px 12px; }
}

/* ===== 商品详情页 ===== */
.detail-section { padding: 40px 0 50px; }

.detail-main {
  display: flex;
  align-items: flex-start;
  gap: 50px;
}

/* 左侧大图：固定正方形，完整显示不裁剪 */
.detail-gallery { width: 44%; flex-shrink: 0; }

.detail-pic {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;
  overflow: hidden;
  background: #fff;
}

.detail-pic img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 右侧信息 */
.detail-info { flex: 1; min-width: 0; padding-top: 6px; }

.detail-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  line-height: 1.4;
}

.detail-desc {
  margin-top: 10px;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-bar {
  margin-top: 18px;
  padding: 16px 20px;
  background: linear-gradient(90deg, #f4f4f4, #fbfbfb);
  display: flex;
  align-items: center;
}

.price-label { font-size: 13px; color: #888; }

.price-value {
  margin-left: 26px;
  font-size: 30px;
  font-weight: bold;
  color: #d0021b;
}

.stock-row {
  padding: 14px 20px;
  border-bottom: 1px dashed #e5e5e5;
  text-align: right;
}

.stock-label { font-size: 12px; color: #999; }

.stock-num { font-size: 14px; color: #d0021b; margin-left: 6px; }

.qty-row {
  padding: 18px 0 0 20px;
  display: flex;
  align-items: center;
}

.qty-label { font-size: 13px; color: #666; margin-right: 24px; }

.qty-stepper { display: flex; }

.qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  font-size: 16px;
  color: #666;
  cursor: pointer;
}
.qty-btn:hover { background: #eee; }

.qty-input {
  width: 52px;
  height: 34px;
  border: 1px solid #ddd;
  border-left: 0;
  border-right: 0;
  text-align: center;
  font-size: 14px;
  color: #333;
  outline: none;
}

.buy-row {
  margin-top: 30px;
  display: flex;
  gap: 30px;
}

.buy-btn {
  flex: 1;
  height: 46px;
  border: 1px solid #ccc;
  background: #d8d8d8;
  color: #555;
  font-size: 16px;
  cursor: not-allowed;
}

/* ===== 详情选项卡 ===== */
.detail-tabs { padding: 10px 0 30px; }

.tab-box { border: 1px solid #e5e5e5; }

.tab-head {
  background: #f7f7f7;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 30px;
}

.tab-item {
  display: inline-block;
  padding: 13px 28px;
  font-size: 14px;
  color: #666;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-top: 0;
  position: relative;
  top: 1px;
}
.tab-item.active { color: #333; font-weight: bold; }

.tab-body { padding: 40px 46px 46px; }

.tab-body h2 {
  font-size: 24px;
  color: #222;
  margin: 26px 0 20px;
}
.tab-body h2:first-child { margin-top: 0; }

.tab-body p {
  font-size: 14px;
  color: #444;
  line-height: 1.9;
  margin-bottom: 14px;
}
.tab-body img {max-width: 100%;}

/* ===== 相关产品 ===== */
.related-section { padding: 20px 0 70px; }

.related-title {
  font-size: 16px;
  color: #333;
  font-weight: normal;
  margin-bottom: 22px;
}

/* ===== 详情页响应式 ===== */
@media screen and (max-width: 1200px) {
  .detail-main { gap: 30px; }
}

@media screen and (max-width: 640px) {
  .detail-section { padding: 20px 0 30px; }

  .detail-main { flex-direction: column; gap: 20px; }

  .detail-gallery { width: 100%; }

  .detail-title { font-size: 17px; }

  .price-bar { margin-top: 14px; padding: 12px 14px; }
  .price-value { font-size: 24px; margin-left: 16px; }

  .buy-row { gap: 14px; }
  .buy-btn { height: 42px; font-size: 14px; }

  .tab-head { padding: 0 14px; }
  .tab-item { padding: 11px 18px; }

  .tab-body { padding: 22px 16px 26px; }
  .tab-body h2 { font-size: 19px; }
  .tab-body p { font-size: 13px; }

  .related-section { padding: 10px 0 45px; }
}
