/* style.css - 浅色商务风格 */
:root {
  --bg: #f4f7f9;       /* 浅灰蓝背景，清爽商务 */
  --card: #ffffff;     /* 白色卡片 */
  --text: #333333;     /* 深灰文字，易读 */
  --muted: #666666;    /* 辅助文字颜色 */
  --border: #e1e4e8;   /* 浅灰边框 */
  --btn: #2a3a53;      /* 按钮主色 (深蓝) */
  --btn-hover: #3b4d6e;
  --accent: #00b894;   /* 强调色 (青绿) - 用于价格 */
  --danger: #d63031;   /* 警告色 (红) */
  --shadow: 0 4px 12px rgba(0,0,0,0.05); /* 柔和投影 */
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 14px/1.5 system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- 顶部导航栏 (Header) --- */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.bar {
  max-width: 1400px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center; height: 40px;
}

.brand {
  font-size: 20px; font-weight: 700; color: var(--btn);
  text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.brand span { color: var(--accent); } 

.nav-right { display: flex; align-items: center; gap: 15px; }

/* 搜索框 */
.search-box, .search-form { display: flex; gap: 0; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; }
.search-input { 
  background: #f9f9f9; border: none; color: #333; padding: 6px 12px; outline: none; width: 200px; 
  transition: background 0.2s; 
}
.search-input:focus { background: #fff; }
.search-btn { background: var(--btn); color: #fff; border: none; padding: 0 15px; cursor: pointer; }
.search-btn:hover { background: var(--btn-hover); }

/* 按钮通用 */
.btn { 
  background: var(--btn); color: #fff; border: none; padding: 6px 16px; 
  border-radius: 4px; cursor: pointer; font-size: 13px; text-decoration: none; 
  display: inline-flex; align-items: center; transition: background 0.2s;
}
.btn:hover { background: var(--btn-hover); }

.btn-outline { background: transparent; border: 1px solid var(--btn); color: var(--btn); }
.btn-outline:hover { background: var(--btn); color: #fff; }

.btn-link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.btn-link:hover { color: var(--btn); }

/* 语言切换 */
.lang-switch a, .lang-link { color: #999; text-decoration: none; font-size: 13px; margin: 0 5px; }
.lang-switch a:hover, .lang-switch a.active, .lang-link.active { color: var(--btn); font-weight: bold; text-decoration: underline; }

/* --- 首页 (Index) 专用 --- */
.main-container {
  flex: 1; max-width: 1400px; margin: 40px auto; width: 100%; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
.section-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 50px; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; transition: transform 0.3s, box-shadow 0.3s;
  height: 100%; position: relative; overflow: hidden; min-height: 400px;
  box-shadow: var(--shadow);
}
.section-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: transparent; }
.section-title { font-size: 32px; font-weight: bold; margin-bottom: 20px; color: var(--btn); }
.section-desc { font-size: 16px; color: var(--muted); margin-bottom: 40px; line-height: 1.8; max-width: 90%; }
.cta-btn {
  display: inline-block; background: var(--btn); color: #fff; padding: 14px 36px;
  border-radius: 6px; text-decoration: none; font-size: 16px; font-weight: bold;
  transition: background 0.2s; box-shadow: 0 4px 6px rgba(42,58,83,0.2);
}
.cta-btn:hover { background: var(--btn-hover); box-shadow: 0 6px 12px rgba(42,58,83,0.3); }
.bg-icon { position: absolute; right: -20px; bottom: -30px; font-size: 180px; opacity: 0.05; color: #000; pointer-events: none; }

/* --- 目录页 (Catalog) 专用 --- */
.grid-container { max-width: 1400px; margin: 20px auto; padding: 0 16px; column-count: 5; column-gap: 16px; }
@media (max-width: 1200px) { .grid-container { column-count: 4; } }
@media (max-width: 900px) { .grid-container { column-count: 3; } .main-container { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid-container { column-count: 2; } .bar { flex-direction: column; height: auto; gap: 10px; padding: 10px;} .nav-right{flex-wrap: wrap; justify-content: center;} }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px;
  margin-bottom: 16px; break-inside: avoid; overflow: hidden; position: relative;
  transition: transform 0.2s, box-shadow 0.2s; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: transparent; }
.thumb { width: 100%; display: block; height: auto; background: #eee; cursor: pointer;}
.info { padding: 12px; cursor: pointer;}
.row { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.val { color: var(--text); font-weight: 500; }
.price { color: var(--accent); font-weight: bold; font-size: 14px; }

/* 选品勾选按钮 */
.select-btn {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center;
  justify-content: center; cursor: pointer; z-index: 5; border: 1px solid #ddd;
  color: #ccc; font-size: 18px; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.select-btn.selected { background: var(--btn); border-color: var(--btn); color: #fff; }
.select-btn:hover { transform: scale(1.1); color: var(--btn); }
.select-btn.selected:hover { color: #fff; }

.load-more-container { text-align: center; padding: 40px 0; }
.load-more-btn { padding: 10px 30px; font-size: 14px; background: #fff; border: 1px solid #ccc; color: #333; cursor: pointer; border-radius: 4px; transition: all 0.2s; }
.load-more-btn:hover { background: #eee; border-color: #999; }

/* --- 灯箱 (Lightbox) --- */
/* 注意：灯箱保持深色背景，以便在图片上显示白字 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 100; display: none; align-items: center; justify-content: center; }
.lightbox.show { display: flex; }
.lb-content { position: relative; max-width: 90vw; max-height: 90vh; display: inline-block; background: #000; box-shadow: 0 0 30px rgba(0,0,0,0.8); }
.lb-img { display: block; max-height: 85vh; max-width: 100%; }
.lb-close { position: absolute; top: 20px; right: 20px; font-size: 40px; cursor: pointer; color: #fff; z-index: 105; line-height: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; color: rgba(255,255,255,0.5); cursor: pointer; padding: 20px; z-index: 105; user-select: none; transition: color 0.2s; }
.lb-nav:hover { color: #fff; background: rgba(0,0,0,0.3); }
.lb-prev { left: 20px; position: fixed; }
.lb-next { right: 20px; position: fixed; }
.lb-details {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(19, 21, 26, 0.9); border: 1px solid #333; 
  padding: 15px; border-radius: 6px; color: #fff; max-width: 400px;
  backdrop-filter: blur(5px); z-index: 102; text-align: left;
}
.lb-details h3 { margin: 0 0 10px 0; color: var(--accent); font-size: 18px; }
.lb-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 13px; border-bottom: 1px solid #333; padding-bottom: 2px; }
.lb-label { color: #acb0b6; margin-right: 15px; }
.lb-val { color: #fff; font-weight: bold; text-align: right; }
.lb-keywords { display: none; } /* 隐藏关键词 */

/* --- 后台 (Backend) 专用 --- */
.header-backend { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.list-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.list-item { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 10px; position: relative; box-shadow: var(--shadow); }
.list-item img { width: 100%; height: auto; display: block; border-radius: 4px; }
.remove-btn { 
  position: absolute; top: 5px; right: 5px; background: var(--danger); color: white; 
  width: 24px; height: 24px; text-align: center; line-height: 24px; 
  border-radius: 50%; cursor: pointer; font-size: 14px; z-index: 10; 
}
.item-info { display: none; } /* 隐藏详情(后台用) */

/* --- 登录页 (Login) 专用 --- */
.login-body { display: flex; justify-content: center; align-items: center; height: 100vh; background: var(--bg); }
.login-form { background: var(--card); padding: 2.5rem; border-radius: 12px; border: 1px solid var(--border); width: 350px; box-shadow: var(--shadow); text-align: center; }
.login-input { width: 100%; padding: 12px; margin-bottom: 15px; background: #f9f9f9; border: 1px solid #ccc; border-radius: 4px; color: #333; box-sizing: border-box; }
.login-input:focus { background: #fff; border-color: var(--btn); outline: none; }
.login-btn { width: 100%; padding: 12px; background: var(--btn); color: white; border: none; cursor: pointer; border-radius: 4px; font-weight: bold; font-size: 16px; }
.login-btn:hover { background: var(--btn-hover); }
.error { color: var(--danger); font-size: 0.9em; margin-bottom: 15px; }

/* 打印隐藏 */
@media print { body { display: none; } }