/* =========================================================
   SECTION — Tour detail booking area, restyled to the new design
   (doc/TOUR-DETAIL-REDESIGN.md §3.3). LOOK ONLY: same markup, same layout,
   same JS hooks. Fonts, colours, backgrounds, borders, radius, buttons.

   Desktop (#desktopView, > 990px):  breadcrumbs · tour options card ·
     add-ons card (.tour_option_section2) · Order Detail card (.add_to_cart_pos)
   Mobile / tablet (#mobileView, <= 990px):  product card (.tb-product) ·
     add-ons card (.tb-addons) · bottom bar (.mob_add_cart_button) · receipt (#receipt)

   The old style.css still loads (and uses !important in places), so rules are
   scoped to .page-tour-detail and use !important only where the old rule does.
   ========================================================= */

/* ---------- Shared: font + container width aligned with the hero ---------- */
.page-tour-detail #desktopView.container {
  max-width: var(--container-max);
  padding-inline: var(--gutter);   /* row −12px + col 12px → cards line up with the hero */
}
.page-tour-detail #desktopView .breadcrumb,
.page-tour-detail .tour_option_section2,
.page-tour-detail .add_to_cart_pos,
.page-tour-detail .tb-product,
.page-tour-detail .tb-addons,
.page-tour-detail .mob_add_cart_button,
.page-tour-detail .receipt_container {
  font-family: var(--font-base);
  color: var(--color-navy);
  -webkit-font-smoothing: antialiased;
}

/* Colour utilities of the old design, inside these sections only */
.page-tour-detail :is(.tour_option_section2, .add_to_cart_pos, .tb-product, .tb-addons, .receipt_container) .text_info { color: var(--color-primary) !important; }
.page-tour-detail :is(.tour_option_section2, .add_to_cart_pos, .tb-product, .tb-addons, .receipt_container) :is(.text_blue, .text_orange, .text_sparkblue) { color: var(--color-navy); }
.page-tour-detail :is(.tour_option_section2, .add_to_cart_pos, .tb-product, .tb-addons, .receipt_container) .text_grey { color: var(--color-slate) !important; }
.page-tour-detail :is(.tour_option_section2, .add_to_cart_pos, .tb-product, .tb-addons, .receipt_container) .text-danger { color: var(--color-danger) !important; }
.page-tour-detail :is(.add_to_cart_pos, .receipt_container, .tb-addons, .tour_option_section2) .addons_badge.bg_orange { background-color: var(--color-primary); }

/* Cards */
.page-tour-detail .tour_option_section2 > .card.tour_detail_card,
.page-tour-detail .add_to_cart_pos.tour_detail_card,
.page-tour-detail .tb-product,
.page-tour-detail .tb-addons {
  border: 1px solid #EEF1F5;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(8, 26, 40, .08);
  background-color: var(--color-white);
}

/* Form fields (select, date, number inputs) */
.page-tour-detail :is(.tour_option_section2, .tb-product) .passenger_form_input,
.page-tour-detail :is(.tour_option_section2, .tb-product) .pessenger_box_height {
  border: 1px solid #D5DBE3 !important;
  border-radius: 10px !important;
  color: var(--color-navy);
  font-family: var(--font-base);
  font-size: 14px !important;
  font-weight: 500 !important;
  background-color: var(--color-white);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.page-tour-detail :is(.tour_option_section2, .tb-product) :is(.passenger_form_input, .pessenger_box_height, .tour_date):focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px var(--color-primary-30);
  outline: none;
}
.page-tour-detail :is(.tour_option_section2, .tb-product) :is(.passenger_form_input, .pessenger_box_height):disabled {
  background-color: var(--color-light);
  border-color: #E4E8EE !important;
  color: var(--color-gray);
}
.page-tour-detail :is(.tour_option_section2, .tb-addons, .tb-product) .form-check-input {
  border-color: #B7C1CE;
  cursor: pointer;
}
.page-tour-detail :is(.tour_option_section2, .tb-addons, .tb-product) .form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.page-tour-detail :is(.tour_option_section2, .tb-addons, .tb-product) .form-check-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-30);
}

/* =========================================================
   DESKTOP
   ========================================================= */

/* ---------- Breadcrumbs ---------- */
.page-tour-detail #desktopView .breadcrumb {
  margin: 4px 0 18px;
  font-size: 14px;
  line-height: 20px;
}
.page-tour-detail #desktopView .breadcrumb .breadcrumb_link { color: var(--color-slate); text-decoration: none; transition: color .2s ease; }
.page-tour-detail #desktopView .breadcrumb .breadcrumb_link:hover,
.page-tour-detail #desktopView .breadcrumb .breadcrumb_link:focus-visible { color: var(--color-primary); }
.page-tour-detail #desktopView .breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--color-gray); }
.page-tour-detail #desktopView .breadcrumb .breadcrumb-item.active,
.page-tour-detail #desktopView .breadcrumb .breadcrumb-item.active span { color: var(--color-navy) !important; font-weight: 600 !important; }

/* ---------- Tour options card ---------- */
.page-tour-detail .tour_option_section2 .tour_option_section p.fw-bold { color: var(--color-navy); font-weight: 600 !important; font-size: 14px; }
.page-tour-detail .tour_option_section2 .tour_option_section + .tour_option_section { border-top: 1px solid #EEF1F5; }
.page-tour-detail .tour_option_section2 .change_saleprice { color: var(--color-primary) !important; font-weight: 700 !important; font-size: 18px !important; }
.page-tour-detail .tour_option_section2 .regularpricediv,
.page-tour-detail .tour_option_section2 .regularpricediv .change_regularprice { font-size: 13px !important; }
.page-tour-detail .tour_option_section2 .change_save { font-weight: 600 !important; }

/* number inputs: arrow buttons */
.page-tour-detail .tour_option_section2 .arrow-buttons button { color: var(--color-primary); }
.page-tour-detail .tour_option_section2 .arrow-buttons button:hover { color: var(--color-navy); }

/* ---------- Add-ons card ---------- */
.page-tour-detail .tour_option_section2 h2.fs_18 { color: var(--color-navy); font-weight: 700 !important; font-size: 18px; }
.page-tour-detail .tour_option_section2 h2.fs_18 + p { color: var(--color-slate); font-size: 14px; }
.page-tour-detail .tour_option_section2 .addons_container { scrollbar-color: var(--color-primary) var(--color-light); }
.page-tour-detail .tour_option_section2 .addons_container .card.tour_detail_card {
  border: 1px solid #E4E8EE;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  transition: border-color .2s ease, background-color .2s ease;
}
.page-tour-detail .tour_option_section2 .addons_container .card.tour_detail_card:hover { border-color: var(--color-primary-30); }
.page-tour-detail .tour_option_section2 .addons_container .card.tour_detail_card:has(.addons_checkbox:checked) {
  border-color: var(--color-primary);
  background-color: #F5F8FD;
}
.page-tour-detail .tour_option_section2 .addon_image_container img { border-radius: 10px !important; }

/* Add-on photo preview on hover. position: fixed so the card (overflow: hidden) and the scrolling
   .addons_container don't clip it; top / left / --arrow-y are set by the hover script in tour_detail.php.
   Name bar (old markup: absolute strip under the photo) shown as a caption below the photo. */
.page-tour-detail .tour_option_section2 .addon_image_popup {
  position: fixed;
  top: 0;
  left: 0;
  bottom: auto;
  width: 280px;
  height: auto;
  padding: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--color-white);
  box-shadow: 0 18px 44px rgba(8, 26, 40, .28);
  z-index: 1055;
  pointer-events: none;
}
.page-tour-detail .tour_option_section2 .addon_image_container:hover .addon_image_popup {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}
.page-tour-detail .tour_option_section2 .addon_image_popup > img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.page-tour-detail .tour_option_section2 .addon_image_popup > .position-absolute {
  position: static !important;
  margin: 0 !important;
  padding: 2px 6px 4px;
  background: transparent !important;
}
.page-tour-detail .tour_option_section2 .addon_image_popup > .position-absolute .text-white {
  color: var(--color-navy) !important;
  font-size: 15px;
}
.page-tour-detail .tour_option_section2 .addon_image_popup::before {
  top: var(--arrow-y, 50%);
  bottom: auto;
  left: -10px;
  transform: translateY(-50%);
  border-top-width: 10px;
  border-bottom-width: 10px;
  border-right: 10px solid var(--color-white);
}
.page-tour-detail .tour_option_section2 .change_addonssaleprice { color: var(--color-primary) !important; font-weight: 700 !important; }

/* ---------- Order Detail card ---------- */
.page-tour-detail .add_to_cart_pos.tour_detail_card { overflow: hidden; }
.page-tour-detail .add_to_cart_pos .card-header.bg_orange {
  background-color: var(--color-primary);
  padding: 12px 16px !important;
}
.page-tour-detail .add_to_cart_pos .card-header h5 { font-size: 16px !important; font-weight: 600 !important; letter-spacing: -0.01em; }
.page-tour-detail .add_to_cart_pos .card-body { padding: 4px 6px; }
.page-tour-detail .add_to_cart_pos h5.limited_description_2 { color: var(--color-navy); font-weight: 600 !important; }
.page-tour-detail .add_to_cart_pos .card-body hr,
.page-tour-detail .add_to_cart_pos .border-bottom { border-color: #EEF1F5 !important; opacity: 1; }
.page-tour-detail .add_to_cart_pos .grand_total { color: var(--color-primary) !important; font-weight: 700 !important; }
.page-tour-detail .add_to_cart_pos .order_detail_footer { background: var(--color-white); padding: 4px 12px 14px !important; }

/* Tour photo: was stretched (portrait photo forced into 100×76) */
.page-tour-detail .add_to_cart_pos img.rounded-3,
.page-tour-detail .receipt_container img.rounded-3 {
  flex: 0 0 100px;
  width: 100px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px !important;
}

/* Buy Now (outline) / Add to cart (filled), pill buttons as in the design system */
.page-tour-detail .add_to_cart_pos .btn_buynow,
.page-tour-detail .add_to_cart_pos .btn_add_to_art {
  height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.page-tour-detail .add_to_cart_pos .btn_buynow {
  background-color: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-primary) !important;
}
.page-tour-detail .add_to_cart_pos .btn_buynow:hover,
.page-tour-detail .add_to_cart_pos .btn_buynow:focus-visible {
  background-color: var(--color-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary) !important;
}
.page-tour-detail .add_to_cart_pos .btn_add_to_art {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 1px solid var(--color-primary) !important;
}
.page-tour-detail .add_to_cart_pos .btn_add_to_art:hover,
.page-tour-detail .add_to_cart_pos .btn_add_to_art:focus-visible {
  background-color: #2a5490;
  color: var(--color-white);
  border: 1px solid #2a5490 !important;
}
.page-tour-detail .add_to_cart_pos :is(.btn_buynow, .btn_add_to_art):focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }

/* =========================================================
   MOBILE / TABLET (#mobileView)
   ========================================================= */

/* ---------- Product card ---------- */
.page-tour-detail .tb-product { margin-inline: var(--gutter); overflow: hidden; }
.page-tour-detail .tb-product > .px-3:first-child { padding: 10px 14px 6px !important; border-bottom: 1px solid #EEF1F5; }
.page-tour-detail .tb-product .tour_option_section.bg-white { border-radius: 0; padding-top: 10px !important; }
.page-tour-detail .tb-product .change_saleprice { color: var(--color-primary) !important; font-size: 15px !important; font-weight: 700 !important; }
.page-tour-detail .tb-product .tour_date {
  height: 42px;
  padding: 4px 10px;
  border: 1px solid #D5DBE3;
  border-radius: 10px;
  color: var(--color-navy);
  font-family: var(--font-base);
}
.page-tour-detail .tb-product .border_style {
  border: 1px solid #D5DBE3 !important;
  border-radius: 10px !important;
  overflow: hidden;
  background: var(--color-white);
}
.page-tour-detail .tb-product .border_style button { color: var(--color-primary); background: transparent; }
.page-tour-detail .tb-product .border_style button:active { background: var(--color-light); }
.page-tour-detail .tb-product .custom-radio input[type="radio"] { accent-color: var(--color-primary); }
.page-tour-detail .tb-product .custom-radio label { color: var(--color-navy); }

/* ---------- Add-ons card ---------- */
.page-tour-detail .tb-addons { margin-inline: var(--gutter); }
.page-tour-detail .tb-addons > h3.text_grey { color: var(--color-navy) !important; font-size: 16px !important; font-weight: 700 !important; }
.page-tour-detail .tb-addons .mob_tour_detail_card {
  border: 1px solid #E4E8EE;
  border-radius: 12px;
  box-shadow: none;
  background-color: var(--color-white) !important;   /* the add-on JS sets an inline grey; the selected state is below */
  overflow: hidden;
  transition: border-color .2s ease, background-color .2s ease;
}
.page-tour-detail .tb-addons .mob_tour_detail_card:has(.addons_checkbox:checked) {
  border-color: var(--color-primary);
  background-color: #F5F8FD !important;
}
.page-tour-detail .tb-addons .tours_addons_img { object-fit: cover; }
.page-tour-detail .tb-addons .mob_tour_addons_buttons .btn-light {
  border: 0;
  background: var(--color-light);
  color: var(--color-primary);
  border-radius: 8px;
}
.page-tour-detail .tb-addons .change_addonssaleprice { color: var(--color-primary) !important; font-weight: 700 !important; }

/* ---------- Bottom bar (Total · Buy now · Add to Cart) ---------- */
.page-tour-detail .mob_add_cart_button.bg_teal {
  background-color: var(--color-primary);
  box-shadow: 0 -6px 20px rgba(8, 26, 40, .18);
}
.page-tour-detail .mob_add_cart_button h6 { font-family: var(--font-base); }
.page-tour-detail .mob_add_cart_button .grand_total { font-weight: 700; }
.page-tour-detail .mob_add_cart_button .change_save_leftside { color: rgba(255, 255, 255, .75) !important; }
.page-tour-detail .mob_add_cart_button .btn_add_cart {
  border-radius: var(--radius-pill);
  font-family: var(--font-base);
  font-weight: 600 !important;
  box-shadow: none;
  transition: background-color .2s ease, color .2s ease;
}
.page-tour-detail .mob_add_cart_button .btn_add_cart.buy_nowbtn {
  background-color: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-white);
}
.page-tour-detail .mob_add_cart_button .btn_add_cart.add_cartbtn {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-white);
}
.page-tour-detail .mob_add_cart_button .btn_add_cart.add_cartbtn:active { background-color: rgba(255, 255, 255, .15); }

/* ---------- Receipt drawer ---------- */
.page-tour-detail .receipt_container {
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px rgba(8, 26, 40, .25);
}
.page-tour-detail .receipt_container h5 { color: var(--color-navy); font-weight: 600 !important; }
.page-tour-detail .receipt_container .addon_card_bg2 { border-radius: 10px; }
.page-tour-detail .receipt_overlay { background: rgba(8, 26, 40, .55); }

/* Selected add-ons listed inside Order Detail / receipt (rows appended by the add-on JS: .addon_card_bg2 > .addons_card_bg) */
.page-tour-detail :is(.add_to_cart_pos, .receipt_container) .addons_card_bg2 { background: transparent !important; }
.page-tour-detail :is(.add_to_cart_pos, .receipt_container) .addons_card_bg {
  margin: 0 8px 6px;
  border-radius: 10px;
  background-color: var(--color-light) !important;
}
.page-tour-detail :is(.add_to_cart_pos, .receipt_container) .addons_card_bg img { object-fit: cover; flex: 0 0 auto; }
.page-tour-detail :is(.add_to_cart_pos, .receipt_container) .addons_card_bg .text_orange { color: var(--color-primary); font-weight: 600; }

/* ---------- Modals: More Information (#exampleModal) + Login Required (#exampleModal1) ---------- */
.page-tour-detail .tour-modal { font-family: 'Inter', sans-serif; }
.page-tour-detail .tour-modal .modal-dialog { max-width: 460px; padding-inline: 8px; }
.page-tour-detail .tour-modal#exampleModal .modal-dialog { max-width: 560px; }
.page-tour-detail .tour-modal .modal-content {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(8, 26, 40, .25);
  overflow: hidden;
}
.page-tour-detail .tour-modal .modal-header {
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 8px;
  border-bottom: 0;
}
.page-tour-detail .tour-modal .modal-title {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  color: var(--color-navy);
}
.page-tour-detail .tour-modal__subtitle { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--color-slate); }
.page-tour-detail .tour-modal .btn-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: -4px -6px 0 auto;
  padding: 0;
  border-radius: 50%;
  background-color: var(--color-light);
  background-size: 12px;
  opacity: .8;
}
.page-tour-detail .tour-modal .btn-close:hover { opacity: 1; }
.page-tour-detail .tour-modal .btn-close:focus { box-shadow: 0 0 0 3px var(--color-primary-30); }
.page-tour-detail .tour-modal .modal-body { padding: 16px 24px 24px; font-size: 15px; line-height: 24px; color: var(--color-dark); }
.page-tour-detail .tour-modal .modal-footer { padding: 12px 24px 20px; border-top: 1px solid #EEF0F3; }
.page-tour-detail .modal-backdrop.show { opacity: .55; }
.page-tour-detail .modal-backdrop { background-color: var(--color-navy); }

/* Login form inside the modal (form.css fields; row + switch from sections/auth.css) */
.page-tour-detail #exampleModal1 .form-stack { gap: 16px; }
.page-tour-detail #exampleModal1 .form-input { height: 48px; }
.page-tour-detail #exampleModal1 .auth-form__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-tour-detail #exampleModal1 .form-check-ds { margin: 0; }
.page-tour-detail #exampleModal1 .auth-form__switch { margin: 0; font-size: 14px; line-height: 20px; text-align: center; color: var(--color-slate); }
.page-tour-detail #exampleModal1 .form-link { text-decoration: none; }
.page-tour-detail #exampleModal1 .form-link:hover { text-decoration: underline; }
/* form.css loads after site.css on this page, so restate the error colours of the flash message */
.page-tour-detail #exampleModal1 .form-status--error { background: #FDECEE; color: #B42318; }

@media (max-width: 575.98px) {
  .page-tour-detail .tour-modal .modal-header { padding: 20px 20px 4px; }
  .page-tour-detail .tour-modal .modal-body { padding: 14px 20px 20px; }
  .page-tour-detail .tour-modal .modal-title { font-size: 20px; line-height: 26px; }
}
