/* =========================================================
   床单系列专区 / 二级分类 样式
   沿用 style.css 的设计变量与风格
   ========================================================= */

/* ---------- 床单系列专区（产品页顶部） ---------- */
.bed-zone {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 100%);
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
}
.bed-zone__head { max-width: 760px; margin-bottom: 48px; }
.bed-zone__head .lead { margin-top: 14px; }

/* ---------- 子品类矩阵（首页 / 产品页共用） ---------- */
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.subcat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: .3s ease;
  display: block;
}
.subcat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-soft);
}
.subcat__icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.subcat__icon svg { width: 24px; height: 24px; stroke: var(--accent); }
.subcat h4 { font-family: var(--font-serif); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.subcat p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.subcat--more .subcat__icon { background: var(--accent); }
.subcat--more .subcat__icon svg { stroke: #fff; }

/* ---------- 首页床单专区 CTA ---------- */
.bed-spotlight { background: var(--bg); }
.bed-spotlight .section-head { max-width: 760px; }
.bed-spotlight__cta { text-align: center; margin-top: 48px; }

/* ---------- 二级分类标签 ---------- */
.subtabs {
  display: none;            /* 默认隐藏，仅在“床单系列”下显示 */
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 40px;
}
.subtabs.is-open { display: flex; }
.subtab {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: .2s;
}
.subtab:hover { border-color: var(--accent); color: var(--accent); }
.subtab.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: var(--accent-soft);
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .subcat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .subcat-grid { grid-template-columns: 1fr 1fr; }
  .bed-zone { padding: 64px 0 52px; }
}

/* ---------- 首页 Hero 床单入口标签 ---------- */
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 22px;
  backdrop-filter: blur(4px);
  transition: .25s;
}
.hero__pill:hover { background: rgba(255, 255, 255, .28); transform: translateY(-2px); }
.hero__pill span { transition: .25s; }
.hero__pill:hover span { transform: translateX(3px); }

/* ---------- 床单核心品类 主推 band ---------- */
.bed-hero {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface-2) 100%);
  padding: 84px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bed-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.bed-hero__eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  color: var(--accent-deep);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.bed-hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 18px;
}
.bed-hero h2 em { font-style: normal; color: var(--accent); }
.bed-hero__lead { color: var(--muted); font-size: 16px; line-height: 1.85; max-width: 480px; margin-bottom: 26px; }
.bed-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.bed-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.bed-chip svg { width: 16px; height: 16px; stroke: var(--accent); }
.bed-hero__media {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.bed-hero__media img {
  width: 100%; height: 240px; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.bed-hero__media img:nth-child(1) { transform: translateY(18px); }
.bed-hero__media img:nth-child(2) { transform: translateY(-12px); }
.bed-hero__media img:nth-child(3) { grid-column: 1 / -1; height: 180px; transform: none; }

/* ---------- 床单专区头部增强 ---------- */
.bed-spotlight__count {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  font-size: 14px; font-weight: 600; color: var(--accent-deep);
}
.bed-spotlight__count b { font-family: var(--font-serif); font-size: 20px; }

@media (max-width: 960px) {
  .bed-hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .bed-hero__media { max-width: 520px; }
  .bed-hero__media img:nth-child(1),
  .bed-hero__media img:nth-child(2) { transform: none; }
}

/* ---------- 产品明细弹窗（点击产品图弹出） ---------- */
.product__media { position: relative; cursor: pointer; overflow: hidden; }
.product__media img { transition: transform .35s ease; }
.product__media:hover img { transform: scale(1.04); }
.product__hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .02em;
  background: rgba(122, 92, 64, 0);
  opacity: 0; transform: translateY(6px);
  transition: .28s ease;
  pointer-events: none;
}
.product__hint::before {
  content: "";
  width: 18px; height: 18px; flex: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}
.product__media:hover .product__hint { opacity: 1; transform: translateY(0); background: rgba(122, 92, 64, .45); }

.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(45, 33, 24, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .25s ease;
}
.modal.is-open { display: flex; opacity: 1; }
.modal__dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 880px; width: 100%;
  max-height: 88vh; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr;
  box-shadow: 0 30px 80px rgba(45, 33, 24, .35);
  animation: modalIn .28s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}
.modal__dialog::-webkit-scrollbar { width: 8px; }
.modal__dialog::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 999px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.modal__media { background: var(--surface-2); position: relative; }
.modal__media img {
  width: 100%; height: 100%; min-height: 340px; object-fit: cover; display: block;
  animation: modalImgIn .35s ease .05s both;
}
@keyframes modalImgIn { from { transform: scale(1.06); opacity: .55; } to { transform: none; opacity: 1; } }

.modal__body { padding: 34px 36px; display: flex; flex-direction: column; }
.modal__tag {
  align-self: flex-start;
  font-size: 12px; font-weight: 600;
  color: var(--accent-deep); background: var(--accent-soft);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.modal__title { font-family: var(--font-serif); font-size: 24px; color: var(--ink); margin-bottom: 12px; line-height: 1.3; }
.modal__desc { color: var(--muted); line-height: 1.85; margin-bottom: 22px; font-size: 14.5px; }
.modal__specs { display: grid; gap: 0; margin: 0 0 28px; }
.modal__spec { display: flex; gap: 14px; font-size: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.modal__spec:first-child { border-top: 1px dashed var(--line); }
.modal__spec dt { width: 72px; flex: none; color: var(--muted); font-weight: 600; }
.modal__spec dd { margin: 0; color: var(--ink); font-weight: 500; line-height: 1.6; }

.modal__cta { align-self: flex-start; margin-top: auto; }

.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  transition: .2s;
}
.modal__close:hover { background: #fff; transform: rotate(90deg); }
.modal__close:focus-visible,
.modal__cta:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

@media (max-width: 680px) {
  .modal { padding: 14px; }
  .modal__dialog { grid-template-columns: 1fr; }
  .modal__media { order: -1; }
  .modal__media img { min-height: 220px; height: 220px; }
  .modal__body { padding: 24px 22px; }
  .modal__cta { width: 100%; justify-content: center; }
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .product__media img,
  .modal__dialog,
  .modal__media img,
  .product__hint { transition: none; animation: none; }
}

/* ---------- 英文版弹窗微调（en/ 页面共享本文件，按 lang 单独适配） ---------- */
/* 英文规格标签（Material / Size / MOQ / Service）比中文长，加宽 dt 避免折行 */
html[lang="en"] .modal__spec dt { width: 92px; }
html[lang="en"] .modal__title { letter-spacing: .01em; }
html[lang="en"] .product__hint { letter-spacing: .04em; }
html[lang="en"] .modal__cta { min-width: 168px; justify-content: center; }

/* ---------- Contact page — Request a Quote layout（参照 xinlongsilk.com/contact） ---------- */
.cx { display: grid; grid-template-columns: 1fr 1.08fr; gap: 26px; align-items: stretch; }
.cx__info,
.cx__form {
  background: #FDFBF6; border: 1px solid #EFE6D7; border-radius: 18px;
  padding: 38px 36px; box-shadow: var(--shadow-sm);
}
.cx__title { font-family: var(--font-serif); font-size: 26px; line-height: 1.3; color: #1E4B3C; margin-bottom: 26px; }
.cx__list { list-style: none; display: grid; gap: 22px; }
.cx__list li { display: flex; gap: 14px; align-items: flex-start; }
.cx__ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; margin-top: 2px; }
.cx__ic svg { width: 18px; height: 18px; }
.cx__ic--pin   { background: #FCE7E4; color: #E05A4E; }
.cx__ic--phone { background: #FBE2EE; color: #D3508E; }
.cx__ic--mail  { background: #EFE8FB; color: #7E57C2; }
.cx__ic--clock { background: #DFF2EF; color: #2E9C8D; }
.cx__ic--ship  { background: #FDEDD9; color: #E8902C; }
.cx__ic--pay   { background: #E4F1E2; color: #4C9E52; }
.cx__txt h4 { font-size: 15px; color: #243B31; margin-bottom: 4px; }
.cx__txt p { color: #5C6963; font-size: 14px; line-height: 1.7; }

.cx__formtitle { font-size: 21px; font-weight: 700; color: #17493B; margin-bottom: 8px; }
.cx__hint { color: #6E7A73; font-size: 13.5px; line-height: 1.65; margin-bottom: 20px; }
.cx__form input,
.cx__form select,
.cx__form textarea {
  width: 100%; background: #fff;
  border: 1px solid #DDD4C4; border-radius: 8px;
  padding: 13px 14px; font-size: 14px; color: #243B31;
  font-family: inherit; margin-bottom: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.cx__form input:focus,
.cx__form select:focus,
.cx__form textarea:focus { border-color: #B08A28; box-shadow: 0 0 0 3px rgba(176, 138, 40, .12); }
.cx__form textarea { resize: vertical; min-height: 120px; }
.cx__form ::placeholder { color: #8B958E; opacity: 1; }
.cx__form select:required:invalid { color: #8B958E; }
.cx__form select option { color: #243B31; }
.cx__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cx__submit {
  width: 100%; border: none; cursor: pointer;
  background: linear-gradient(180deg, #C6A13F, #AE8826);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .02em;
  padding: 14px; border-radius: 8px; font-family: inherit;
  transition: filter .2s;
}
.cx__submit:hover { filter: brightness(1.06); }
.cx__submit:disabled { opacity: .7; cursor: default; }
.cx__note { font-size: 13px; color: #6E7A73; margin-top: 12px; }
.cx__note:empty { display: none; }
.cx__fine { font-size: 12.5px; color: #7C857F; line-height: 1.65; margin-top: 12px; }
.cx__fine a { color: inherit; text-decoration: underline; }
.cx .form-ok { margin-top: 12px; }

@media (max-width: 880px) {
  .cx { grid-template-columns: 1fr; }
  .cx__row { grid-template-columns: 1fr; gap: 0; }
  .cx__info, .cx__form { padding: 26px 22px; }
}
