/* Etsy风格自定义样式 - 优化版 */

/* 全局字体设置 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #f1641e;
  --text-color: #222222;
  --text-light: #666666;
  --text-lighter: #999999;
  --border-color: #e4e4e4;
  --bg-light: #faf9f8;
  --shadow-soft: 0 4px 16px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.10);
  --border-radius: 12px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

/* 导航栏样式 */
.etsy-navbar { 
  background: #fff; 
  border-bottom: 1px solid var(--border-color); 
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 0.8rem 0;
}

.etsy-logo { 
  font-size: 1.8rem; 
  font-weight: 700; 
  color: var(--primary-color); 
  text-decoration: none; 
  letter-spacing: -0.5px;
}

/* 搜索框样式 */
.search-form {
  display: flex;
  align-items: center;
  position: relative;
  margin-right: 15px;
}

#search {
  border-radius: 24px;
  border: 1px solid var(--border-color);
  padding: 0.6em 1.2em;
  padding-right: 40px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  width: 220px;
  background-color: #fff;
}

#search:focus {
  box-shadow: 0 0 0 3px rgba(241, 100, 30, 0.15);
  border-color: var(--primary-color);
  outline: none;
  width: 280px;
}

.search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.3rem;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: var(--primary-color);
}

.search-cart {
  display: flex;
  align-items: center;
}

.etsy-nav-links a { 
  color: var(--text-color); 
  font-size: 0.95rem; 
  text-decoration: none; 
  margin-left: 1.2rem; 
  transition: color .2s;
  font-weight: 500;
}

.etsy-nav-links a:hover { 
  color: var(--primary-color); 
}

/* 主容器样式 */
.etsy-main-container { 
  background: var(--bg-light); 
  min-height: 100vh; 
  padding-top: 2rem;
}

/* 侧边栏过滤器样式 */
.etsy-sidebar { 
  background: #fff; 
  border-right: 1px solid var(--border-color); 
  padding: 1.8rem 1.5rem; 
  min-height: 80vh; 
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

.etsy-filter-title { 
  font-weight: 600; 
  margin-bottom: 1.2rem; 
  font-size: 1.1rem;
  color: var(--text-color);
  letter-spacing: 0.3px;
}

.etsy-filter-list { 
  list-style: none; 
  padding: 0; 
  margin: 0;
}

.etsy-filter-list li { 
  margin-bottom: 0.7rem; 
  font-size: 0.95rem; 
  color: var(--text-light);
}

.etsy-filter-list li b {
  font-weight: 600;
  color: var(--text-color);
  display: block;
  margin: 1.2rem 0 0.5rem 0;
  font-size: 1rem;
}

.etsy-filter-list li:first-child b {
  margin-top: 0;
}

.etsy-filter-list input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: var(--primary-color);
}

/* 分类头部样式 */
.etsy-category-header { 
  border-bottom: 1px solid var(--border-color); 
  padding-bottom: 1.2rem; 
  margin-bottom: 2.5rem; 
}

.etsy-category-title { 
  font-size: 2.2em; 
  font-weight: bold; 
  position: relative;
  display: inline-block;
  color: #d97706;
  letter-spacing: 1.2px;
  margin-bottom: 0.3rem;
  padding: 0 15px;
}

.etsy-category-title::before,
.etsy-category-title::after {
  content: '\2665'; /* 心形符号 */
  font-size: 1.5rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  text-shadow: none;
}

.etsy-category-title::before {
  left: -15px;
}

.etsy-category-title::after {
  right: -15px;
}

.etsy-category-title span {
  background: linear-gradient(to right, #c86c01, #f09b31);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: bold;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.etsy-category-desc { 
  color: var(--text-light); 
  margin-top: 0.8rem; 
  font-size: 1.05rem;
  font-weight: 300;
}

/* 搜索结果样式 */
.search-term {
  color: var(--primary-color);
  font-weight: 500;
}

.return-all {
  display: inline-block;
  margin-left: 15px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  padding: 2px 12px;
  transition: all 0.2s ease;
}

.return-all:hover {
  background-color: var(--primary-color);
  color: white;
}

/* 无搜索结果提示样式 */
.no-results {
  text-align: center;
  padding: 40px 0;
  color: var(--text-light);
}

/* 商品网格和卡片样式 */
.etsy-product-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 2rem; 
}

.etsy-product-card { 
  background: #fff; 
  border-radius: var(--border-radius); 
  box-shadow: var(--shadow-soft); 
  transition: all 0.3s ease; 
  overflow: hidden; 
  position: relative; 
}

.etsy-product-card:hover { 
  box-shadow: var(--shadow-hover); 
  transform: translateY(-5px); 
}

.etsy-product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.etsy-product-img-wrap { 
  width: 100%; 
  aspect-ratio: 1/1; 
  background: #f9f9f9; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  overflow: hidden;
}

.etsy-product-img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  transition: transform 0.5s ease;
}

.etsy-product-card:hover .etsy-product-img {
  transform: scale(1.05);
}

.etsy-product-info { 
  padding: 1.3rem 1.2rem; 
}

.etsy-product-title { 
  font-size: 1.15rem; 
  font-weight: 500; 
  color: var(--text-color); 
  margin-bottom: 0.6rem; 
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 3.2rem;
}

.etsy-product-price { 
  color: var(--primary-color); 
  font-weight: 600; 
  font-size: 1.2rem; 
  display: flex;
  align-items: center;
}

.etsy-product-price::before {
  content: '¥';
  font-size: 0.85em;
  margin-right: 0.1rem;
  font-weight: 400;
}

/* 分页控件样式 */
.etsy-pagination {
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.etsy-pagination .page-link { 
  color: var(--text-color); 
  border-radius: 50px; 
  margin: 0 0.3rem; 
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  transition: all 0.2s ease;
}

.etsy-pagination .page-item.active .page-link { 
  background: var(--primary-color); 
  border-color: var(--primary-color); 
  color: #fff; 
  font-weight: 500;
  box-shadow: 0 0 10px rgba(241, 100, 30, 0.3);
}

.etsy-pagination .page-link:hover { 
  color: var(--primary-color); 
  background-color: rgba(241, 100, 30, 0.05);
}

/* 响应式设计 */
@media (max-width: 1400px) {
  .etsy-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
  }
}

@media (max-width: 992px) {
  .etsy-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .etsy-sidebar { 
    display: none; 
  }
  
  .etsy-main-content { 
    width: 100%; 
    padding: 0 1rem;
  }
  
  .etsy-product-grid { 
    grid-template-columns: 1fr 1fr; 
    gap: 1.2rem; 
  }
  
  .etsy-product-title {
    font-size: 1.05rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    height: 1.5rem;
  }
  
  .etsy-product-info {
    padding: 1rem 0.8rem;
  }
  
  .etsy-product-price {
    font-size: 1.1rem;
  }
  
  .etsy-category-header {
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .etsy-product-grid { 
    grid-template-columns: 1fr; 
    gap: 1.5rem;
  }
  
  .etsy-category-title {
    font-size: 1.6rem;
  }
  
  .etsy-category-desc {
    font-size: 0.9rem;
  }
  
  .etsy-product-title {
    font-size: 1.1rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    height: 3.2rem;
  }
  
  .etsy-pagination .page-link {
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
  }
}
