/* 通用旅游详情页样式 — Tour Detail (shared by china_tour_*, zhangjiajieA1, future A2/B1…) */

/* ========== Detail page tokens (match style.css orange theme) ========== */
:root {
  --detail-orange: #f98516;
  --detail-orange-nav: #f78600;
  --detail-orange-hover: #fb9d42;
  --detail-panel: #fdf6f0;
  --detail-border: #eee9e5;
  --detail-text: #222;
  --detail-muted: #888;
  --detail-main-w: 65.7%;
  --detail-side-w: 30%;
}

body.detail-page {
  background: #fafafa;
  padding-bottom: 100px;
}

/* ===== Breadcrumb ===== */
.breadcrumb-wrap {
  background: #fff;
  border-bottom: 1px solid var(--detail-border);
  padding: 14px 0;
}
.breadcrumb {
  font-size: 13px;
  color: var(--detail-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb a {
  color: var(--detail-muted);
}
.breadcrumb a:hover {
  color: var(--detail-orange);
}
.breadcrumb .sep { color: #ccc; }
.breadcrumb .current {
  color: var(--detail-text);
  font-weight: 500;
}

/* ===== Product head ===== */
.detail-head {
  background: #fff;
  padding: 22px 0 8px;
}
.detail-head h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--detail-text);
  margin-bottom: 12px;
}
.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 8px;
}
.detail-tags span {
  display: inline-block;
  font-size: 12px;
  color: var(--detail-orange);
  border: 1px dashed #ffca97;
  padding: 2px 8px;
  margin-right: 4px;
  margin-bottom: 4px;
  border-radius: 3px;
}
.detail-sold {
  font-size: 13px;
  color: var(--detail-muted);
}
.detail-sold strong {
  color: var(--detail-orange);
  font-weight: 600;
}
.detail-code {
  font-size: 12px;
  color: #aaa;
}

/* ===== Top flex: gallery + cream panel ===== */
.detail-top {
  background: #fff;
  padding: 16px 0 28px;
}
.detail-top-row {
  display: flex;
  gap: 3.5%;
  align-items: stretch;
}
.detail-gallery {
  width: var(--detail-main-w);
  flex-shrink: 0;
}
.detail-buybox {
  width: var(--detail-side-w);
  flex-shrink: 0;
  background: var(--detail-panel);
  border: 1px solid #f3e4d6;
  border-radius: 8px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
}

/* Gallery Swiper */
.gallery-main {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #eee;
}
.gallery-main .swiper-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.gallery-main .swiper-button-next,
.gallery-main .swiper-button-prev {
  color: #fff;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,.35);
  border-radius: 50%;
}
.gallery-main .swiper-button-next:after,
.gallery-main .swiper-button-prev:after {
  font-size: 14px;
  font-weight: 700;
}
.gallery-thumbs {
  height: 72px;
}
.gallery-thumbs .swiper-slide {
  opacity: 0.55;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: opacity .2s, border-color .2s;
}
.gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--detail-orange);
}
.gallery-thumbs .swiper-slide img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  display: block;
}

/* Buy box */
.buybox-label {
  font-size: 13px;
  color: var(--detail-muted);
  margin-bottom: 6px;
}
.buybox-duration {
  font-size: 15px;
  color: var(--detail-text);
  margin-bottom: 14px;
}
.buybox-duration strong {
  color: var(--detail-orange);
}
.buybox-price-row {
  margin-bottom: 8px;
}
.buybox-price {
  color: var(--detail-orange);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}
.buybox-price small {
  font-size: 14px;
  font-weight: 500;
  margin-left: 4px;
}
.buybox-note {
  font-size: 12px;
  color: var(--detail-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}
.buybox-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.btn-date,
.btn-consult {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .2s, color .2s;
}
.btn-date {
  background: var(--detail-orange);
  color: #fff;
}
.btn-date:hover { background: var(--detail-orange-hover); }
.btn-consult {
  background: #fff;
  color: var(--detail-orange);
  border: 1px solid var(--detail-orange);
}
.btn-consult:hover {
  background: var(--detail-orange);
  color: #fff;
}
.buybox-extra {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e8d5c4;
  font-size: 12px;
  color: var(--detail-muted);
  line-height: 1.8;
}
.buybox-extra i {
  color: var(--detail-orange);
  font-style: normal;
  margin-right: 4px;
}

/* 购买栏元信息列表行 — buybox meta list rows */
.buybox-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.7;
  border-bottom: 1px dashed #e8d5c4;
  padding-bottom: 14px;
}
.buybox-meta li {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dotted #f0e6dc;
}
.buybox-meta li:last-child { border-bottom: none; }
.buybox-meta-label {
  flex-shrink: 0;
  width: 72px;
  color: var(--detail-muted);
}
.buybox-meta-value {
  flex: 1;
  color: var(--detail-text);
  word-break: break-word;
}

/* 价格说明与提示气泡 — price note tooltip */
.price-note-wrap {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  position: relative;
}
.price-note-tip {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  color: var(--detail-muted);
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  cursor: help;
  vertical-align: middle;
}
.price-note-tip:hover + .price-note-tooltip,
.price-note-tip:focus + .price-note-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.price-note-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 10;
  min-width: 200px;
  max-width: 260px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 11px;
  line-height: 1.55;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s, visibility .2s;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.price-note-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 12px;
  border: 5px solid transparent;
  border-top-color: #333;
}

/* ===== Sticky tab nav ===== */
.navbar-list-box {
  background: #fff;
  border-bottom: 1px solid var(--detail-border);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.navbar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  overflow-x: auto;
}
.navbar-list a {
  display: block;
  padding: 14px 20px;
  font-size: 14px;
  color: #555;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
}
.navbar-list a:hover {
  color: var(--detail-orange);
}
.navbar-list a.active {
  color: var(--detail-orange);
  border-bottom-color: var(--detail-orange);
  font-weight: 600;
}

/* ===== Main content + sticky form ===== */
.detail-body {
  padding: 28px 0 40px;
}
.detail-body-row {
  display: flex;
  gap: 3.5%;
  align-items: flex-start;
}
.detail-main {
  width: var(--detail-main-w);
  flex-shrink: 0;
}
.detail-aside {
  width: var(--detail-side-w);
  flex-shrink: 0;
  position: sticky;
  top: 56px;
}

.detail-section {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--detail-border);
  padding: 24px 26px;
  margin-bottom: 20px;
  scroll-margin-top: 70px;
}
.detail-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--detail-text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--detail-orange);
  display: inline-block;
  min-width: 120px;
}

/* Intro blurb */
.tour-intro {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 8px;
}

/* Accordion itinerary */
.itinerary-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}
.itinerary-toolbar button {
  background: none;
  border: none;
  color: var(--detail-orange);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}
.itinerary-toolbar button:hover { text-decoration: underline; }

.day-item {
  border: 1px solid var(--detail-border);
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fffaf5;
  user-select: none;
  transition: background .2s;
}
.day-header:hover { background: #fff3e6; }
.day-item.open .day-header {
  background: linear-gradient(90deg, #fff3e6, #fffaf5);
  border-bottom: 1px solid #f3e4d6;
}
.day-badge {
  flex-shrink: 0;
  background: var(--detail-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}
.day-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--detail-text);
}
.day-toggle {
  color: var(--detail-orange);
  font-size: 18px;
  line-height: 1;
  transition: transform .25s;
}
.day-item.open .day-toggle { transform: rotate(45deg); }
.day-body {
  display: none;
  padding: 16px 18px 18px;
  font-size: 14px;
  line-height: 1.85;
  color: #444;
}
.day-item.open .day-body { display: block; }
.day-body p { margin-bottom: 10px; }
.day-body p:last-child { margin-bottom: 0; }
.day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #eee;
  font-size: 13px;
  color: var(--detail-muted);
}
.day-meta span strong {
  color: #555;
  font-weight: 500;
}

/* Dates / price */
.dates-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--detail-border);
}
.dates-tabs button {
  background: none;
  border: none;
  padding: 10px 22px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dates-tabs button.active {
  color: var(--detail-orange);
  border-bottom-color: var(--detail-orange);
  font-weight: 600;
}
.dates-panel { display: none; }
.dates-panel.active { display: block; }

.dates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dates-table th,
.dates-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #f0ebe6;
}
.dates-table th {
  background: #fffaf5;
  color: #666;
  font-weight: 600;
  font-size: 13px;
}
.dates-table tr:hover td { background: #fffaf8; }
.dates-table .price-cell {
  color: var(--detail-orange);
  font-weight: 700;
}
.btn-book {
  display: inline-block;
  padding: 6px 16px;
  background: var(--detail-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.btn-book:hover { background: var(--detail-orange-hover); }
.status-ok { color: #2e9b4e; font-size: 13px; }
.status-hot { color: var(--detail-orange); font-size: 13px; }

/* Calendar */
.calendar-wrap {
  max-width: 360px;
}
.calendar-wrap .ui-datepicker {
  width: 100%;
  border: 1px solid var(--detail-border);
  border-radius: 8px;
  padding: 12px;
  font-family: inherit;
  background: #fff;
  box-shadow: none;
}
.calendar-wrap .ui-datepicker-header {
  background: var(--detail-panel);
  border: none;
  border-radius: 6px;
  color: var(--detail-text);
  padding: 8px 0;
}
.calendar-wrap .ui-datepicker-title { font-size: 15px; font-weight: 600; }
.calendar-wrap .ui-datepicker th {
  color: var(--detail-muted);
  font-weight: 500;
  font-size: 12px;
}
.calendar-wrap .ui-state-default {
  background: #fff;
  border: 1px solid transparent;
  text-align: center;
  color: #444;
  border-radius: 4px;
}
.calendar-wrap .ui-state-active,
.calendar-wrap .ui-state-highlight,
.calendar-wrap .has-departure a.ui-state-default {
  background: var(--detail-orange) !important;
  color: #fff !important;
  border-color: var(--detail-orange) !important;
}
.calendar-wrap .ui-datepicker-calendar td a:hover {
  background: #fff3e6;
  border-color: #ffca97;
  color: var(--detail-orange);
}
.calendar-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--detail-muted);
  line-height: 1.7;
}
.calendar-hint .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--detail-orange);
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Expense */
.expense-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.expense-col h3 {
  font-size: 15px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 4px;
}
.expense-col.includes h3 {
  background: #e8f7ec;
  color: #2e9b4e;
}
.expense-col.excludes h3 {
  background: #fff0f0;
  color: #d45050;
}
.expense-col ul {
  list-style: none;
  padding: 0;
}
.expense-col li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  border-bottom: 1px dashed #f0ebe6;
}
.expense-col.includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2e9b4e;
  font-weight: 700;
}
.expense-col.excludes li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: #d45050;
  font-weight: 700;
}

/* Why choose */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.why-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fffaf5;
  border-radius: 8px;
  border: 1px solid #f3e4d6;
}
.why-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f98516, #f9aa5e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}
.why-item h4 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--detail-text);
}
.why-item p {
  font-size: 13px;
  color: var(--detail-muted);
  line-height: 1.6;
}

/* Reviews */
.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-card {
  padding: 16px 18px;
  border: 1px solid var(--detail-border);
  border-radius: 8px;
  background: #fff;
}
.review-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.review-user {
  font-weight: 600;
  font-size: 14px;
  color: var(--detail-text);
}
.review-date {
  font-size: 12px;
  color: var(--detail-muted);
  margin-top: 2px;
}
.review-stars {
  color: var(--detail-orange);
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.review-body {
  font-size: 14px;
  line-height: 1.75;
  color: #444;
}

/* Inquiry form */
.inquiry-box {
  background: #fff;
  border: 1px solid var(--detail-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.inquiry-box .inquiry-head {
  background: linear-gradient(90deg, var(--detail-orange), var(--detail-orange-hover));
  color: #fff;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
}
.inquiry-box .inquiry-body { padding: 18px; }
.inquiry-box .form-group { margin-bottom: 12px; }
.inquiry-box label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 5px;
}
.inquiry-box label .req { color: #d45050; }
.inquiry-box input,
.inquiry-box textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
.inquiry-box input:focus,
.inquiry-box textarea:focus {
  border-color: var(--detail-orange);
}
.inquiry-box textarea { resize: vertical; min-height: 80px; }
.inquiry-box .formerror {
  display: none;
  font-size: 12px;
  color: #d45050;
  margin-top: 4px;
}
.inquiry-box .formerror.visible { display: block; }
.inquiry-box .btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--detail-orange);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
.inquiry-box .btn-submit:hover { background: var(--detail-orange-hover); }
.inquiry-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--detail-muted);
  line-height: 1.6;
  text-align: center;
}

/* Related tours */
.related-section {
  margin-top: 8px;
  margin-bottom: 20px;
}
.related-section > h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--detail-text);
}
.related-section > h2 span {
  display: inline-block;
  border-bottom: 2px solid var(--detail-orange);
  padding-bottom: 8px;
}

/* Modal */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-mask.open {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--detail-border);
  background: var(--detail-panel);
}
.modal-head h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--detail-text);
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--detail-orange); }
.modal-body { padding: 20px; }
.modal-body .form-group { margin-bottom: 14px; }
.modal-body label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 5px;
}
.modal-body label .req { color: #d45050; }
.modal-body input,
.modal-body select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.modal-body input:focus,
.modal-body select:focus { border-color: var(--detail-orange); }
.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-footer {
  padding: 0 20px 20px;
}
.modal-footer .btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--detail-orange);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.modal-footer .btn-submit:hover { background: var(--detail-orange-hover); }

/* Header link fixes for detail */
.detail-page .logo { cursor: pointer; }
.detail-page .header-ul .active { /* keep homepage style */ }

/* Responsive */
@media (max-width: 1000px) {
  .detail-top-row,
  .detail-body-row {
    flex-direction: column;
    gap: 20px;
  }
  .detail-gallery,
  .detail-buybox,
  .detail-main,
  .detail-aside {
    width: 100%;
  }
  .detail-aside {
    position: static;
    order: 2;
  }
  .detail-main { order: 1; }
  .gallery-main .swiper-slide img { height: 280px; }
  .expense-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }
  .detail-head h1 { font-size: 20px; }
  .buybox-price { font-size: 28px; }
  .navbar-list a { padding: 12px 14px; font-size: 13px; }
  .dates-table { font-size: 13px; }
  .dates-table th,
  .dates-table td { padding: 10px 6px; }
  .modal-row { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .detail-section { padding: 18px 14px; }
  .gallery-main .swiper-slide img { height: 220px; }
  .gallery-thumbs { height: 56px; }
  .gallery-thumbs .swiper-slide img { height: 52px; }
  .hide-mobile-aside { display: none; }
}
