/* public/assets/css/style.css - 全端自适应暖米色定制 UI (大字号/大屏优化版) */

:root {
  --bg-main: #fbf9f4;         /* 暖米白主背景 */
  --bg-banner: #f8f1d7;       /* 浅奶油黄横幅背景 */
  --bg-card: #ffffff;         /* 卡片纯白背景 */
  --bg-tag: #f2ebd9;          /* 米黄属性框背景 */
  --text-main: #2b251d;       /* 深棕主文字 */
  --text-muted: #7d7365;      /* 灰棕次要文字 */
  --primary-gold: #d4a338;    /* 品牌金黄色 */
  --border-color: #eedfb8;    /* 细金浅色边框 */
  --radius-lg: 18px;          /* 大圆角 */
  --radius-md: 12px;          /* 中圆角 */
  --radius-sm: 8px;           /* 小圆角 */
  --shadow-sm: 0 4px 12px rgba(180, 150, 90, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px; /* 全局基础字号由 14px 调至 15px */
  padding-bottom: 50px;
}

/* 基础容器（移动端优先） */
.container {
  width: 100%;
  max-width: 500px; 
  margin: 0 auto;
  padding: 0 16px;
}

/* Brand Header 响应式 */
.brand-header {
  padding: 20px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}
.brand-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Banner 响应式 */
.hero-banner {
  background-color: var(--bg-banner);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.hero-title {
  font-size: 24px;
  font-weight: 800;
  color: #a37210;
  margin-bottom: 8px;
}
.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* 搜索框 */
.search-box {
  position: relative;
}
.search-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.search-input:focus {
  border-color: var(--primary-gold);
}

/* 目录卡片流（默认移动端单列） */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 14px;
}
.section-title {
  font-size: 20px;
  font-weight: 800;
}
.section-count {
  font-size: 13px;
  color: var(--text-muted);
}

.product-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:active {
  transform: scale(0.98);
}

.card-img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #eee;
  margin-right: 16px;
  flex-shrink: 0;
}
.card-info {
  flex: 1;
  min-width: 0; /* 防止溢出 */
}
.card-code {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-name {
  font-size: 14px;
  color: var(--text-muted);
  margin: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  font-size: 12px;
  color: #a37210;
  font-weight: 600;
}
.card-arrow {
  color: var(--primary-gold);
  font-size: 20px;
  font-weight: bold;
  padding-left: 10px;
}

/* 详情页样式 */
.detail-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-bottom: 20px;
}
.badge-gold {
  background: #fdf2d0;
  color: #936200;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: bold;
}
.param-box {
  background: var(--bg-tag);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 14px;
  color: #5c503e;
  line-height: 1.6;
}

/* 色号网格（移动端默认 4 列） */
.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.color-item {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
}

/* 通用按钮与提示 */
.disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 24px 0;
}
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--primary-gold);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  opacity: 0.9;
}

/* ========================================================
   PC 平板宽屏适配 (宽度 >= 768px 专门放大字号与视域)
   ======================================================== */
@media (min-width: 768px) {
  body {
    font-size: 16px; /* PC 端整体字号放大 */
  }

  .container {
    max-width: 1200px; /* 大屏视域更宽敞，从 1140px 调至 1200px */
    padding: 0 30px;
  }

  /* 头部与 Banner 放大 */
  .brand-title {
    font-size: 28px;
  }
  .brand-sub {
    font-size: 14px;
  }
  .hero-banner {
    padding: 36px 32px;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-desc {
    font-size: 16px;
  }
  .search-input {
    font-size: 16px;
    padding: 16px 22px;
  }

  /* 目录卡片与图片放大 */
  .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .card-img {
    width: 100px;
    height: 100px;
  }
  .card-code {
    font-size: 22px;
  }
  .card-name {
    font-size: 15px;
  }
  .card-meta {
    font-size: 13px;
  }
  
  .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(180, 150, 90, 0.15);
  }

  /* 色号网格与卡片间距放大 */
  .color-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
  }
  .color-item {
    font-size: 14px;
    padding: 12px 8px;
  }

  .detail-card {
    padding: 30px;
  }
}

@media (min-width: 1200px) {
  /* 针对 1080P 以上桌面显示器，目录列数与色号列数进一步扩展 */
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .color-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}