/* Travel Explorer V3 (skin Treka) — colección, ficha de producto y checkout */

/* ---------- Colección: como Treka (fondo bosque, título lima) pero filtros a la DERECHA ---------- */
.coll-hero {
  position: relative; min-height: 340px; display: grid; align-items: end; text-align: center; overflow: hidden;
}
.coll-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coll-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(18,48,46,.6), var(--bosque)); }
.coll-hero .container { position: relative; z-index: 1; padding-block: 6.2rem 2rem; }
.coll-hero h1 { color: var(--lima); font-size: clamp(1.9rem, 4.6vw, 3.1rem); margin-bottom: .35em; }
.coll-hero p { color: #E3EEEC; margin: 0 auto; }

.coll-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; padding-block: 2.4rem; }
.coll-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.coll-count { font-size: .88rem; color: #BFD6D3; font-weight: 600; }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1.4rem; }
.coll-empty { padding: 3rem 1rem; text-align: center; color: #BFD6D3; background: rgba(255,255,255,.06); border-radius: var(--radius); }

/* Filtros: panel blanco sticky a la DERECHA (pedido explícito; Treka los tiene arriba) */
.filters {
  position: sticky; top: 76px; z-index: var(--z-sticky);
  background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.6rem; max-height: calc(100svh - 92px); overflow: auto;
  box-shadow: var(--shadow-1);
}
.filters h2 { font-size: .95rem; margin-bottom: 1rem; color: var(--bosque); }
.filters fieldset { border: 0; margin: 0 0 1.1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--line); }
.filters fieldset:last-of-type { border-bottom: 0; margin-bottom: .4rem; }
.filters legend { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bosque); padding-bottom: .5rem; }
.filters label.check { display: flex; align-items: center; gap: .55rem; font-size: .88rem; padding-block: .28rem; cursor: pointer; }
.filters input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--bosque); }
.filters input[type="range"] { width: 100%; accent-color: var(--bosque); }
.price-out { font-size: .88rem; font-weight: 800; color: var(--bosque); }
.filters .btn { margin-top: .4rem; }
.filters .btn-outline { color: var(--bosque); border-color: var(--bosque); }
.btn-filters-m { display: none; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: var(--z-sheet-backdrop); background: rgba(18,48,46,.6);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease-out);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .coll-layout { grid-template-columns: 1fr; }
  .btn-filters-m { display: inline-flex; }
  .filters {
    position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: var(--z-sheet);
    border-radius: 22px 22px 0 0; box-shadow: 0 -8px 40px rgba(0,0,0,.45);
    max-height: 80svh; transform: translateY(105%); transition: transform .3s var(--ease-out);
    padding-top: 2rem;
  }
  .filters.open { transform: translateY(0); }
  .filters::before { content: ""; position: absolute; top: .6rem; left: 50%; translate: -50% 0; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
}

/* ---------- Ficha de producto (estructura Civitatis, página clara) ---------- */
.prod-top { padding-top: 5.6rem; }
.breadcrumb { font-size: .84rem; color: var(--ink-soft); margin-bottom: .9rem; }
.breadcrumb a { color: var(--ink-soft); }
.prod-title h1 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); margin-bottom: .45rem; }
.prod-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .86rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 1.3rem; }
.prod-meta .star { color: var(--bosque); font-weight: 800; }

.gallery { display: grid; grid-template-columns: 2.2fr 1fr; grid-auto-rows: 200px; gap: .6rem; border-radius: var(--radius); overflow: hidden; }
.gallery a { display: block; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease-out); }
.gallery a:hover img { transform: scale(1.04); }
.gallery a:first-child { grid-row: span 2; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; grid-auto-rows: auto; } .gallery a:not(:first-child) { display: none; } }

.prod-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.4rem; align-items: start; padding-block: 2rem; }
.prod-body h2 { font-size: 1.15rem; margin-top: 2.4rem; }
.prod-body h2:first-child { margin-top: 0; }
.prod-body { color: var(--ink); }

/* Sticky booking box */
.booking { position: sticky; top: 78px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; }
.booking-head { background: var(--bosque); color: #fff; padding: 1.1rem 1.3rem; }
.booking-head .from { font-size: .78rem; color: var(--lima); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.booking-head .price { font-size: 1.9rem; font-weight: 900; line-height: 1.15; }
.booking-head .per { font-size: .8rem; color: #C6DBD8; }
.booking-body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: .95rem; }
.field { display: grid; gap: .3rem; }
.field > span { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--bosque); }
.field input, .field select {
  font: inherit; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); min-height: 46px; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--bosque); outline: none; box-shadow: 0 0 0 3px rgba(46,122,117,.15); }
.extra { display: flex; align-items: baseline; gap: .55rem; font-size: .86rem; padding-block: .15rem; cursor: pointer; color: var(--ink); }
.extra input { width: 18px; height: 18px; accent-color: var(--bosque); translate: 0 3px; }
.extra .x-price { margin-left: auto; font-weight: 800; color: var(--bosque); white-space: nowrap; }
.booking-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: .9rem; font-weight: 700; color: var(--ink); }
.booking-total strong { font-size: 1.5rem; font-weight: 900; color: var(--bosque); }
.booking-note { font-size: .76rem; color: var(--ink-soft); text-align: center; margin: 0; }

/* Timeline itinerario */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 2.4rem; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--lima); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--bosque);
}
.timeline h3 { font-family: var(--font-body); font-weight: 800; font-size: .98rem; margin-bottom: .15rem; color: var(--bosque); }
.timeline .t-hora { font-size: .76rem; font-weight: 900; color: var(--bosque); background: var(--lima); padding: .1rem .5rem; border-radius: 999px; }
.timeline p { font-size: .92rem; color: var(--ink-soft); margin: .25rem 0 0; }

/* Incluye / No incluye */
.inclusions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.inclusions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .92rem; }
.inclusions li { padding-left: 1.7rem; position: relative; }
.inc li::before { content: "✓"; position: absolute; left: 0; color: var(--bosque); font-weight: 900; }
.noinc li::before { content: "✕"; position: absolute; left: 0; color: var(--danger); font-weight: 900; }
.inclusions h3 { font-family: var(--font-body); font-weight: 800; font-size: .95rem; color: var(--bosque); }
@media (max-width: 620px) { .inclusions { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-bottom: .7rem; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.faq details[open] { border-color: var(--bosque); }
.faq p { font-size: .92rem; color: var(--ink-soft); margin: .6rem 0 0; }

/* Barra mobile de reserva */
.mobilebar {
  display: none; position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-nav);
  background: var(--bosque-deep); color: #fff; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  align-items: center; gap: 1rem; box-shadow: 0 -4px 20px rgba(0,0,0,.4);
}
.mobilebar .mb-price { font-weight: 900; font-size: 1.25rem; color: var(--lima); line-height: 1.1; }
.mobilebar .mb-label { font-size: .7rem; color: #BFD6D3; }
.mobilebar .btn { flex: 1; }
@media (max-width: 900px) {
  .prod-layout { grid-template-columns: 1fr; }
  .booking { position: static; }
  body.has-mobilebar .mobilebar { display: flex; }
}

/* ---------- Checkout (página clara) ---------- */
.checkout-page { background: var(--paper); min-height: 100svh; }
.checkout-wrap { width: min(960px, 100% - 2rem); margin-inline: auto; padding: 6rem 0 3rem; }
.steps { display: flex; gap: .4rem; margin-bottom: 1.8rem; counter-reset: step; padding: 0; }
.steps li {
  list-style: none; flex: 1; text-align: center; font-size: .74rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-soft);
  padding-top: 2rem; position: relative; counter-increment: step;
}
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 50%; translate: -50% 0;
  width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--ink-soft);
  display: grid; place-items: center; font-weight: 900; font-size: .85rem;
}
.steps li.done::before { background: var(--lima); color: var(--bosque-deep); content: "✓"; }
.steps li.current { color: var(--bosque); }
.steps li.current::before { background: var(--bosque); color: #fff; }

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.6rem; align-items: start; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 1.7rem; color: var(--ink); }
.panel h2 { font-size: 1.1rem; margin-bottom: 1.1rem; }
.panel .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.panel .form-grid .full { grid-column: 1 / -1; }
.field .err { font-size: .76rem; color: var(--danger); display: none; text-transform: none; letter-spacing: 0; font-weight: 600; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .err { display: block; }
.checkout-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }

.summary { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; position: sticky; top: 78px; color: var(--ink); }
.summary img { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; }
.summary-body { padding: 1.1rem 1.2rem 1.3rem; font-size: .9rem; display: grid; gap: .45rem; }
.summary-body h3 { font-family: var(--font-body); font-weight: 800; font-size: 1rem; margin: 0 0 .2rem; color: var(--bosque); }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-soft); }
.summary-row.total { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .3rem; color: var(--ink); font-weight: 800; }
.summary-row.total span:last-child { font-size: 1.25rem; font-weight: 900; color: var(--bosque); }

.pay-fake { background: var(--paper); border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .8rem; color: var(--ink-soft); margin-bottom: 1rem; }

/* Voucher */
.voucher { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; color: var(--ink); }
.voucher-head { background: var(--bosque); color: #fff; padding: 2rem 1.6rem; text-align: center; }
.voucher-head h2 { color: var(--lima); font-size: 1.4rem; margin-bottom: .4rem; }
.voucher-head p { margin: 0 auto; color: #DCEAE8; }
.voucher-code {
  font-weight: 900; font-size: 1.8rem; letter-spacing: .1em;
  background: var(--bosque-deep); color: var(--lima); text-align: center; padding: .85rem; margin: 1.4rem 1.6rem 0; border-radius: var(--radius-sm);
}
.voucher-body { padding: 1.2rem 1.6rem 1.8rem; display: grid; gap: .5rem; font-size: .95rem; }
.voucher-body .summary-row { color: var(--ink); }
.voucher-body .summary-row span:first-child { color: var(--ink-soft); }
.voucher-actions { display: flex; gap: 1rem; padding: 0 1.6rem 1.8rem; flex-wrap: wrap; }

.checkout-step { display: none; }
.checkout-step.active { display: block; }
@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .panel .form-grid { grid-template-columns: 1fr; }
}
@media print {
  .nav, .fab-wa, .steps, .voucher-actions, .summary, .ver-switch { display: none !important; }
  .checkout-wrap { padding-top: 1rem; }
}

/* ---------- Extras de ficha (heredados de V2, skin Treka) ---------- */
.policy-box {
  display: flex; gap: .7rem; align-items: baseline;
  background: #E8F5EF; border: 1.5px solid var(--lima); border-radius: var(--radius-sm);
  padding: .85rem 1.1rem; font-size: .92rem; margin: 1.4rem 0; color: var(--ink);
}
.policy-box strong { color: var(--bosque); }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.map-embed iframe { display: block; width: 100%; height: 300px; border: 0; }
.map-addr { font-size: .9rem; color: var(--ink-soft); margin-top: .6rem; }
.prose-clamp { position: relative; max-height: 9.5em; overflow: hidden; }
.prose-clamp::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3.5em; background: linear-gradient(rgba(244,246,240,0), var(--paper)); }
.prose-clamp.open { max-height: none; }
.prose-clamp.open::after { display: none; }
.ver-mas { background: none; border: 0; color: var(--bosque); font: inherit; font-weight: 800; cursor: pointer; padding: .2rem 0; }
.ver-mas:hover { text-decoration: underline; }

/* ---------- V4: panel de filtros estilo Treka ---------- */
.filters { padding: 1.1rem 1.1rem 1.3rem; }
.search-box {
  display: flex; align-items: center; gap: .55rem;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: .15rem .5rem .15rem 1rem; margin-bottom: .8rem;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.search-box:focus-within { border-color: var(--bosque); box-shadow: 0 0 0 3px rgba(46,122,117,.12); background: #fff; }
.search-box svg { width: 17px; height: 17px; stroke: var(--ink-soft); fill: none; stroke-width: 2; stroke-linecap: round; flex: none; }
.search-box input {
  font: inherit; font-size: .9rem; border: 0; outline: none; background: transparent;
  width: 100%; min-height: 42px; color: var(--ink);
}
.search-box input::placeholder { color: #93A5A2; }
.filters-toggle {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 46px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--bosque); color: #fff;
  font-family: var(--font-body); font-weight: 800; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .07em;
  transition: background-color .15s var(--ease-out);
}
.filters-toggle:hover { background: var(--bosque-deep); }
.filters-toggle .chev { font-size: 1.1rem; line-height: 1; translate: 0 -1px; }
.filters-fields {
  display: grid; gap: .9rem; padding-top: 1rem;
  max-height: 60rem; overflow: hidden; opacity: 1;
  transition: max-height .3s var(--ease-out), opacity .25s var(--ease-out), padding-top .3s var(--ease-out);
}
.filters-fields.collapsed { max-height: 0; opacity: 0; padding-top: 0; }
.ffield { display: grid; gap: .35rem; }
.ffield > span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--bosque); }
.ffield select {
  font: inherit; font-size: .9rem; color: var(--ink);
  padding: .6rem 2.2rem .6rem .9rem; min-height: 46px; width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background-color: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7A75' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 14px;
  cursor: pointer;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.ffield select:focus { border-color: var(--bosque); outline: none; box-shadow: 0 0 0 3px rgba(46,122,117,.12); }
.ffield input[type='range'] { accent-color: var(--bosque); width: 100%; }
.filters-status { font-size: .78rem; color: var(--ink-soft); margin: .9rem 0 .7rem; text-align: center; }
.btn-clear {
  display: block; width: 100%; margin-top: .55rem; min-height: 42px;
  background: var(--paper); color: var(--ink-soft); border: 1.5px solid var(--line); border-radius: 999px;
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out);
}
.btn-clear:hover { background: #E6ECEB; color: var(--ink); }
.filters .btn-apply { border-radius: 999px; }
