/* ==========================================================================
   商品详情页模板 —— 专属样式
   参照上海中旅线路详情页：标题 + 左列(画廊 + 日历) + 右列(预订信息)
   + 下方 4 个 Tab（行程介绍/费用说明/预订须知/温馨提醒）。
   与 css/style.css 配合使用（共享变量：品牌色、文字、边框等）。
   ========================================================================== */

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 12px 15px;
  font-size: 13px;
  color: var(--text-3);
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }
.breadcrumb .current { color: var(--text); }

.detail-wrap { padding: 0 15px; }

/* ---------- 标题 ---------- */
.detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.detail-title .badge {
  flex: 0 0 auto;
  padding: 2px 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  border-radius: 3px;
}
.badge--rec { background: var(--accent); }
.badge--season { background: var(--brand); }

/* ---------- 两列布局：左列(画廊+日历) 右列(预订) ---------- */
.detail-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.detail-left { flex: 0 0 500px; }
.detail-right { flex: 1; min-width: 0; }

/* ---------- 画廊 ---------- */
.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-main img { width: 100%; height: 280px; object-fit: cover; }
.gallery-main__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 13px;
}
.gallery-thumbs {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.gallery-thumbs img {
  flex: 0 0 auto;
  width: 88px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.gallery-thumbs img:hover { opacity: 1; border-color: var(--brand-light); }
.gallery-thumbs img.is-active { border-color: var(--brand); opacity: 1; }

/* ---------- 日历 ---------- */
.calendar { margin-top: 18px; }
.calendar__months {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--brand);
}
.calendar__months button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f5f5f5;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.calendar__months button em {
  font-style: normal;
  color: var(--price);
  font-weight: 700;
}
.calendar__months button.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.calendar__months button.is-active em { color: #fff; }

.calendar__grid {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.calendar__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-gray);
}
.calendar__week span {
  text-align: center;
  padding: 7px 0;
  font-size: 12px;
  color: var(--text-3);
}
.calendar__days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  min-height: 54px;
  padding: 6px 4px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  border-left: 1px solid #f0f0f0;
}
.cal-day:nth-child(7n+1) { border-left: none; }
.cal-day__num { display: block; font-size: 13px; color: var(--text); }
.cal-day__price { display: block; font-size: 12px; color: var(--price); font-weight: 700; }
.cal-day.is-other .cal-day__num { color: #ccc; }
.cal-day.is-available { cursor: pointer; transition: background 0.2s ease, box-shadow 0.2s ease; }
.cal-day.is-available:hover { background: var(--brand-light); }
.cal-day.is-selected { background: var(--brand-light); box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- 右列预订信息 ---------- */
.book-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--bg);
}
.book-card__meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  color: var(--text-2);
  font-size: 13px;
}
.book-card__price {
  margin: 14px 0 4px;
  color: var(--price);
  font-size: 15px;
}
.book-card__price em { font-style: normal; font-size: 30px; font-weight: 700; }
.book-card__price-note { color: var(--text-3); font-size: 12px; cursor: help; }
.book-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.book-card__tags span {
  padding: 2px 10px;
  background: rgba(255, 136, 68, 0.12);
  color: var(--accent);
  border-radius: 3px;
  font-size: 12px;
}
.book-card__section { margin-top: 14px; }
.book-card__section h5 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 3px solid var(--brand);
}
.book-card__outline { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.book-card__outline b { color: var(--brand-dark); margin-right: 4px; }
.book-card__outline i { display: inline-block; width: 1px; height: 12px; background: var(--border); margin: 0 8px; vertical-align: middle; }
.book-card__recommend {
  padding: 12px;
  background: #fff8f0;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.book-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 13px 0;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.book-btn:hover { background: #f07835; }

/* ---------- 下方 4 个 Tab ---------- */
.detail-tabs { margin-top: 28px; }
.detail-tabs__nav {
  display: flex;
  border-bottom: 2px solid var(--brand);
}
.detail-tabs__nav button {
  padding: 10px 24px;
  border: none;
  background: #f5f5f5;
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-right: 2px;
}
.detail-tabs__nav button.is-active { background: var(--brand); color: #fff; }
.detail-panel { display: none; padding: 20px 0; }
.detail-panel.is-active { display: block; }

/* 行程介绍：天数 tab */
.day-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.day-tabs button {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
}
.day-tabs button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.day-item { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.day-item__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.day-badge {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  line-height: 1.1;
}
.day-badge b { font-size: 11px; font-weight: 400; opacity: 0.85; }
.day-badge em { font-style: normal; font-size: 20px; font-weight: 700; }
.day-item__head h4 { font-size: 17px; font-weight: 700; color: var(--text); }
.day-item__scenic {
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 4px;
  font-size: 13px;
}
.day-item__line { margin-bottom: 6px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.day-item__line b { color: var(--text); }

/* 通用内容 */
.detail-article { color: var(--text-2); font-size: 14px; line-height: 1.9; }
.detail-article h4 { color: var(--text); font-size: 15px; margin: 14px 0 6px; }
.detail-article ul { padding-left: 20px; }
.detail-article li { list-style: disc; margin-bottom: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .detail-main { flex-direction: column; }
  .detail-left { flex: 1 1 auto; width: 100%; }
  .gallery-main img { height: 220px; }
}
@media (max-width: 768px) {
  .detail-title { font-size: 18px; flex-wrap: wrap; }
  .gallery-thumbs { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .gallery-thumbs img { width: 76px; height: 52px; }
  .calendar__months { overflow-x: auto; }
  .calendar__months button { flex: 0 0 auto; padding: 6px 10px; font-size: 12px; }
  .cal-day { min-height: 44px; padding: 4px 2px; }
  .cal-day__price { font-size: 11px; }
  .book-card { padding: 14px 14px; }
  .book-card__price em { font-size: 26px; }
  .detail-tabs__nav { overflow-x: auto; }
  .detail-tabs__nav button { flex: 0 0 auto; white-space: nowrap; padding: 9px 16px; font-size: 14px; }
  .day-tabs { flex-wrap: wrap; }
  .day-item { padding: 12px 14px; }
  .day-item__head h4 { font-size: 15px; }
}
