/* ============================================================
 * SYVIMIR 首页 / 分类页样式
 * 主题色: #ff4d18
 * ========================================================== */

.syv-home {
  --syv-accent: #ff4d18;
  --syv-ink: #14171a;
  --syv-muted: #6b7280;
  --syv-line: rgba(20, 23, 26, .09);
  --syv-bg: #fff;
  --syv-soft: #f6f7f9;
  color: var(--syv-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.syv-home *,
.syv-home *::before,
.syv-home *::after { box-sizing: border-box; }

.syv-home img { display: block; max-width: 100%; }
.syv-home a { text-decoration: none; color: inherit; }
.syv-home h1, .syv-home h2, .syv-home h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; }

/* ---------------- Hero ---------------- */
.syv-hero {
  background: linear-gradient(180deg, #faf7f4 0%, #fff 100%);
  border-bottom: 1px solid var(--syv-line);
  overflow: hidden;
}
.syv-hero__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: 56px;
  align-items: center;
}
.syv-hero__kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 77, 24, .1);
  color: #c3370c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.syv-hero__h1 {
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.08;
  margin: 0 0 20px;
}
.syv-hero__h1 em {
  font-style: normal;
  color: var(--syv-accent);
}
.syv-hero__sub {
  margin: 0 0 30px;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--syv-muted);
}
.syv-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.syv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.syv-btn--primary {
  background: var(--syv-accent);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(255, 77, 24, .26);
}
.syv-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 77, 24, .32); }
.syv-btn--ghost {
  border: 1.5px solid rgba(20, 23, 26, .16);
  color: var(--syv-ink) !important;
  background: #fff;
}
.syv-btn--ghost:hover { border-color: var(--syv-ink); }

.syv-hero__media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--syv-soft);
  box-shadow: 0 30px 60px -30px rgba(20, 23, 26, .35);
}
.syv-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ---------------- 分类 ---------------- */
.syv-cats {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 8px;
}
.syv-cats__head { margin-bottom: 30px; }
.syv-cats__head h2 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 8px; }
.syv-cats__head p { margin: 0; color: var(--syv-muted); font-size: 14px; }

.syv-cats__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.syv-cat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .2s ease;
}
.syv-cat:hover { transform: translateY(-3px); }
.syv-cat__img {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--syv-soft);
}
.syv-cat__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.syv-cat:hover .syv-cat__img img { transform: scale(1.05); }
.syv-cat__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.syv-cat__count { font-size: 12px; color: var(--syv-muted); margin-top: -6px; }

/* ---------------- 热销 ---------------- */
.syv-hot {
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 24px 20px;
}
.syv-hot__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.syv-hot__head h2 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 8px; }
.syv-hot__head p { margin: 0; color: var(--syv-muted); font-size: 14px; }
.syv-hot__more {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--syv-accent) !important;
  white-space: nowrap;
}

.syv-hot__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 18px;
}
.syv-card { display: flex; flex-direction: column; gap: 12px; }
.syv-card__img {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--syv-soft);
}
.syv-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.syv-card:hover .syv-card__img img { transform: scale(1.045); }
.syv-card__body { display: flex; flex-direction: column; gap: 6px; }
.syv-card__name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.syv-card__price { font-size: 14px; font-weight: 700; color: var(--syv-accent); }
.syv-card__price del { color: #a3a8b0; font-weight: 400; font-size: 12px; margin-right: 6px; }
.syv-card__price ins { text-decoration: none; }

/* ---------------- 数字 ---------------- */
.syv-stats {
  max-width: 1280px;
  margin: 56px auto 0;
  padding: 0 24px;
}
.syv-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--syv-line);
  border: 1px solid var(--syv-line);
  border-radius: 16px;
  overflow: hidden;
}
.syv-stats__item {
  background: #fff;
  padding: 28px 20px;
  text-align: center;
}
.syv-stats__item b {
  display: block;
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--syv-ink);
  line-height: 1.1;
}
.syv-stats__item span {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--syv-muted);
}

/* ---------------- 为什么 ---------------- */
.syv-why {
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 24px 88px;
}
.syv-why h2 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 26px; }
.syv-why__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.syv-why__item {
  padding: 26px 22px;
  border: 1px solid var(--syv-line);
  border-radius: 14px;
  background: #fbfbfc;
}
.syv-why__item h3 { font-size: 15px; margin-bottom: 10px; }
.syv-why__item p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--syv-muted); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .syv-hero__inner { grid-template-columns: 1fr; gap: 36px; padding: 40px 20px 48px; }
  .syv-hero__media { aspect-ratio: 16 / 11; max-height: 420px; }
  .syv-cats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .syv-hot__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .syv-why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .syv-cats { padding-top: 48px; }
  .syv-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .syv-hot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .syv-hot__head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .syv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; }
  .syv-why__grid { grid-template-columns: 1fr; }
  .syv-why { padding-bottom: 56px; }
  .syv-btn { height: 46px; padding: 0 22px; font-size: 13.5px; }
}

/* ============================================================
 * 产品分类归档页 / 商店页
 * ========================================================== */
.syv-archive-head {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 6px;
}
.syv-archive-head h1 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.syv-archive-head .syv-archive-desc {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
  max-width: 62em;
}
.syv-sibling-cats {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.syv-sibling-cats a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 26, .12);
  font-size: 13px;
  color: #14171a;
  background: #fff;
  transition: all .16s ease;
}
.syv-sibling-cats a:hover { border-color: #14171a; }
.syv-sibling-cats a.is-current {
  background: #14171a;
  border-color: #14171a;
  color: #fff;
}

/* ---------------- 分类 / 商店页细节修正 ---------------- */

/* 隐藏主题自带的重复标题区（我们在上方已输出标题+描述+分类导航） */
.woocommerce-archive .hero-section,
.woocommerce-archive .woocommerce-products-header { display: none !important; }

/* 商品卡按钮使用主题色 */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_variable,
.woocommerce ul.products li.product .product_type_simple {
  background: #ff4d18 !important;
  border-color: #ff4d18 !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 9px 16px !important;
  transition: filter .16s ease;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover,
.woocommerce ul.products li.product .product_type_variable:hover {
  filter: brightness(.94);
}

/* 排序下拉与结果计数 */
.woocommerce-archive .woo-listing-top {
  align-items: center;
  border-bottom: 1px solid rgba(20,23,26,.08);
  padding-bottom: 14px;
  margin-bottom: 26px;
}
.woocommerce-archive .woocommerce-result-count {
  color: #6b7280 !important;
  font-size: 12.5px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.woocommerce-archive .woocommerce-ordering select {
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(20,23,26,.14);
  font-size: 13px;
  padding: 0 30px 0 12px;
  background-color: #fff;
}

/* 商品卡图片统一留白比例 */
.woocommerce ul.products li.product .ct-media-container {
  border-radius: 12px;
  overflow: hidden;
  background: #f6f7f9;
}

/* ============================================================
 * 移动端页头修正：确保汉堡菜单按钮可见
 * ========================================================== */
@media (max-width: 999.98px) {
  .ct-header .ct-header-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .ct-header .ct-header-trigger .ct-icon {
    fill: #14171a !important;
    stroke: #14171a;
  }
  /* 移动端语言切换（在 offcanvas 菜单里）加大点击区域 */
  .syv-lang { width: 100%; }
  .syv-lang__btn { padding: 10px 2px; font-size: 14px; }
}

/* 移动端 Hero：图片占满整宽 */
@media (max-width: 760px) {
  .syv-hero__inner { display: flex; flex-direction: column; gap: 28px; }
  .syv-hero__text { width: 100%; }
  .syv-hero__media {
    width: 100% !important;
    aspect-ratio: 4 / 3 !important;
    max-height: none !important;
    border-radius: 16px;
  }
  .syv-hero__h1 { font-size: 30px; }
  .syv-hero__sub { font-size: 14px; }
}

/* ============================================================
 * 容器宽度约束：避免窄屏横向溢出
 * ========================================================== */
.syv-home {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
.syv-home .syv-hero,
.syv-home .syv-hero__inner,
.syv-home .syv-cats,
.syv-home .syv-hot,
.syv-home .syv-stats,
.syv-home .syv-why { max-width: 100%; }
.syv-home .syv-hero__inner > *,
.syv-home .syv-hot__grid > *,
.syv-home .syv-cats__grid > * { min-width: 0; }

@media (max-width: 760px) {
  .syv-home .syv-hero__inner { padding: 32px 16px 40px; }
  .syv-home .syv-cats,
  .syv-home .syv-hot,
  .syv-home .syv-why { padding-left: 16px; padding-right: 16px; }
  .syv-home .syv-stats { padding-left: 16px; padding-right: 16px; }
  .syv-home .syv-hero__cta { gap: 10px; }
  .syv-home .syv-btn { flex: 1 1 auto; min-width: 0; }
  .syv-home .syv-hero__sub { font-size: 13.5px; line-height: 1.75; }
}
