/* =============================================================
   WANDER COMPONENTS — public storefront design system
   The 12 conversion-critical components. Class prefix: .w-
   Depends on tokens.css (--w-* vars). Mobile-first: designed at
   375px, desktop adapts. Load AFTER app.css so it wins ties.

   Index:
     1 · CTA buttons        .w-btn / -secondary / -ghost
     2 · Price block        .w-price
     3 · Tour card          .w-card
     4 · Sticky action bar  .w-stickybar
     5 · Trust strip        .w-trust
     6 · Form field         .w-field
     7 · Urgency chip       .w-urgency
     8 · Step indicator     .w-steps
     9 · Review card        .w-review
    10 · Section header     .w-section
    11 · Skeleton/empty     .w-skeleton / .w-empty
    12 · Modal/bottom sheet .w-sheet
   ============================================================= */

/* ── 1 · CTA BUTTONS ──────────────────────────────────────────
   ONE primary per viewport. 48px min tap target. Brand green
   appears only here and on links — nowhere decorative.        */
.w-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 28px;
  background: var(--w-brand); color: #fff;
  border: none; border-radius: var(--w-r-pill);
  font-family: var(--w-font); font-size: 16px; font-weight: 800; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.w-btn:hover  { background: var(--w-brand-hover); transform: translateY(-1px); box-shadow: var(--w-shadow-raised); color: #fff; }
.w-btn:active { transform: translateY(0); box-shadow: none; }
.w-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.w-btn:focus-visible { outline: 3px solid var(--w-brand-soft); outline-offset: 2px; }

.w-btn--secondary {
  background: transparent; color: var(--w-brand);
  border: 2px solid var(--w-brand);
}
.w-btn--secondary:hover { background: var(--w-brand-soft); color: var(--w-brand-hover); transform: none; box-shadow: none; }

.w-btn--ghost {
  background: transparent; color: var(--w-ink-2);
  border: none; min-height: 40px; padding: 8px 16px; font-weight: 700;
}
.w-btn--ghost:hover { background: rgba(27, 41, 33, 0.05); color: var(--w-ink); transform: none; box-shadow: none; }

.w-btn--block { display: flex; width: 100%; }
.w-btn--sm    { min-height: 38px; padding: 8px 18px; font-size: 14px; }

/* ── 2 · PRICE BLOCK ──────────────────────────────────────────
   Transparency converts: per-person + strike + deposit line.  */
.w-price { font-family: var(--w-font); }
.w-price__strike { font-size: 14px; color: var(--w-ink-3); text-decoration: line-through; font-weight: 500; }
.w-price__main   { font-size: 26px; font-weight: 800; color: var(--w-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.w-price__unit   { font-size: 13px; font-weight: 600; color: var(--w-ink-2); }
.w-price__deposit {
  display: inline-block; margin-top: 6px; padding: 4px 10px;
  background: var(--w-brand-soft); color: var(--w-brand-hover);
  border-radius: var(--w-r-pill); font-size: 12.5px; font-weight: 700;
}

/* ── 3 · TOUR CARD ────────────────────────────────────────────
   The browse→PDP click. 4:3 image, one hover state.           */
.w-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--w-surface); border: 1px solid var(--w-line);
  border-radius: var(--w-r-card); box-shadow: var(--w-shadow-rest);
  text-decoration: none; color: inherit;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.w-card:hover { transform: translateY(-4px); box-shadow: var(--w-shadow-raised); }
.w-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--w-line); }
.w-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-card__pill {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 12px; background: rgba(255,255,255, 0.92); backdrop-filter: blur(4px);
  border-radius: var(--w-r-pill); font-size: 12px; font-weight: 700; color: var(--w-ink);
}
.w-card__body  { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.w-card__title { font-size: 16.5px; font-weight: 800; color: var(--w-ink); line-height: 1.3; margin: 0;
                 display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w-card__meta  { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--w-ink-2); }
.w-card__rating { color: var(--w-sun); font-weight: 700; }
.w-card__foot  { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--w-line); }

/* ── 4 · STICKY ACTION BAR (mobile PDP/booking) ───────────────
   Price + CTA pinned bottom. #1 mobile conversion pattern.    */
.w-stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--w-surface); border-top: 1px solid var(--w-line);
  box-shadow: var(--w-shadow-overlay);
}
.w-stickybar .w-btn { flex-shrink: 0; }
@media (min-width: 900px) { .w-stickybar { display: none; } }

/* ── 5 · TRUST STRIP ──────────────────────────────────────────
   Above every form + at checkout. Proof before ask.           */
.w-trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 12px 16px;
  background: var(--w-surface); border: 1px solid var(--w-line); border-radius: var(--w-r-card);
}
.w-trust__item { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--w-ink-2); }
.w-trust__item strong { color: var(--w-ink); font-weight: 800; }
.w-trust__item .star { color: var(--w-sun); }

/* ── 6 · FORM FIELD ───────────────────────────────────────────
   48px targets, label-on-top, visible validation.             */
.w-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.w-field__label { font-size: 13px; font-weight: 700; color: var(--w-ink); }
.w-field__label small { font-weight: 500; color: var(--w-ink-3); }
.w-field input, .w-field select, .w-field textarea {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 14px;
  background: var(--w-surface); border: 1.5px solid var(--w-line); border-radius: var(--w-r-input);
  font-family: var(--w-font); font-size: 16px; color: var(--w-ink);  /* 16px stops iOS zoom */
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.w-field input:focus, .w-field select:focus, .w-field textarea:focus {
  outline: none; border-color: var(--w-brand); box-shadow: 0 0 0 3px var(--w-brand-soft);
}
.w-field--error input, .w-field--error select { border-color: var(--w-danger); }
.w-field__error { font-size: 12.5px; font-weight: 600; color: var(--w-danger); }
.w-field__hint  { font-size: 12.5px; color: var(--w-ink-3); }

/* ── 7 · URGENCY CHIP ─────────────────────────────────────────
   Honest scarcity. Sun color — never the CTA green.           */
.w-urgency {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; background: var(--w-sun-soft); color: #92600A;
  border-radius: var(--w-r-pill); font-size: 12.5px; font-weight: 800;
}
.w-urgency--critical { background: rgba(244, 63, 94, 0.10); color: #BE123C; }

/* ── 8 · STEP INDICATOR (booking funnel) ──────────────────────*/
.w-steps { display: flex; align-items: center; gap: 4px; margin-bottom: 20px; }
.w-steps__step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--w-ink-3); }
.w-steps__dot {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--w-line); color: var(--w-ink-2); font-size: 12.5px; font-weight: 800;
}
.w-steps__step.is-active .w-steps__dot { background: var(--w-brand); color: #fff; }
.w-steps__step.is-active { color: var(--w-ink); }
.w-steps__step.is-done .w-steps__dot { background: var(--w-brand-soft); color: var(--w-brand); }
.w-steps__bar { flex: 1; height: 2px; background: var(--w-line); min-width: 16px; }
.w-steps__step.is-done + .w-steps__bar { background: var(--w-brand); }
@media (max-width: 640px) { .w-steps__label { display: none; } .w-steps__step.is-active .w-steps__label { display: inline; } }

/* ── 9 · REVIEW CARD ──────────────────────────────────────────*/
.w-review {
  padding: 16px 18px; background: var(--w-surface);
  border: 1px solid var(--w-line); border-radius: var(--w-r-card);
}
.w-review__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.w-review__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--w-brand-soft); color: var(--w-brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.w-review__name  { font-size: 14px; font-weight: 800; color: var(--w-ink); }
.w-review__meta  { font-size: 12px; color: var(--w-ink-3); }
.w-review__stars { color: var(--w-sun); font-size: 13px; letter-spacing: 1px; }
.w-review__body  { font-size: 14px; line-height: 1.55; color: var(--w-ink-2); margin: 0; }
.w-review__badge {
  display: inline-flex; align-items: center; gap: 4px; margin-left: auto;
  font-size: 11px; font-weight: 800; color: var(--w-brand);
}

/* ── 10 · SECTION HEADER ──────────────────────────────────────*/
.w-section { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.w-section__title { font-family: var(--w-font-serif); font-size: 28px; font-weight: 800; color: var(--w-ink); margin: 0; line-height: 1.15; }
.w-section__sub   { font-size: 14.5px; color: var(--w-ink-2); margin: 6px 0 0; }
.w-section__link  { font-size: 14px; font-weight: 800; color: var(--w-brand); text-decoration: none; white-space: nowrap; }
.w-section__link:hover { color: var(--w-brand-hover); }
@media (max-width: 640px) { .w-section__title { font-size: 22px; } }

/* ── 11 · SKELETON + EMPTY STATE ──────────────────────────────*/
.w-skeleton {
  background: linear-gradient(90deg, var(--w-line) 25%, #EDF1F5 50%, var(--w-line) 75%);
  background-size: 200% 100%; animation: w-shimmer 1.4s infinite;
  border-radius: var(--w-r-input);
}
@keyframes w-shimmer { to { background-position: -200% 0; } }
.w-empty { text-align: center; padding: 48px 20px; color: var(--w-ink-2); }
.w-empty__icon  { font-size: 40px; margin-bottom: 10px; }
.w-empty__title { font-size: 17px; font-weight: 800; color: var(--w-ink); margin: 0 0 4px; }
.w-empty__msg   { font-size: 14px; max-width: 40ch; margin: 0 auto 16px; }

/* ── 12 · MODAL / BOTTOM SHEET ────────────────────────────────
   Desktop: centered modal. Mobile: bottom sheet.              */
.w-sheet__overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(27, 41, 33, 0.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.w-sheet {
  width: min(480px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--w-surface); border-radius: var(--w-r-card);
  box-shadow: var(--w-shadow-overlay); padding: 24px;
}
@media (max-width: 640px) {
  .w-sheet__overlay { align-items: flex-end; padding: 0; }
  .w-sheet { width: 100%; border-radius: var(--w-r-card) var(--w-r-card) 0 0;
             padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* ── Utilities (minimal, deliberate) ──────────────────────────*/
.w-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.w-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
