/* ================================================================
   Morocco Tour Guide — Frontend Stylesheet v2.0
   Fully mobile-responsive, TripAdvisor-style
   ================================================================ */

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  --mtg-red:     #c0392b;
  --mtg-red2:    #96281b;
  --mtg-redlt:   #fdecea;
  --mtg-dark:    #1a1a2e;
  --mtg-text:    #2c3e50;
  --mtg-muted:   #6b7280;
  --mtg-border:  #e5e7eb;
  --mtg-bg:      #f8f9fa;
  --mtg-white:   #ffffff;
  --mtg-gold:    #d4a017;
  --mtg-green:   #16a34a;
  --mtg-shadow:  0 4px 16px rgba(0,0,0,.10);
  --mtg-shadhv:  0 12px 40px rgba(0,0,0,.18);
  --mtg-r:       12px;
  --mtg-tr:      all .25s ease;
  --f-display:   'Playfair Display', Georgia, serif;
  --f-body:      'DM Sans', system-ui, -apple-system, sans-serif;
}

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

.mtg-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

img { max-width: 100%; height: auto; }

/* ── Buttons ──────────────────────────────────────────────────── */
.mtg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: .9rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 8px;
  border: 2px solid var(--mtg-red);
  background: var(--mtg-red);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: var(--mtg-tr);
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}
.mtg-btn:hover { background: var(--mtg-red2); border-color: var(--mtg-red2); color: #fff; text-decoration: none; }
.mtg-btn-outline { background: transparent; color: var(--mtg-red); }
.mtg-btn-outline:hover { background: var(--mtg-red); color: #fff; }
.mtg-btn-ghost { background: transparent; color: var(--mtg-muted); border-color: var(--mtg-border); }
.mtg-btn-ghost:hover { border-color: var(--mtg-muted); color: var(--mtg-text); }
.mtg-btn-block { width: 100%; }

/* ================================================================
   SEARCH SECTION  [tour_search]
   ================================================================ */
.mtg-search-wrap { font-family: var(--f-body); }

.mtg-search-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  padding: 50px 20px 44px;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.mtg-hero-title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  color: #fff;
  margin: 0 0 10px;
}

.mtg-hero-sub {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  margin: 0 0 24px;
}

.mtg-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  padding: 6px 6px 6px 18px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  gap: 8px;
}

.mtg-search-icon { font-size: 1rem; color: var(--mtg-muted); flex-shrink: 0; }

.mtg-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--f-body);
  font-size: .9rem;
  color: var(--mtg-text);
  background: transparent;
  min-width: 0;
}
.mtg-search-input::placeholder { color: #aaa; }

/* ── Filters bar ──────────────────────────────────────────────── */
.mtg-filters {
  background: #fff;
  border-bottom: 1px solid var(--mtg-border);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.mtg-filters-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.mtg-filter-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 110px;
}

.mtg-filter-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mtg-muted);
  font-family: var(--f-body);
}

.mtg-select {
  font-family: var(--f-body);
  font-size: .83rem;
  border: 1.5px solid var(--mtg-border);
  border-radius: 8px;
  padding: 7px 26px 7px 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9' fill='none' stroke='%236b7280' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right 8px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--mtg-text);
  cursor: pointer;
}
.mtg-select:focus { border-color: var(--mtg-red); outline: none; }

.mtg-price-range { display: flex; align-items: center; gap: 5px; }
.mtg-price-in {
  width: 68px;
  border: 1.5px solid var(--mtg-border);
  border-radius: 6px;
  padding: 7px 6px;
  font-family: var(--f-body);
  font-size: .83rem;
  color: var(--mtg-text);
}
.mtg-price-in:focus { border-color: var(--mtg-red); outline: none; }

.mtg-results-info {
  font-size: .78rem;
  color: var(--mtg-muted);
  max-width: 1200px;
  margin: 6px auto 0;
}

/* Loading spinner */
.mtg-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 20px;
  font-family: var(--f-body);
  color: var(--mtg-muted);
}

.mtg-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--mtg-border);
  border-top-color: var(--mtg-red);
  border-radius: 50%;
  animation: mtg-spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes mtg-spin { to { transform: rotate(360deg); } }

/* ================================================================
   TOUR GRID  [tour_grid]
   ================================================================ */
.mtg-grid-section { padding: 28px 0; font-family: var(--f-body); }

.mtg-grid { display: grid; gap: 22px; }
.mtg-cols-1 { grid-template-columns: 1fr; }
.mtg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mtg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mtg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Tour Card ────────────────────────────────────────────────── */
.mtg-card {
  background: #fff;
  border-radius: var(--mtg-r);
  overflow: hidden;
  border: 1px solid var(--mtg-border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: var(--mtg-tr);
  display: flex;
  flex-direction: column;
}
.mtg-card:hover { box-shadow: var(--mtg-shadhv); transform: translateY(-4px); }

.mtg-card-img-wrap { position: relative; overflow: hidden; aspect-ratio: 4 / 3; flex-shrink: 0; }

.mtg-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.mtg-card:hover .mtg-card-img { transform: scale(1.06); }

.mtg-no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
}

/* Tags */
.mtg-tag {
  position: absolute;
  font-family: var(--f-body);
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
  line-height: 1;
}
.mtg-tag-featured { top: 12px; left: 12px; background: var(--mtg-gold); color: #000; }
.mtg-tag-sale { bottom: 12px; left: 12px; background: var(--mtg-red); color: #fff; }
.mtg-tag-cat { bottom: 12px; right: 12px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(4px); }

/* Wishlist button on card */
.mtg-wish-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.92);
  color: var(--mtg-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--mtg-tr);
  z-index: 3;
  padding: 0;
  line-height: 1;
}
.mtg-wish-btn:hover, .mtg-wish-btn.saved { color: var(--mtg-red); background: #fff; }

/* Card body */
.mtg-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mtg-card-loc { font-size: .77rem; color: var(--mtg-muted); }
.mtg-card-title { font-family: var(--f-display); font-size: 1.02rem; font-weight: 600; margin: 0; line-height: 1.3; }
.mtg-card-title a { color: var(--mtg-text); text-decoration: none; transition: color .2s; }
.mtg-card-title a:hover { color: var(--mtg-red); }
.mtg-card-desc { font-size: .82rem; color: var(--mtg-muted); margin: 0; line-height: 1.5; }
.mtg-card-dur { font-size: .77rem; color: var(--mtg-muted); }

.mtg-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--mtg-border);
  flex-wrap: wrap;
}

/* Stars */
.mtg-stars-wrap { display: inline-flex; gap: 1px; }
.mtg-card-stars { display: flex; align-items: center; gap: 4px; font-size: .77rem; flex-wrap: wrap; }
.mtg-star.full  { color: #f59e0b; }
.mtg-star.half  { color: #f59e0b; opacity: .7; }
.mtg-star.empty { color: #d1d5db; }
.mtg-avg { font-weight: 700; font-size: .83rem; color: var(--mtg-text); }
.mtg-rcnt { color: var(--mtg-muted); font-size: .77rem; }
.mtg-no-rating { font-size: .72rem; color: var(--mtg-muted); }

/* Price on card */
.mtg-card-price { text-align: right; flex-shrink: 0; }
.mtg-old-price { text-decoration: line-through; color: var(--mtg-muted); font-size: .77rem; display: block; }
.mtg-price { font-size: 1.18rem; font-weight: 700; color: var(--mtg-red); display: block; }
.mtg-pp { font-size: .7rem; color: var(--mtg-muted); }

/* No results */
.mtg-no-results { text-align: center; padding: 70px 20px; font-family: var(--f-body); }
.mtg-no-icon { font-size: 3rem; display: block; margin-bottom: 10px; }
.mtg-load-wrap { text-align: center; padding: 30px 0; }

/* ================================================================
   SINGLE TOUR PAGE — FULLY RESPONSIVE
   ================================================================ */
.mtg-single { font-family: var(--f-body); color: var(--mtg-text); }

/* Breadcrumb */
.mtg-bc {
  background: var(--mtg-bg);
  border-bottom: 1px solid var(--mtg-border);
  padding: 10px 0;
  font-size: .8rem;
  color: var(--mtg-muted);
}
.mtg-bc .mtg-container { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.mtg-bc a { color: var(--mtg-muted); text-decoration: none; }
.mtg-bc a:hover { color: var(--mtg-red); }
.mtg-bc span { margin: 0 4px; }

/* ── Main Layout: Desktop 2-col, Mobile 1-col ─────────────────── */
.mtg-single-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-areas: "main sidebar";
  gap: 36px;
  padding: 36px 20px 60px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.mtg-main  { grid-area: main; min-width: 0; }
.mtg-sidebar { grid-area: sidebar; }

/* ── Gallery ──────────────────────────────────────────────────── */
.mtg-gallery { margin-bottom: 24px; }

.mtg-gal-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--mtg-r);
  overflow: hidden;
  background: #ddd;
}

.mtg-gal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .3s ease;
}

.mtg-gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 2;
  padding: 0;
  line-height: 1;
}
.mtg-gal-nav:hover { background: var(--mtg-red); }
.mtg-gal-prev { left: 10px; }
.mtg-gal-next { right: 10px; }

.mtg-gal-count {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: 20px;
}

.mtg-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mtg-thumbs::-webkit-scrollbar { display: none; }

.mtg-thumb {
  width: 72px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: .6;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: var(--mtg-tr);
}
.mtg-thumb:hover { opacity: 1; }
.mtg-thumb.active { opacity: 1; border-color: var(--mtg-red); }

/* ── Tour Header ──────────────────────────────────────────────── */
.mtg-tour-header { margin-bottom: 24px; }

.mtg-cat-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.mtg-cat-pill {
  background: var(--mtg-redlt);
  color: var(--mtg-red);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 10px;
  border-radius: 20px;
}

.mtg-title {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 12px;
  color: var(--mtg-dark);
  line-height: 1.25;
}

.mtg-quick-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 14px;
  font-size: .83rem;
  color: var(--mtg-muted);
}

.mtg-hdr-rating { display: flex; align-items: center; gap: 5px; }

/* Share buttons */
.mtg-share { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--mtg-muted); }
.mtg-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 700;
  transition: var(--mtg-tr);
}
.mtg-share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); color: #fff; }
.mtg-share-fb { background: #1877f2; }
.mtg-share-tw { background: #000; }
.mtg-share-wa { background: #25d366; }

/* ── Sticky mobile booking bar ────────────────────────────────── */
/* This is shown ONLY on mobile — sits at bottom of screen */
.mtg-mobile-book-bar {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--mtg-border);
  padding: 12px 16px;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  align-items: center;
  gap: 12px;
}

.mtg-mobile-price-block { flex: 1; }
.mtg-mobile-price-block .mtg-main-price { font-family: var(--f-display); font-size: 1.5rem; font-weight: 700; color: var(--mtg-red); }
.mtg-mobile-price-block .mtg-pp { font-size: .72rem; color: var(--mtg-muted); }
.mtg-mobile-price-block .mtg-old { text-decoration: line-through; color: var(--mtg-muted); font-size: .8rem; display: block; }

.mtg-mobile-book-btn {
  flex-shrink: 0;
  padding: 12px 24px;
  font-size: .9rem;
}

/* ── Tabs ─────────────────────────────────────────────────────── */
.mtg-tabs { margin-bottom: 28px; }

.mtg-tab-nav {
  display: flex;
  border-bottom: 2px solid var(--mtg-border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  gap: 0;
}
.mtg-tab-nav::-webkit-scrollbar { display: none; }

.mtg-tab {
  font-family: var(--f-body);
  font-size: .875rem;
  font-weight: 600;
  color: var(--mtg-muted);
  background: none;
  border: none;
  padding: 11px 16px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: color .2s;
}
.mtg-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--mtg-red);
  transform: scaleX(0);
  transition: transform .2s;
}
.mtg-tab.active { color: var(--mtg-red); }
.mtg-tab.active::after { transform: scaleX(1); }
.mtg-tab:hover { color: var(--mtg-red); }

.mtg-tab-badge {
  background: var(--mtg-red);
  color: #fff;
  font-size: .62rem;
  border-radius: 20px;
  padding: 1px 6px;
  font-weight: 700;
}

.mtg-pane { display: none; padding-top: 20px; }
.mtg-pane.active { display: block; }

/* ── Highlights ───────────────────────────────────────────────── */
.mtg-highlights-box {
  background: linear-gradient(135deg, #fff8f0, #fff5f3);
  border: 1px solid #fde8d8;
  border-radius: var(--mtg-r);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.mtg-highlights-box h3 { font-family: var(--f-display); font-size: 1.05rem; margin: 0 0 12px; }
.mtg-hi-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.mtg-hi-list li {
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.mtg-hi-list li::before { content: '✓'; color: var(--mtg-green); font-weight: 700; flex-shrink: 0; }

/* Description */
.mtg-desc h3 { font-family: var(--f-display); font-size: 1.1rem; margin: 0 0 12px; }
.mtg-desc p { line-height: 1.7; margin-bottom: 12px; }
.mtg-info-box { background: var(--mtg-bg); border-radius: 8px; padding: 12px 16px; margin-top: 14px; font-size: .875rem; }

/* ── Itinerary ────────────────────────────────────────────────── */
.mtg-itin { display: flex; flex-direction: column; }

.mtg-itin-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  position: relative;
  padding-bottom: 20px;
}
.mtg-itin-item::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: var(--mtg-border);
}
.mtg-itin-item:last-child::before { display: none; }

.mtg-itin-day {
  background: var(--mtg-red);
  color: #fff;
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  height: fit-content;
  line-height: 1.3;
}
.mtg-itin-body h4 { font-family: var(--f-display); margin: 0 0 5px; font-size: .95rem; }
.mtg-itin-body p { margin: 0; font-size: .85rem; color: var(--mtg-muted); line-height: 1.6; }

/* ── Inclusions ───────────────────────────────────────────────── */
.mtg-inc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mtg-inc h3 { color: var(--mtg-green); font-family: var(--f-display); font-size: 1rem; margin: 0 0 12px; }
.mtg-exc h3 { color: var(--mtg-red);   font-family: var(--f-display); font-size: 1rem; margin: 0 0 12px; }
.mtg-inc ul, .mtg-exc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mtg-inc li, .mtg-exc li { font-size: .875rem; display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
.mtg-inc li::before { content: '✓'; color: var(--mtg-green); font-weight: 700; flex-shrink: 0; }
.mtg-exc li::before { content: '✕'; color: var(--mtg-red);   font-weight: 700; flex-shrink: 0; }

/* ── Reviews ──────────────────────────────────────────────────── */
.mtg-rating-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--mtg-bg);
  border-radius: var(--mtg-r);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.mtg-big-score { font-family: var(--f-display); font-size: 3rem; font-weight: 700; line-height: 1; }
.mtg-rcnt-label { font-size: .82rem; color: var(--mtg-muted); }

.mtg-reviews-list { margin-bottom: 28px; }

.mtg-review {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--mtg-border);
}

.mtg-rv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mtg-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.mtg-rv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: .82rem;
}
.mtg-rv-stars { display: flex; gap: 1px; font-size: .78rem; }
.mtg-rv-date  { color: var(--mtg-muted); font-size: .74rem; }
.mtg-rv-title { font-size: .88rem; margin: 0 0 3px; font-weight: 600; }
.mtg-rv-text  { font-size: .85rem; color: var(--mtg-muted); margin: 0; line-height: 1.6; }

/* Review form */
.mtg-review-form-wrap { background: var(--mtg-bg); border-radius: var(--mtg-r); padding: 20px; margin-top: 24px; }
.mtg-review-form-wrap h3 { font-family: var(--f-display); margin: 0 0 16px; }

.mtg-star-pick { display: flex; gap: 4px; font-size: 1.8rem; cursor: pointer; margin-bottom: 4px; }
.mtg-star-pick span { color: #d1d5db; transition: color .15s; line-height: 1; }
.mtg-star-pick span.on { color: #f59e0b; }

/* ── Form elements (shared) ───────────────────────────────────── */
.mtg-fg { margin-bottom: 12px; }
.mtg-fg label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 5px; color: var(--mtg-text); }

.mtg-in {
  width: 100%;
  border: 1.5px solid var(--mtg-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--f-body);
  font-size: .9rem;
  color: var(--mtg-text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.mtg-in:focus {
  border-color: var(--mtg-red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(192,57,43,.1);
}
textarea.mtg-in { resize: vertical; min-height: 90px; }

.mtg-form-row-2 { display: flex; gap: 12px; }
.mtg-form-row-2 > .mtg-fg { flex: 1; min-width: 0; }

/* Messages */
.mtg-msg { padding: 11px 15px; border-radius: 8px; font-size: .875rem; margin-bottom: 12px; }
.mtg-msg.ok  { background: #d4edda; color: #155724; }
.mtg-msg.err { background: #f8d7da; color: #721c24; }

/* ================================================================
   BOOKING SIDEBAR — Desktop sticky, Mobile hidden (bar at bottom)
   ================================================================ */
.mtg-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

.mtg-book-card {
  background: #fff;
  border: 1px solid var(--mtg-border);
  border-radius: var(--mtg-r);
  padding: 22px;
  box-shadow: var(--mtg-shadow);
}

/* Sidebar price */
.mtg-book-price { margin-bottom: 12px; }
.mtg-book-price .mtg-old { text-decoration: line-through; color: var(--mtg-muted); font-size: .88rem; display: block; }
.mtg-book-price .mtg-main-price { font-family: var(--f-display); font-size: 2rem; font-weight: 700; color: var(--mtg-red); line-height: 1; }
.mtg-book-price .mtg-pp { font-size: .76rem; color: var(--mtg-muted); margin-left: 5px; }

.mtg-book-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  color: var(--mtg-muted);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--mtg-border);
  flex-wrap: wrap;
}

/* Price calculator */
.mtg-price-calc { background: var(--mtg-bg); border-radius: 8px; padding: 11px 14px; margin: 12px 0; }
.mtg-pc-row { display: flex; justify-content: space-between; font-size: .84rem; color: var(--mtg-muted); padding: 3px 0; }
.mtg-pc-total { border-top: 1px solid var(--mtg-border); margin-top: 6px; padding-top: 8px; font-size: .92rem; color: var(--mtg-text); }

/* Book button */
.mtg-book-btn {
  font-size: 1rem;
  padding: 13px;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(192,57,43,.3);
  width: 100%;
}
.mtg-book-btn:hover { box-shadow: 0 6px 20px rgba(192,57,43,.45); transform: translateY(-1px); }

/* Perks list */
.mtg-perks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.mtg-perks li { font-size: .76rem; color: var(--mtg-muted); }

/* Stripe payment element */
#mtg-pay-element { border: 1.5px solid var(--mtg-border); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.mtg-secure { font-size: .72rem; color: var(--mtg-muted); margin: 6px 0 0; display: flex; align-items: center; gap: 4px; }

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Tablet — 1024px */
@media (max-width: 1024px) {
  .mtg-single-layout {
    grid-template-columns: 1fr 320px;
    gap: 28px;
    padding: 28px 20px 50px;
  }
  .mtg-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile — 768px: Stack layout, show sticky bottom bar */
@media (max-width: 768px) {

  /* Stack main + sidebar vertically, sidebar goes BELOW main */
  .mtg-single-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "sidebar";
    gap: 20px;
    padding: 16px 16px 90px; /* 90px bottom padding for mobile bar */
  }

  /* On mobile the full sidebar booking card is hidden — replaced by bottom bar */
  .mtg-sidebar {
    display: none;
  }

  /* Show mobile sticky book bar */
  .mtg-mobile-book-bar {
    display: flex;
  }

  /* Grid columns */
  .mtg-cols-3, .mtg-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .mtg-inc-grid { grid-template-columns: 1fr; }

  /* Filters */
  .mtg-filters-inner { gap: 8px; }
  .mtg-filter-group { min-width: 100px; }

  /* Search bar */
  .mtg-search-bar { flex-direction: column; border-radius: 12px; padding: 10px 14px; gap: 8px; }
  .mtg-search-input { width: 100%; }
  .mtg-search-bar .mtg-btn { width: 100%; border-radius: 8px; }

  /* Tabs */
  .mtg-tab { padding: 10px 12px; font-size: .82rem; }

  /* Gallery */
  .mtg-gal-main { aspect-ratio: 16 / 10; }

  /* Title */
  .mtg-title { font-size: 1.4rem; }

  /* Highlights grid */
  .mtg-hi-list { grid-template-columns: 1fr; }

  /* Itinerary */
  .mtg-itin-item { grid-template-columns: 54px 1fr; gap: 10px; }
  .mtg-itin-item::before { left: 27px; }

  /* Review form */
  .mtg-form-row-2 { flex-direction: column; gap: 0; }

  /* Breadcrumb */
  .mtg-bc .mtg-container { font-size: .75rem; }
}

/* Small mobile — 480px */
@media (max-width: 480px) {
  .mtg-cols-2, .mtg-cols-3, .mtg-cols-4 { grid-template-columns: 1fr; }

  .mtg-search-hero { padding: 36px 16px 30px; }

  .mtg-single-layout { padding: 14px 14px 88px; }

  .mtg-title { font-size: 1.3rem; }

  .mtg-quick-meta { gap: 8px 14px; font-size: .8rem; }

  .mtg-share { flex-wrap: wrap; }

  .mtg-gal-main { aspect-ratio: 4 / 3; }

  .mtg-thumb { width: 60px; height: 44px; }

  .mtg-filters { padding: 10px 14px; }

  /* Make filter groups full width on small screens */
  .mtg-filter-group { min-width: calc(50% - 10px); flex: 1; }

  .mtg-tab { padding: 10px 10px; font-size: .8rem; }

  .mtg-review { gap: 10px; }
  .mtg-rv-avatar { width: 36px; height: 36px; font-size: .9rem; }

  .mtg-mobile-book-bar { padding: 10px 14px; }
  .mtg-mobile-price-block .mtg-main-price { font-size: 1.3rem; }
}

/* ── Archive page ─────────────────────────────────────────────── */
.mtg-archive { padding: 36px 0; font-family: var(--f-body); }
.mtg-archive-header { text-align: center; margin-bottom: 28px; }
.mtg-archive-header h1 { font-family: var(--f-display); font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--mtg-dark); }
.mtg-archive-header p { color: var(--mtg-muted); }

/* ================================================================
   MOBILE BOOKING MODAL
   ================================================================ */
.mtg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  padding: 0;
  animation: mtg-fade-in .2s ease;
}

@keyframes mtg-fade-in { from { opacity: 0; } to { opacity: 1; } }

.mtg-modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  animation: mtg-slide-up .25s ease;
  -webkit-overflow-scrolling: touch;
}

@keyframes mtg-slide-up {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.mtg-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--mtg-bg);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--mtg-text);
  transition: background .2s;
}
.mtg-modal-close:hover { background: var(--mtg-border); }

.mtg-modal-inner { padding: 20px 20px 28px; }

.mtg-modal-title {
  font-family: var(--f-display);
  font-size: 1.15rem;
  margin: 0 0 10px;
  padding-right: 40px;
  color: var(--mtg-dark);
}

.mtg-modal-price {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--mtg-border);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.mtg-modal-price .mtg-main-price { font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; color: var(--mtg-red); }
.mtg-modal-price .mtg-old { text-decoration: line-through; color: var(--mtg-muted); font-size: .88rem; }
.mtg-modal-price .mtg-pp { font-size: .76rem; color: var(--mtg-muted); }

/* Desktop: hide modal entirely — it's mobile-only */
@media (min-width: 769px) {
  .mtg-mobile-book-bar { display: none !important; }
  .mtg-modal-overlay   { display: none !important; }
}

/* Prevent body scroll when modal open */
body.mtg-modal-open { overflow: hidden; }
