:root {
  --bg: #f4f0f8;
  --ink: #1a1224;
  --muted: #6b6178;
  --line: #e7dff0;
  --panel: #ffffff;
  --brand: #C724D1;
  --brand-2: #9116D6;
  --soft: #faf7fc;
  --ok: #0d9488;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--font);   /* una sola familia en toda la reserva */
  --shadow: 0 10px 36px rgba(26, 11, 46, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}
.hidden { display: none !important; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 100px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2rem);
}
.sub { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }

.lang {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  padding: 7px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.lang button.active {
  background: var(--ink);
  color: #fff;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.15fr);
  gap: 18px;
  align-items: start;
}

/* Calendar side */
.cal-card {
  background: var(--panel);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px;
  position: sticky;
  top: 14px;
}
.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cal-head h2 { margin: 0; font-size: 1.125rem; }
.cal-badge {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--brand-2);
  background: rgba(123, 31, 162, .08);
  padding: 5px 10px;
  border-radius: 999px;
}
.cal-mock {
  background: #111;
  color: #fff;
  border-radius: 16px;
  padding: 14px;
}
.cal-mock-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,.45);
  text-align: center;
  text-transform: uppercase;
}
.cal-mock-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  background: #1c1c1e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  position: relative;
}
.cal-day.muted { color: rgba(255,255,255,.25); }
.cal-day.range { background: #3a1a4a; color: #fff; }
.cal-day.start, .cal-day.end {
  background: linear-gradient(135deg, #9116D6, #C724D1);
  color: #fff;
}
.cal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.cal-summary div {
  background: var(--soft);
  border-radius: 12px;
  padding: 10px;
}
.cal-summary span {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.cal-summary strong { font-size: 1rem; }
.cal-hint {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Extras side */
.extras-panel {
  background: var(--panel);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px 16px 90px;
  min-height: 520px;
}
.extras-head { margin-bottom: 16px; }
.add-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: .06em;
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.extras-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.cat {
  margin-bottom: 18px;
}
.cat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  background: var(--soft);
  transition: border-color .15s, box-shadow .15s;
}
.item.is-on {
  border-color: rgba(196, 30, 140, .45);
  box-shadow: 0 0 0 3px rgba(196, 30, 140, .1);
  background: #fff;
}
.item-cover {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #ddd;
}
.item-cover.emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.625rem;
  background: #fff;
  border: 1px solid var(--line);
}
.item-body h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.25;
}
.item-body p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.35;
}
.item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.item-stats span {
  font-size: 0.875rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--ink);
}
.badge-new {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  background: var(--ok);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 88px;
}
.price {
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--brand-2);
  white-space: nowrap;
}
.price small {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted);
}
.toggle {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: #d4cce0;
  position: relative;
  cursor: pointer;
  transition: background .15s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: transform .15s;
}
.toggle.on {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
}
.toggle.on::after { transform: translateX(20px); }
.qty {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty button {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.qty span {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}
.item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.preview-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}
.preview-link:hover { text-decoration: underline; }
/* denser itinerary list when many routes */
.cat#cat-itineraries .item,
.cat .item { }
.cat .item h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }

/* Sticky cart */
.cart {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(520px, calc(100% - 24px));
  background: #1a0b2e;
  color: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 14px 40px rgba(26, 11, 46, .35);
  z-index: 40;
}
.cart-left span {
  display: block;
  font-size: 0.875rem;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cart-left strong { font-size: 1.375rem; }
.cart-btn {
  border: 0;
  background: linear-gradient(135deg, #9116D6, #C724D1);
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}
.cart-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Modal */
.modal {
  position: fixed; inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-bg {
  position: absolute; inset: 0;
  background: rgba(15, 7, 24, .5);
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: min(420px, 100%);
  box-shadow: var(--shadow);
}
.modal-card h3 {
  margin: 0 0 12px;
  font-family: var(--display);
}
.modal-card ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.modal-card li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.modal-note {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.4;
}
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.modal-actions .ghost,
.modal-actions .primary {
  border-radius: 999px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
.modal-actions .ghost {
  border: 1px solid var(--line);
  background: #fff;
}
.modal-actions .primary {
  border: 0;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .cal-card { position: static; }
  .item {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "cover body"
      "side side";
  }
  .item-cover { width: 56px; height: 56px; }
  .item-side {
    grid-area: side;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
}
