/* ===== 全局设定 ===== */
body {
  font-family: "Poppins", sans-serif;
  background: #fafafa;
  margin: 0;
  padding: 0;
  color: #222;
  background: #fff;
}

.header {
  text-align: center;
  padding: 40px 20px 10px 20px;
  font-size: 18px;
  background: #fff;
}

.filter-wrapper {
  max-width: 900px;
  margin: 25px auto 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ========== DROPDOWN CONTAINER ========== */
.dropdown {
  position: relative;
  min-width: 220px;
}

/* dropdown 按钮 */
.dropdown-btn {
  width: 100%;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid #ccc;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.25s ease;
}

.dropdown:hover .dropdown-btn {
  border-color: #1f1f1f;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

/* dropdown 内容包装 */
.dropdown-content {
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 0.25s ease;
  overflow: hidden;
  z-index: 5;
}

/* Hover 才显示 dropdown */
.dropdown:hover .dropdown-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Dropdown wrapper */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Button style similar to search box */
.dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  width: 220px;

  background: rgba(255, 255, 255, 0.75);
  border: none;
  border-radius: 22px;
  cursor: pointer;

  box-shadow:
    0 0 25px rgba(150, 160, 255, 0.15),
    0 0 50px rgba(180, 130, 255, 0.10);

  backdrop-filter: blur(10px);
  transition: 0.25s ease;
}

/* Hover浮起效果 */
.dropdown-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(150, 160, 255, 0.25),
    0 0 60px rgba(180, 130, 255, 0.20);
}

/* Arrow icon */
.dropdown-arrow {
  width: 14px;
  height: 14px;
  opacity: 0.8;
  transition: 0.25s ease;
}

/* 展开时旋转箭头 */
.dropdown.show .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown content box */
.dropdown-content {
  position: absolute;
  top: 55px;
  left: 0;
  width: 100%;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: 0.25s ease;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.08),
    0 0 30px rgba(150, 160, 255, 0.25);
}

/* 展开 */
.dropdown.show .dropdown-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Items */
.dropdown-item {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s;
}

.dropdown-item:hover {
  background: rgba(150, 160, 255, 0.15);
}


/* ========== Dropdown Item 动画 ========== */
.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  background: #fff;
  transform: translateY(-10px);
  opacity: 0;
  animation: dropIn 0.35s forwards ease;
}

.dropdown-item:hover {
  background: #f2f2f2;
}

/* stagger 动画 */
.dropdown-item:nth-child(1) { animation-delay: 0.03s; }
.dropdown-item:nth-child(2) { animation-delay: 0.06s; }
.dropdown-item:nth-child(3) { animation-delay: 0.09s; }
.dropdown-item:nth-child(4) { animation-delay: 0.12s; }
.dropdown-item:nth-child(5) { animation-delay: 0.15s; }
.dropdown-item:nth-child(6) { animation-delay: 0.18s; }
.dropdown-item:nth-child(7) { animation-delay: 0.21s; }
.dropdown-item:nth-child(8) { animation-delay: 0.24s; }

/* 动画 keyframes */
@keyframes dropIn {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========== SEARCH BOX ========== */
/* 外层容器（对应 input__container） */
.search-box {
  position: relative;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 22px;
  max-width: 360px;
  width: 100%;
  margin-left: 25px;

  /* 去除倾斜 */
  transform: none;
  perspective: none;
}

#searchInput:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(180, 200, 255, 0.25);
  border-radius: 18px;
}

.search-box:focus-within {
  box-shadow:
    0 0 20px rgba(190, 200, 255, 0.22),
    0 0 35px rgba(210, 190, 255, 0.18);
  transform: translateY(-2px);
  transition: 0.25s ease;
}



/* 彩色柔光背景（对应 shadow__input） */
.search-shadow {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 40px;
  filter: blur(5px);
  opacity: 0.4;

  background-color: #999cff;
  background-image:
    radial-gradient(at 85% 51%, hsla(60,60%,61%,1) 0px, transparent 50%),
    radial-gradient(at 74% 68%, hsla(235,69%,77%,1) 0px, transparent 50%),
    radial-gradient(at 64% 79%, hsla(284,72%,73%,1) 0px, transparent 50%),
    radial-gradient(at 75% 16%, hsla(283,60%,72%,1) 0px, transparent 50%),
    radial-gradient(at 90% 65%, hsla(153,70%,64%,1) 0px, transparent 50%),
    radial-gradient(at 91% 83%, hsla(283,74%,69%,1) 0px, transparent 50%),
    radial-gradient(at 72% 91%, hsla(213,75%,75%,1) 0px, transparent 50%);
}

/* Icon（对应 input__button__shadow） */
.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
}

.search-icon:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 输入框（对应 input__search） */
#searchInput {
  width: 100%;
  border: none;
  outline: none;
  padding: 8px 10px;
  background: white;
  border-radius: 18px;
  font-size: 14px;
}



/* ===== 顶部导航栏 ===== */
.topbar {
  background: #1f1f1f;           /* ✅ 深灰接近黑色 */
  height: 70px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.topbar .container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

/* 左侧 logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 36px;
}

.logo span {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
}


/* ===== 网格布局 ===== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 350px); /* 🔥 固定 3 列 */
  gap: 30px;
  padding: 40px;
  max-width: 1070px;
  margin: 0 auto;
  justify-content: start; /* 左对齐，不拉伸 */
}

/* ===== 卡片样式 ===== */
.template-card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.08); /* ✅ 细细的浅灰边 */
  cursor: pointer;
}
.template-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* ===== 图片滚动效果 ===== */
.scroll-hover {
  position: relative;
  height: 370px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transition: background-position 1.5s linear;
  will-change: background-position;
}

/* ✅ Hover 时图片从上滑到底 */
.scroll-hover:hover {
  background-position: center bottom;
}

/* ===== Overlay 效果 ===== */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none; /* 防止挡住 hover */
}

.scroll-hover:hover .overlay {
  opacity: 1;
}

.quick-view {
  background: rgba(255, 255, 255, 0.85); /* ✅ 白色带透明度 */
  color: rgba(0, 0, 0, 0.7); /* ✅ 透明度 70% */
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s;
  pointer-events: all;
  text-decoration: none;   /* ✅ 去掉 underline */
}

.quick-view:hover {
  background: rgba(0, 0, 0, 0.7); /* ✅ 透明度 70% */
  color: #fff;
}



/* ===== 标题 ===== */
.template-card h3 {
  text-align: center;
  padding: 0 15px;
  font-size: 18px;
  color: #595959;
  margin-bottom:0;
}

/* ===== 副标题 ===== */
.subtitle {
  text-align: center;
  margin: 0;
  padding-bottom: 20px;
  font-size: 15px;
}

/* ===== Pagination ===== */
.pagination {
  text-align: center;
  padding: 30px 0 50px;
}

.pagination button {
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
  padding: 6px 12px;
  margin: 0 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination button:hover {
  background: #1f1f1f;
  color: #fff;
}

.pagination button.active {
  background: #1f1f1f;
  color: #fff;
  border-color: #1f1f1f;
}


/* ===== 底部 Footer ===== */
.site-footer {
  background: #1f1f1f;          /* ✅ 深灰底 */
  color: white;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  padding: 25px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 300; /* ✅ 让字体变细，不再是 Bold */
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer p {
  margin: 0;
  letter-spacing: 0.2px;
}

.site-footer .regno {
  font-size: 11px;       /* ✅ 注册号更小 */
  letter-spacing: 0.2px;
}

p a {
  color: #ec9f3a;/* 橙色 */
  text-decoration: none;
  transition: color 0.3s ease;
}

p a:hover {
  color: #43A5A6; /* 鼠标移上时变换的颜色 */
}
