:root {
  --navy: #052e4d;
  --navy-deep: #031e33;
  --ocean: #087fc1;
  --ocean-dark: #066aa2;
  --aqua: #63d5e6;
  --white: #ffffff;
  --ink: #092941;
  --muted: #657a89;
  --soft: #f2f8fb;
  --line: #dce8ee;
  --radius: 18px;
  --shadow: 0 20px 55px rgba(4, 45, 75, .13);
  --container: min(1240px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: "DM Sans", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button, input { color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.detail-header { background: var(--navy-deep); border-bottom: 1px solid rgba(255, 255, 255, .16); }
.detail-header-inner { width: var(--container); min-height: 92px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.detail-brand { display: inline-flex; align-items: center; }
.detail-brand img { width: auto; height: 76px; object-fit: contain; }
.back-link { min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--white); border: 1px solid rgba(255, 255, 255, .6); border-radius: 8px; font-weight: 700; transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.back-link:hover { color: var(--navy); background: var(--white); }
.back-link:active { transform: scale(.98); }

.detail-page { padding: 42px 0 90px; }
.detail-layout { width: var(--container); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .65fr); gap: 28px; align-items: start; }
.detail-content { min-width: 0; display: grid; gap: 28px; }
.gallery-card, .information-card, .booking-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery-card { padding: 14px; }
.gallery-main { overflow: hidden; height: clamp(360px, 42vw, 540px); border-radius: 12px; background: #dcecf3; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbnails { margin-top: 10px; display: grid; grid-template-columns: repeat(var(--gallery-columns, 3), minmax(0, 1fr)); gap: 10px; }
.gallery-thumb { height: 132px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #dcecf3; transition: border-color .2s ease, opacity .2s ease, transform .2s ease; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: .82; }
.gallery-thumb:active { transform: scale(.98); }
.gallery-thumb.is-active { border-color: var(--ocean); }
.gallery-thumb:focus-visible, .back-link:focus-visible, .confirm-button:focus-visible, .counter button:focus-visible, input:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

.booking-shortcut { display: none; }

.information-card { padding: clamp(28px, 4vw, 50px); }
.eyebrow { margin: 0 0 12px; color: var(--ocean); font: 800 11px/1.3 "Manrope", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Manrope", sans-serif; letter-spacing: -.04em; }
h1 { max-width: 780px; margin-bottom: 28px; font-size: clamp(42px, 5vw, 66px); line-height: .98; }
h2 { margin-bottom: 14px; font-size: clamp(26px, 3vw, 36px); line-height: 1.08; }
.tour-facts { padding: 20px 0; display: grid; grid-template-columns: 1.15fr .8fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tour-fact { min-width: 0; padding: 0 18px; border-right: 1px solid var(--line); }
.tour-fact:first-child { padding-left: 0; }
.tour-fact:last-child { padding-right: 0; border-right: 0; }
.tour-fact.is-last-visible { padding-right: 0; border-right: 0; }
.tour-fact span, .booking-price span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.tour-fact strong { display: block; font: 700 15px/1.35 "Manrope", sans-serif; }
.content-block { margin-top: 38px; }
.content-block > p { max-width: 770px; margin-bottom: 0; color: var(--muted); font-size: 16px; }
.content-block .tour-inclusions { max-width: 770px; margin-top: 28px; }
.tour-inclusions h3 { margin-bottom: 14px; font-size: clamp(20px, 2vw, 24px); line-height: 1.3; }
.tour-inclusions ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 16px; }
.tour-inclusions li { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; }
.tour-inclusions .tour-inclusion-check { color: var(--ocean); font-weight: 700; }

.booking-panel { position: sticky; top: 24px; padding: 30px; }
.booking-panel h2 { margin-bottom: 22px; font-size: 32px; }
.booking-price { margin-bottom: 24px; padding: 16px 18px; border-radius: 12px; background: var(--soft); }
.booking-price strong { display: block; color: var(--ocean); font: 800 22px/1.25 "Manrope", sans-serif; }
.booking-panel.is-fixed-price .booking-price small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.booking-panel.is-fixed-price .date-field { margin-bottom: 0; }
.booking-panel.is-fixed-price .confirm-button { margin-top: 24px; }
.date-field { display: grid; gap: 9px; margin-bottom: 26px; font-weight: 700; }
.date-field input { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid #c9d9e2; border-radius: 8px; background: var(--white); }
.date-field input:focus { border-color: var(--ocean); }
.passenger-fieldset { padding: 0; margin: 0; border: 0; }
.passenger-fieldset legend { margin-bottom: 12px; font: 800 20px/1.2 "Manrope", sans-serif; }
.passenger-row { min-height: 86px; margin-bottom: 10px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 12px; background: var(--soft); }
.passenger-row strong, .passenger-row small { display: block; }
.passenger-row small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.counter { display: grid; grid-template-columns: 36px 24px 36px; gap: 6px; align-items: center; text-align: center; }
.counter button { width: 36px; height: 36px; padding: 0; border: 1px solid #cbd8df; border-radius: 50%; background: var(--white); color: var(--navy); font-size: 22px; line-height: 1; transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.counter button:hover { color: var(--white); background: var(--navy); }
.counter button:active { transform: scale(.94); }
.counter output { font-weight: 800; }
.booking-error { margin: 14px 0 0; color: #b64536; font-size: 13px; font-weight: 700; }
.confirm-button { width: 100%; min-height: 56px; margin-top: 20px; border: 0; border-radius: 8px; color: var(--white); background: var(--ocean); font-weight: 800; transition: background-color .2s ease, transform .2s ease; }
.confirm-button:hover { background: var(--ocean-dark); }
.confirm-button:active { transform: scale(.98); }
.booking-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 960px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
  .booking-panel { padding: 24px; }
  .gallery-main { height: 410px; }
}

@media (max-width: 820px) {
  :root { --container: min(100% - 30px, 680px); }
  .detail-header-inner { min-height: 78px; }
  .detail-brand img { height: 64px; }
  .back-link { min-height: 42px; padding-inline: 14px; font-size: 13px; }
  .detail-page { padding: 24px 0 64px; }
  .detail-layout { grid-template-columns: 1fr; }
  .booking-panel { position: static; }
  .gallery-main { height: min(62vw, 430px); min-height: 250px; }
  .gallery-thumb { height: min(24vw, 140px); }
}

@media (max-width: 760px) {
  .tour-title-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; gap: 12px; margin-bottom: 28px; }
  .tour-title-row h1 { min-width: 0; margin-bottom: 0; overflow-wrap: anywhere; }
  .booking-shortcut { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; color: var(--ocean); background: transparent; transition: background-color .2s ease; }
  .booking-shortcut:hover { background: var(--soft); }
  .booking-shortcut:active { background: var(--line); }
  .booking-shortcut:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }
  .booking-panel { scroll-margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .booking-shortcut { transition: none; }
}

@media (max-width: 560px) {
  .detail-header-inner { gap: 12px; }
  .detail-brand img { height: 58px; }
  .back-link { max-width: 150px; text-align: center; line-height: 1.2; }
  .gallery-card { padding: 8px; border-radius: 14px; }
  .gallery-main { min-height: 220px; border-radius: 9px; }
  .gallery-thumbnails { gap: 6px; margin-top: 6px; }
  .gallery-thumbnails.has-more-images { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-thumb { border-radius: 7px; }
  .information-card, .booking-panel { padding: 24px 20px; border-radius: 14px; }
  h1 { font-size: clamp(32px, 8vw, 40px); }
  .tour-facts { grid-template-columns: 1fr; padding: 0; }
  .tour-fact, .tour-fact:first-child, .tour-fact:last-child { padding: 15px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .tour-fact:last-child { border-bottom: 0; }
  .date-field { width: 100%; min-width: 0; }
  .date-field input[type="date"] { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .passenger-row { padding: 14px; }
}
