/* ==================== 全局样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==================== 容器 ==================== */
.container {
  width: 1200px;
  margin: 0 auto;
}

/* ==================== 导航栏 ==================== */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.navbar-brand {
  font-size: 24px;
  font-weight: bold;
  color: #e74c3c;
}

.navbar-nav {
  display: flex;
  gap: 30px;
}

.navbar-nav a {
  font-size: 16px;
  color: #666;
  transition: color 0.3s ease;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.navbar-nav a:hover {
  color: #e74c3c;
  border-bottom-color: #e74c3c;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 购物车图标 */
.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 24px;
  color: #666;
  transition: color 0.3s ease;
}

.cart-icon:hover {
  color: #e74c3c;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #e74c3c;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* 简化导航栏（登录/注册页） */
.navbar-simple {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-simple .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

/* ==================== Banner ==================== */
.banner {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  font-weight: bold;
}

/* ==================== 商品展示区 ==================== */
.section-title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin: 40px 0 30px;
  padding-left: 15px;
  border-left: 4px solid #e74c3c;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.products-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 商品卡片 */
.product-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.product-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #f0f0f0;
}

.product-card-content {
  padding: 20px;
}

.product-card-name {
  font-size: 16px;
  color: #333;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-price {
  font-size: 20px;
  color: #e74c3c;
  font-weight: bold;
  margin-bottom: 15px;
}

.product-card-btn {
  display: block;
  width: 100%;
  padding: 10px 0;
  background-color: #e74c3c;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.product-card-btn:hover {
  background-color: #c0392b;
}

/* ==================== 商品详情页 ==================== */
.product-detail {
  background-color: #fff;
  padding: 40px;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.product-detail-header {
  display: flex;
  gap: 50px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #eee;
}

.product-detail-image {
  flex: 0 0 400px;
}

.product-detail-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  background-color: #f0f0f0;
  cursor: pointer;
}

.product-detail-image .upload-tip {
  text-align: center;
  color: #999;
  font-size: 14px;
  margin-top: 10px;
}

.product-detail-info {
  flex: 1;
}

.product-detail-name {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
}

.product-detail-price {
  font-size: 32px;
  color: #e74c3c;
  font-weight: bold;
  margin-bottom: 30px;
}

.product-detail-btn {
  padding: 15px 60px;
  background-color: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: 30px;
}

.product-detail-btn:hover {
  background-color: #c0392b;
}

.merchant-info {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
}

.merchant-info h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 15px;
}

.merchant-info p {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

/* 商品详情区 */
.product-detail-content {
  margin-top: 40px;
}

.product-detail-content h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e74c3c;
}

.detail-text {
  line-height: 1.8;
  color: #666;
}

.detail-text img {
  max-width: 100%;
  margin: 20px 0;
}

.upload-detail-btn {
  display: inline-block;
  padding: 10px 30px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

.upload-detail-btn:hover {
  background-color: #2980b9;
}

/* ==================== 表单样式 ==================== */
.form-container {
  max-width: 500px;
  margin: 50px auto;
  background-color: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.form-title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #e74c3c;
}

.form-group .error-msg {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.form-group.error .error-msg {
  display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #e74c3c;
}

/* 验证码 */
.captcha-group {
  display: flex;
  gap: 10px;
}

.captcha-group input {
  flex: 1;
}

.captcha-btn {
  padding: 0 20px;
  background-color: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.captcha-btn:hover {
  background-color: #c0392b;
}

.captcha-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* 复选框 */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.checkbox-group label {
  font-size: 14px;
  color: #666;
}

/* 按钮 */
.form-btn {
  width: 100%;
  padding: 15px 0;
  background-color: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-btn:hover {
  background-color: #c0392b;
}

.form-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.form-links {
  text-align: center;
  margin-top: 20px;
}

.form-links a {
  color: #e74c3c;
  font-size: 14px;
  margin: 0 10px;
}

.form-links a:hover {
  text-decoration: underline;
}

/* ==================== 商家入驻 ==================== */
.join-container {
  max-width: 800px;
  margin: 50px auto;
  background-color: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.agreement-box {
  max-height: 300px;
  overflow-y: auto;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 4px;
  margin: 30px 0;
  line-height: 1.8;
  color: #666;
  font-size: 14px;
}

.agreement-box h4 {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
}

.agreement-box p {
  margin-bottom: 15px;
}



/* 页脚样式 */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content a{
	display: block;
	text-decoration: none;
	color: #FFFFFF;
	line-height: 50px;
}


/* ==================== 隐藏文件输入 ==================== */
.file-input-hidden {
  display: none;
}

/* ==================== 响应式提示 ==================== */
@media (max-width: 1200px) {
  .container {
    width: 100%;
    padding: 0 20px;
  }
}

/* ==================== 工具类 ==================== */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}
