/* Base compartida: tokens de marca, tipografía, botones, formularios y componentes comunes. */

:root {
  --ink: #0d2b33;
  --ink-2: #36545c;
  --muted: #667c83;
  --sand: #f7f1e8;
  --sand-2: #efe6d7;
  --paper: #fffdf9;
  --white: #ffffff;
  --line: #e6ddce;
  --line-2: #d5c9b5;
  --ocean: #0b4f5c;
  --ocean-deep: #08343d;
  --lagoon: #14a39a;
  --lagoon-ink: #0a7770;
  --lagoon-soft: #dcf3ef;
  --coral: #f45d3f;
  --coral-deep: #d9472a;
  --coral-soft: #ffe7e0;
  --coral-btn: #cc4325; /* coral oscurecido para texto blanco con contraste AA */
  --coral-btn-hover: #b13a1f;
  --sun: #ffc75a;
  --sun-soft: #fff2d3;
  --wa: #15803d;
  --wa-deep: #116b32;
  --danger: #c2362d;
  --danger-soft: #fde7e4;
  --ok: #1d7f53;
  --ok-soft: #dcf2e6;
  --info: #2263a8;
  --info-soft: #e2edf9;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(13, 43, 51, .06), 0 2px 8px rgba(13, 43, 51, .05);
  --shadow: 0 2px 4px rgba(13, 43, 51, .05), 0 14px 34px rgba(13, 43, 51, .10);
  --shadow-lg: 0 30px 70px rgba(8, 52, 61, .28);
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 2px; }

.icon { flex: none; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--white); color: var(--ink);
  font-weight: 700; text-decoration: none; box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

/* ---------- botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: .95rem; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .18s var(--ease), box-shadow .18s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.btn-xs { min-height: 32px; padding: 0 12px; font-size: .82rem; gap: 6px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--coral-btn); color: var(--white); box-shadow: 0 6px 18px rgba(204, 67, 37, .26); }
.btn-primary:hover:not(:disabled) { background: var(--coral-btn-hover); }
.btn-dark { background: var(--ocean-deep); color: var(--white); }
.btn-dark:hover:not(:disabled) { background: var(--ocean); }
.btn-lagoon { background: var(--lagoon-ink); color: var(--white); }
.btn-lagoon:hover:not(:disabled) { background: var(--ocean); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-2); background: rgba(13, 43, 51, .03); }
.btn-wa { background: var(--wa); color: var(--white); }
.btn-wa:hover:not(:disabled) { background: var(--wa-deep); }
.btn-danger { background: transparent; color: var(--danger); border-color: #efc2bc; }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(13, 43, 51, .07); color: var(--ink); }

/* ---------- formularios ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.field .req { color: var(--coral); margin-left: 2px; }
.help { font-size: .8rem; color: var(--muted); }

input, select, textarea {
  width: 100%; min-height: 46px;
  font: inherit; font-size: .97rem; color: var(--ink);
  padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2336545c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input::placeholder, textarea::placeholder { color: #9aa9ad; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 4px var(--lagoon-soft); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--lagoon-ink); }

.has-error input, .has-error select, .has-error textarea, .has-error .stepper { border-color: var(--danger); }
.has-error input:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.field-error { font-size: .8rem; font-weight: 600; color: var(--danger); }

.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; }

.stepper {
  display: flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--white);
  overflow: hidden;
}
.stepper button {
  display: grid; place-items: center; width: 44px; height: 43px; flex: none;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.stepper button:hover { background: var(--sand); color: var(--ink); }
.stepper input {
  border: 0; min-height: 43px; text-align: center; font-weight: 700; padding: 0; border-radius: 0;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }
.stepper:focus-within { border-color: var(--lagoon); box-shadow: 0 0 0 4px var(--lagoon-soft); }

.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sand-2); }
.segmented label { position: relative; flex: 1; cursor: pointer; }
.segmented input, .chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; padding: 9px 12px; border-radius: 10px; text-align: center;
  font-weight: 700; font-size: .9rem; color: var(--ink-2); transition: background .15s, box-shadow .15s;
}
.segmented input:checked + span { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 3px solid var(--lagoon); outline-offset: 1px; }

.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; cursor: pointer; }
.chip-radio span {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--white);
  font-weight: 700; font-size: .9rem; transition: all .15s;
}
.chip-radio input:checked + span { border-color: var(--lagoon-ink); background: var(--lagoon-soft); color: var(--lagoon-ink); }
.chip-radio input:focus-visible + span { outline: 3px solid var(--lagoon); outline-offset: 2px; }

/* ---------- estados de reserva ---------- */

.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 9px; border-radius: 999px;
  font-size: .76rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap;
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pending { background: var(--sun-soft); color: #8a5800; }
.status-confirmed { background: var(--ok-soft); color: var(--ok); }
.status-in_progress { background: var(--info-soft); color: var(--info); }
.status-completed { background: #ebe8e2; color: #4f5b61; }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }

/* ---------- categorías y medios ---------- */

.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.cat-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--lagoon)); }
.cat-excursion { --cat: #f2683f; --cat-soft: #ffe6dc; }
.cat-transfer { --cat: #14a39a; --cat-soft: #d9f2ee; }
.cat-vehicle { --cat: #f0a42b; --cat-soft: #fff0d2; }
.cat-accommodation { --cat: #2f86b5; --cat-soft: #dcecf6; }
.cat-other { --cat: #3f9a6d; --cat-soft: #def1e6; }

.media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--sand-2); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-art { display: grid; place-items: center; color: rgba(255, 255, 255, .95); isolation: isolate; }
.media-art::before {
  content: ''; position: absolute; z-index: -1; width: 48%; aspect-ratio: 1; border-radius: 50%;
  right: -6%; top: 8%; background: rgba(255, 255, 255, .16);
}
.art-waves { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; width: 100%; height: 48%; }
.art-waves path:first-child { fill: rgba(255, 255, 255, .12); }
.art-waves path:last-child { fill: rgba(255, 255, 255, .18); }
.art-icon { transform: translateY(-6px); filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .15)); }
.art-icon .icon { stroke-width: 1.4; }
.art-excursion { background: linear-gradient(140deg, #ff9d5c 0%, #f2683f 55%, #e2484f 100%); }
.art-transfer { background: linear-gradient(140deg, #36c2b4 0%, #14a39a 45%, #0b5d68 100%); }
.art-vehicle { background: linear-gradient(140deg, #ffd36b 0%, #f7aa3c 50%, #ef7f3a 100%); }
.art-accommodation { background: linear-gradient(140deg, #86d4e4 0%, #3f9bc8 50%, #22618f 100%); }
.art-other { background: linear-gradient(140deg, #9ddc9d 0%, #4fae7b 50%, #2a7a5c 100%); }

/* ---------- avisos ---------- */

.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-radius: 12px; font-size: .9rem; font-weight: 600;
}
.notice .icon { margin-top: 1px; }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-info { background: var(--info-soft); color: var(--info); }
.notice-warn { background: var(--sun-soft); color: #7a4f00; }

.toasts {
  position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(440px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: 14px; background: var(--ocean-deep); color: var(--white);
  font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg);
  animation: toast-in .25s var(--ease);
  transition: opacity .3s, transform .3s;
}
.toast-success .icon { color: #7ee2b0; }
.toast-error { background: #5c1d18; }
.toast-error .icon { color: #ffb4a8; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* Estrellas de calificación: relleno proporcional con --p */
.stars {
  display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: 2px; white-space: nowrap;
  background: linear-gradient(90deg, #f0a91c var(--p, 0%), #d8cfbf var(--p, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}

.skeleton {
  min-height: 360px;
  background: linear-gradient(100deg, var(--sand-2) 30%, #f8f2e8 50%, var(--sand-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s infinite linear;
  border: 0 !important;
}
@keyframes shimmer { to { background-position: -150% 0; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before {
  content: ''; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 3px var(--paper);
}
.timeline li::after { content: ''; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1.5px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--lagoon); }
.timeline .tl-title { font-weight: 700; font-size: .92rem; }
.timeline .tl-note { font-size: .88rem; color: var(--ink-2); margin-top: 2px; }
.timeline .tl-meta { font-size: .76rem; color: var(--muted); margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
