/* ==========================
   沙发系列导航
   桌面端为两列布局，图片和跳转链接可直接在上方 HTML 中填写
========================== */
.sofa-collection-nav {
  padding-top: 80px;
  background-color: #F7F7F2;
}

/* 沙发系列卡片网格 */
.sofa-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

/* 单张系列卡片 */
.sofa-collection-card {
  position: relative;
  display: block;
  aspect-ratio: 2.05 / 1;
  overflow: hidden;
  border-radius: 4px;
  background-color: #e8e6e1; /* 图片未填写时的占位底色 */
  color: #ffffff;
  text-decoration: none;
}

/* 卡片背景图片 */
.sofa-collection-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

/* 图片地址为空时隐藏破图图标；填写 src 后图片会自动正常显示 */
.sofa-collection-image[src=""] {
  visibility: hidden;
}

/* 系列名称：始终位于图片正中央 */
.sofa-collection-name {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);

  color: #ffffff;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

/* 鼠标悬停时轻微放大图片 */
.sofa-collection-card:hover .sofa-collection-image {
  transform: scale(1.025);
}

/* 键盘操作时显示清晰的焦点边框 */
.sofa-collection-card:focus-visible {
  outline: 2px solid #222222;
  outline-offset: 3px;
}

/* 移动端：改为单列布局，并调整卡片比例和上下间距 */
@media (max-width: 767px) {
  .sofa-collection-nav {
    padding-top: 48px;
  }

  .sofa-collection-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sofa-collection-card {
    aspect-ratio: 5 / 3;
  }

  .sofa-collection-name {
    font-size: 28px;
  }
}

/* ==========================
   通用活动优惠卡片
   类名不绑定具体节日或活动，更换活动时只需修改图片、文案和链接
========================== */
.promotion-section {
  padding-top: 80px;
  background-color: #F7F7F2;
}

/* 活动卡片主体 */
.promotion-card {
  position: relative;
  min-height: 272px;
  overflow: hidden;
  border-radius: 4px;
  background-color: #efefe9;
}

/* 活动背景图片 */
.promotion-card-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* 图片地址为空时隐藏破图图标；填写 src 后会自动正常显示 */
.promotion-card-image[src=""] {
  visibility: hidden;
}

/* 桌面端左侧浅色渐变，保证文字清晰且自然过渡到图片 */
.promotion-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(239, 239, 233, 0.98) 0%,
    rgba(239, 239, 233, 0.93) 28%,
    rgba(239, 239, 233, 0.58) 48%,
    rgba(239, 239, 233, 0) 72%
  );
  pointer-events: none;
}

/* 活动文案区域 */
.promotion-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 272px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 26px;
  color: #2C2A27;
}

.promotion-card-title {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  color: #2C2A27 !important;
  letter-spacing: 0.3px;
}

.promotion-card-description {
  margin: 12px 0 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
}

/* 活动优惠按钮 */
.promotion-card-action {
  display: inline-flex;
  min-width: 262px;
  min-height: 57px;
  box-sizing: border-box;
  margin-top: 24px;
  padding: 10px 20px;
  border-radius: 4px;
  align-items: center;
  justify-content: center;

  color: #EF0B14;
  background-color: #ffffff;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

/* 覆盖主题的链接状态，点击前后始终保持活动红色 */
.promotion-card .promotion-card-action,
.promotion-card .promotion-card-action:link,
.promotion-card .promotion-card-action:visited,
.promotion-card .promotion-card-action:hover,
.promotion-card .promotion-card-action:focus,
.promotion-card .promotion-card-action:active {
  color: #EF0B14 !important;
}

.promotion-card .promotion-card-action:focus-visible {
  outline: 2px solid #EF0B14;
  outline-offset: 3px;
}

/* 移动端：上方展示图片，下方居中展示活动文案 */
@media (max-width: 767px) {
  .promotion-section {
    padding-top: 48px;
  }

  .promotion-card {
    aspect-ratio: 0.925 / 1;
    min-height: 0;
  }

  .promotion-card-image {
    inset: 0;
    height: 100%;
  }

  .promotion-card::before {
    background: linear-gradient(
      180deg,
      rgba(239, 239, 233, 0) 30%,
      rgba(239, 239, 233, 0.7) 48%,
      rgba(239, 239, 233, 0.98) 61%,
      #efefe9 72%
    );
  }

  .promotion-card-content {
    /* 绝对定位覆盖在移动端活动背景图上方 */
    position: absolute;
    inset: 53% 0 0;
    min-height: 0;
    padding: 0 18px 8%;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
  }

  .promotion-card-title {
    font-size: 24px;
  }

  .promotion-card-description {
    margin-top: 12px;
    font-size: 14px;
  }

  .promotion-card-action {
    min-width: 0;
    min-height: 52px;
    margin-top: 24px;
    padding: 10px 14px;
    font-size: 24px;
  }
}

/* ==========================
   通用产品导购卡片
   桌面端交错排列，移动端统一为图片在上、文字在下
========================== */
.product-guide-section {
  padding-top: 80px;
  background-color: #F7F7F2;
}

.product-guide-list {
  overflow: hidden;
}

/* 单组导购内容：默认图片在左、文字在右 */
.product-guide-item {
  display: flex;
  width: 100%;
  background-color: #F7F7F2;
}

/* 奇数项反向排列，实现文字与图片左右交错 */
.product-guide-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.product-guide-media,
.product-guide-content {
  flex: 0 0 50%;
  width: 50%;
  box-sizing: border-box;
}

.product-guide-media {
  aspect-ratio: 1.24 / 1;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  background-color: #ecece7;
}

.product-guide-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* 图片地址为空时隐藏破图图标；填写 src 后自动显示 */
.product-guide-image[src=""] {
  visibility: hidden;
}

.product-guide-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-guide-content-inner {
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

/* 沙发套、面料样品的内容盒子靠左 */
.product-guide-item:nth-child(odd) .product-guide-content-inner {
  margin-right: 80px;
  margin-left: 0;
}

/* 沙发模块的内容盒子靠右，盒子内部文字仍保持左对齐 */
.product-guide-item:nth-child(even) .product-guide-content-inner {
  margin-right: 0;
  margin-left: 80px;
}

.product-guide-title {
  margin: 0;
  color: #2C2A27;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.product-guide-description {
  margin: 12px 0 0;
  color: #4E4A45;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
}

.product-guide-action {
  display: inline-flex;
  min-width: 150px;
  min-height: 40px;
  box-sizing: border-box;
  margin-top: 24px;
  padding: 8px 20px;
  border-radius: 3px;
  align-items: center;
  justify-content: center;

  color: #ffffff !important;
  background-color: #A0A17F;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

/* 覆盖 WordPress 主题的链接与已访问链接颜色，PC 和移动端均保持白字 */
.product-guide-section .product-guide-action,
.product-guide-section .product-guide-action:link,
.product-guide-section .product-guide-action:visited {
  color: #FFFFFF !important;
}

.product-guide-section .product-guide-action:hover,
.product-guide-section .product-guide-action:focus,
.product-guide-section .product-guide-action:active {
  color: #ffffff !important;
  background-color: #A0A17F;
}

.product-guide-action:focus-visible {
  outline: 2px solid #A0A17F;
  outline-offset: 3px;
}

/* 小于 1024px：每组都按照图片、标题、说明、按钮的顺序纵向排列 */
@media (max-width: 1023px) {
  .product-guide-section {
    padding-top: 48px;
  }

  .product-guide-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
    overflow: visible;
  }

  .product-guide-item,
  .product-guide-item:nth-child(odd) {
    flex-direction: column;
  }

  .product-guide-media,
  .product-guide-content {
    flex-basis: auto;
    width: 100%;
  }

  .product-guide-content {
    padding: 20px 0 0;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .product-guide-item:nth-child(odd) .product-guide-content-inner,
  .product-guide-item:nth-child(even) .product-guide-content-inner {
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .product-guide-title {
    font-size: 22px;
  }

  .product-guide-description {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.3;
  }

  .product-guide-action {
    min-width: 120px;
    min-height: 36px;
    margin-top: 24px;
    padding: 7px 16px;
    font-size: 18px;
  }
}

/* WordPress Banner 外壳 */
#home_banner {
  padding: 0;
}

/* Banner 主容器 */
.home-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Banner 图片容器 */
.home-banner-picture {
  display: block;
  width: 100%;
}

.home-banner-picture picture {
  display: block;
  width: 100%;
}

/* Banner 图片 */
.home-banner-image {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================
   PC端内容模块
========================== */
.home-banner-module {
  position: absolute;
  top: 38%;
  left: 10%;
  z-index: 10;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Banner 文字 */
.home-banner-text {
  display: block;
  color: #ffffff;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

/* 按钮容器 */
.home-banner-button-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

/* 按钮公共样式 */
.home-banner-btn {
  width: 190px;
  height: 43px;
  box-sizing: border-box;
  border: none;
  border-radius: 4px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

/* 左侧按钮 */
.shop-sofas {
  color: #222222;
  background-color: #ffffff;
}

/* 右侧按钮 */
.shop-swatches {
  color: #ffffff;
  background-color: transparent;
  border: 1px solid #ffffff;
}

/* ==========================
   平板端
========================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .home-banner-text {
    font-size: 36px;
  }

  .home-banner-btn {
    width: 160px;
  }
}

/* ==========================
   移动端
========================== */
@media (max-width: 767px) {

  /* 整体内容居中 */
  .home-banner-module {
    top: 18%;
    left: 50%;
    transform: translateX(-50%);

    width: 90%;
    align-items: center;
  }

  /* 文字居中 */
  .home-banner-text {
    width: 100%;
    font-size: 30px;
    line-height: 1.2;
    text-align: center;
  }

  /* 按钮容器 */
  .home-banner-button-row {
    width: 88%;
    margin-top: 20px;
    gap: 12px;
    justify-content: center;
  }

  .home-banner-btn {
    width: auto;
    min-width: 0;
    height: 43px;
    font-size: 14px;
  }

  .shop-sofas {
    flex: 0 0 42%;
  }

  .shop-swatches {
    flex: 1;
  }
}

/* 较宽的手机 */
@media (min-width: 430px) and (max-width: 767px) {
  .home-banner-text {
    font-size: 36px;
  }
}

/* ==========================
   顾客评论轮播
   评论内容为 mock 占位，请在 home.html 中填写图片、用户名、商品链接和评论正文
========================== */
.customer-reviews-section {
  overflow: hidden;
  padding: 80px 0 80px;
  background-color: #F7F7F2;
}

.customer-reviews-title {
  margin: 0 0 24px;
  color: #2C2A27;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.customer-reviews-carousel {
  position: relative;
  width: 100%;
}

.customer-reviews-viewport {
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
}

.customer-reviews-viewport:focus-visible {
  outline: 2px solid #A0A17F;
  outline-offset: 5px;
}

.customer-reviews-track {
  display: flex;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.customer-reviews-track.is-changing {
  opacity: 0;
  transform: translateX(-12px);
}

.customer-review-card {
  display: flex;
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: 0;
  min-height: 610px;
  box-sizing: border-box;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #E2E1D8;
  border-radius: 4px;
  background-color: #F7F7F2;
}

.customer-review-card[hidden] {
  display: none;
}

.customer-review-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #E2E1D8;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #2C2A27;
  background-color: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) scale(0.92);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.customer-review-nav--previous {
  left: -56px;
}

.customer-review-nav--next {
  right: -56px;
}

.customer-review-nav.is-visible,
.customer-review-nav:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.customer-review-nav:hover,
.customer-review-nav:focus-visible {
  border-color: #A0A17F;
  color: #FFFFFF;
  background-color: #A0A17F;
  outline: none;
}

.customer-review-nav:disabled {
  display: none;
}

.customer-review-nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-review-media {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background-color: #E8E6E1;
}

.customer-review-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 图片地址留空时只显示占位底色，不显示破图图标 */
.customer-review-image[src=""] {
  visibility: hidden;
}

.customer-review-body {
  display: flex;
  flex: 1;
  box-sizing: border-box;
  flex-direction: column;
  padding: 20px 20px 20px;
}

.customer-review-info {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.customer-review-meta {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.customer-review-rating {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 1px;
  line-height: 1;
}

.customer-review-rating > span {
  display: block;
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.customer-review-rating .star-filled {
  color: #2C2A27;
}

.customer-review-rating .star-half {
  color: transparent;
  background: linear-gradient(90deg, #2C2A27 50%, #D7D8D3 50%);
  background-clip: text;
}

.customer-review-rating .star-empty {
  color: #D7D8D3;
}

.customer-review-name {
  min-width: 0;
  color: #2C2A27;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
}

.customer-review-product {
  min-height: 22px;
  margin-top: 8px;
  color: #A0A17F;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.customer-review-product:link,
.customer-review-product:visited,
.customer-review-product:hover,
.customer-review-product:focus,
.customer-review-product:active {
  color: #A0A17F;
}

.customer-review-product:focus-visible {
  outline: 2px solid #A0A17F;
  outline-offset: 3px;
}

.customer-review-copy {
  flex: 1;
  max-height: 160px;
  margin: 20px 0 0;
  padding-top: 20px;
  border-top: 1px solid #E2E1D8;
  color: #4D4A45;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.customer-reviews-pagination {
  display: flex;
  min-height: 10px;
  margin-top: 30px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.customer-review-page {
  width: 30px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: #E5E5DB;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.customer-review-page:hover {
  background-color: #C8C8B4;
}

.customer-review-page.is-active {
  background-color: #A0A17F;
}

.customer-review-page:focus-visible {
  outline: 2px solid #2C2A27;
  outline-offset: 3px;
  transform: scaleY(1.25);
}

.customer-review-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .customer-reviews-title {
    margin-bottom: 20px;
    font-size: 22px;
  }

  .customer-reviews-track {
    gap: 16px;
  }

  .customer-review-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 767px) {
  .customer-reviews-section {
    padding: 48px 0 48px;
  }

  .customer-review-nav {
    display: none;
  }

  .customer-reviews-title {
    margin-bottom: 20px;
    font-size: 22px;
  }

  .customer-review-card {
    flex-basis: 100%;
    min-height: 0;
  }

  .customer-review-media {
    aspect-ratio: 1.1 / 1;
  }

  .customer-review-body {
    max-height: 300px;
    padding: 30px 15px 34px;
  }

  .customer-review-meta {
    gap: 16px;
  }

  .customer-review-name {
    font-size: 16px;
  }

  .customer-review-product {
    min-height: 21px;
    font-size: 12px;
  }

  .customer-review-copy {
    min-height: 215px;
    margin-top: 16px;
    padding-top: 16px;
    font-size: 14px;
    line-height: 1.55;
  }

  .customer-reviews-pagination {
    margin-top: 30px;
    gap: 9px;
  }

  .customer-review-page {
    width: 30px;
    height: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-reviews-track,
  .customer-review-page,
  .customer-review-nav {
    transition: none;
  }
}
