/* ===== 产品详情页 product-detail.css ===== */

/* 部分1：左图右文 */
.detail-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

/* 图集（正方形 + 左右切换） */
.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .45s ease; }
.gallery-main img.is-switching { opacity: 0; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; padding: 0; margin: 0; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  opacity: 0; transition: opacity .25s ease, background .2s ease;
}
.gallery-arrow svg { width: 20px; height: 20px; display: block; }
.gallery-arrow.prev { left: 14px; }
.gallery-arrow.next { right: 14px; }
.gallery-main:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: #fff; opacity: 1; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs .thumb {
  width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; background: none; cursor: pointer;
  transition: border-color .25s ease, transform .25s ease;
}
.gallery-thumbs .thumb:hover { transform: translateY(-2px); }
.gallery-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs .thumb.active { border-color: var(--blue); }

/* 信息区 */
.detail-name { font-size: 30px; margin: 0 0 14px; color: var(--ink); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pet-tag.pet-tag--purple { background: #7c3aed; color: #fff; }
.detail-intro { color: var(--muted); line-height: 1.85; font-size: 16px; margin: 0; }
/* 产品规格（产品简介下方） */
.detail-specs { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.spec-row { display: flex; align-items: flex-start; gap: 10px; }
.spec-row .spec-label { flex-shrink: 0; margin-top: 1px; font-size: 12px; }
.spec-value { font-size: 14px; color: var(--text); line-height: 1.6; }
.spec-row--list { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 4px; align-items: start; }
.spec-row--list > .spec-label { grid-column: 1; }
.spec-list { margin: 0; padding: 0; list-style: none; display: contents; }
.spec-list li { grid-column: 2; font-size: 14px; color: var(--text); line-height: 1.6; padding-left: 14px; position: relative; }
.spec-list li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--blue-500); }
.detail-buy { margin-top: 22px; background: var(--beige-2); border-radius: 16px; padding: 22px 24px; }
.buy-price { font-size: 30px; font-weight: 800; color: var(--blue); margin-bottom: 14px; }
.buy-title { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.buy-channels { display: flex; flex-wrap: wrap; gap: 10px; }
.buy-channel {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--blue-light); color: var(--blue); text-decoration: none;
  transition: background .2s, color .2s; cursor: pointer;
}
.buy-channel:hover { background: var(--blue); color: #fff; }

/* 部分2 / 部分3 图文 */
.rich-row { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.rich-row .rich-img { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.rich-row .rich-img img { width: 100%; height: 100%; max-height: 440px; object-fit: cover; display: block; }
.rich-row .rich-text p { color: var(--muted); line-height: 1.9; font-size: 16px; margin: 0; }

/* 配料表卡片网格 */
.ingredient-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.ingredient-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 19px 19px 24px; text-align: center; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease); overflow: hidden; }
.ingredient-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.ingredient-card .ing-img { width: 100%; height: auto; margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: var(--beige-2); }
.ingredient-card .ing-img img { width: 100%; height: auto; display: block; }
.ingredient-card h5 { font-size: 17px; font-weight: 700; margin: 0 5px 8px; color: var(--ink); font-family: var(--font-title); }
.ingredient-card p { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 5px; }

/* 部分3 标签页 */
.detail-tabs-sec { padding-top: 24px; margin-top: -30px; }
/* 购买途径（第 4 个标签页内容） */
.detail-channels-title { font-size: 22px; font-family: var(--font-title); color: var(--ink); margin: 0 0 24px; }
.tabs {
  display: flex; width: 100%; gap: 4px; padding: 4px; margin-bottom: 28px;
  background: var(--blue-light); border-radius: 999px;
}
.tab {
  flex: 1; background: none; border: none; padding: 10px 26px; font-size: 16px; cursor: pointer;
  color: var(--ink); border-radius: 999px; font-weight: 500; text-align: center;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.tab.active { background: #fff; color: var(--blue); font-weight: 700; box-shadow: 0 1px 5px rgba(0, 0, 0, .12); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: pd-fade .35s ease; }
@keyframes pd-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 推荐区顶部与标签页区分隔 */
#recommend.section--beige { border-top: 1px solid var(--line); }

/* 响应式 */
@media (max-width: 768px) {
  .detail-split { grid-template-columns: 1fr; gap: 28px; }
  .rich-row { grid-template-columns: 1fr; gap: 20px; }
  .detail-name { font-size: 24px; }
}
