/* eslint-disable */
// Shared components for the Panorama Hotel Bur Dubai prototype.
// All components attach to window for cross-script sharing.

const { useState, useEffect, useRef, useMemo, useCallback } = React;

// ============================================================
//  Brand constants
// ============================================================
const BRAND = {
  name: "Panorama Hotel Bur Dubai",
  short: "Panorama",
  address: "Al Mankhool Road, Bur Dubai · P.O. Box 14703",
  phone: "+971 4 351 8518",
  phoneHref: "tel:+97143518518",
  whatsapp: "https://wa.me/97143518518",
  email: "booking@panoramaburdubai.com",
  emailHref: "mailto:booking@panoramaburdubai.com",
  fax: "+971 4 351 8028",
  dtcm: "DTCM 226715",
  rooms: 58,
  floors: 6,
  renovated: 2014,
  trivagoScore: 6.5,
  trivagoReviews: 1678,
};

const ROUTES = [
  { id: "home", label: "Home" },
  { id: "rooms", label: "Rooms" },
  { id: "location", label: "Location" },
  { id: "dining", label: "Dining" },
  { id: "about", label: "About" },
  { id: "honest", label: "Honest reviews" },
  { id: "visa", label: "Visa letter" },
];

// ============================================================
//  Icons (small inline set — kept geometric on purpose)
// ============================================================
const Icon = {
  arrow: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M3 8h10M9 4l4 4-4 4" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  arrowUp: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M4 12L12 4M6 4h6v6" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  menu: (p) => (
    <svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.6" {...p}>
      <path d="M3 6h14M3 10h14M3 14h14" strokeLinecap="round" />
    </svg>
  ),
  close: (p) => (
    <svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.6" {...p}>
      <path d="M4 4l12 12M16 4L4 16" strokeLinecap="round" />
    </svg>
  ),
  phone: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M3 4c0 5 4 9 9 9l1-2-3-1-1 1c-2-1-3-2-4-4l1-1L5 3 3 4z" strokeLinejoin="round" />
    </svg>
  ),
  whatsapp: (p) => (
    <svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" {...p}>
      <path d="M19.05 4.91A10 10 0 0 0 4.91 19.05L4 22l3.04-.89A10 10 0 1 0 19.05 4.91zM12 20a8 8 0 0 1-4.07-1.11l-.29-.17-1.8.52.54-1.74-.18-.3A8 8 0 1 1 12 20zm4.5-5.93c-.24-.12-1.43-.7-1.65-.78-.22-.08-.38-.12-.54.12-.16.24-.62.78-.76.94-.14.16-.28.18-.52.06s-1-.37-1.9-1.17a7 7 0 0 1-1.32-1.64c-.14-.24 0-.36.1-.48.1-.1.24-.28.36-.42.12-.14.16-.24.24-.4.08-.16.04-.3-.02-.42-.06-.12-.54-1.3-.74-1.78-.2-.46-.4-.4-.54-.4l-.46-.02c-.16 0-.42.06-.64.3-.22.24-.84.82-.84 2s.86 2.32.98 2.48c.12.16 1.7 2.6 4.12 3.64.58.26 1.02.4 1.36.5.58.18 1.1.16 1.5.1.46-.06 1.43-.58 1.63-1.14.2-.56.2-1.04.14-1.14-.06-.1-.22-.16-.46-.28z"/>
    </svg>
  ),
  metro: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <rect x="4" y="2" width="8" height="10" rx="3" />
      <circle cx="6" cy="9" r="0.7" fill="currentColor" />
      <circle cx="10" cy="9" r="0.7" fill="currentColor" />
      <path d="M5 13l-1 2M11 13l1 2" strokeLinecap="round" />
    </svg>
  ),
  walk: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <circle cx="9" cy="3" r="1.3" />
      <path d="M9 5l-2 3 1 2v4M9 5l2 2 2 1M8 10l-2 4" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  car: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M2 10h12v3H2zM3 10l1-4h8l1 4" strokeLinejoin="round" />
      <circle cx="5" cy="13" r="1.2" />
      <circle cx="11" cy="13" r="1.2" />
    </svg>
  ),
  bed: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M2 12V6M2 9h12v3M14 12V8a2 2 0 0 0-2-2H7v3" strokeLinejoin="round" />
    </svg>
  ),
  person: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <circle cx="8" cy="5" r="2.2" />
      <path d="M3 14c0-2.5 2.2-4.5 5-4.5s5 2 5 4.5" strokeLinecap="round" />
    </svg>
  ),
  balcony: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M2 14h12M3 11h10v3H3zM4 11V7M7 11V7M9 11V7M12 11V7M2 7h12M5 4l3-2 3 2" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  sqm: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <rect x="2.5" y="2.5" width="11" height="11" />
      <path d="M5 5l2-2M5 11l-2 2M11 5l2-2M11 11l2 2" strokeLinecap="round" />
    </svg>
  ),
  wifi: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M2 6c3.5-3 8.5-3 12 0M4 9c2-1.5 6-1.5 8 0M6 12c1-.7 3-.7 4 0" strokeLinecap="round" />
    </svg>
  ),
  ac: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M8 2v12M8 2l-2 2M8 2l2 2M8 14l-2-2M8 14l2-2M2 8h12M2 8l2-2M2 8l2 2M14 8l-2-2M14 8l-2 2" strokeLinecap="round" />
    </svg>
  ),
  check: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2" {...p}>
      <path d="M3 8.5l3 3 7-7" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  ),
  star: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" {...p}>
      <path d="M8 1.5l1.9 4 4.4.5-3.2 3 .9 4.4L8 11.3 3.9 13.4l.9-4.4-3.2-3 4.4-.5z"/>
    </svg>
  ),
  shield: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M8 1.5L2.5 4v4c0 3.5 2.5 5.5 5.5 6.5 3-1 5.5-3 5.5-6.5V4L8 1.5z" strokeLinejoin="round"/>
      <path d="M5.5 8l1.8 1.8L11 6.5" strokeLinecap="round" strokeLinejoin="round"/>
    </svg>
  ),
  warn: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M8 2L1.5 13.5h13L8 2z" strokeLinejoin="round" />
      <path d="M8 6v3.5M8 11.5v.01" strokeLinecap="round" />
    </svg>
  ),
  thumb: (p) => (
    <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" {...p}>
      <path d="M5 14V8l3-5c.8 0 1.4.6 1.4 1.4V7h3a1.5 1.5 0 0 1 1.5 1.7l-.7 4.6A1.5 1.5 0 0 1 11.8 14H5zM5 8H2.5v6H5" strokeLinejoin="round"/>
    </svg>
  ),
};

window.Icon = Icon;
window.BRAND = BRAND;
window.ROUTES = ROUTES;

// ============================================================
//  Logo (clean vector reconstruction of the FB wordmark)
// ============================================================
function Logo({ size = 28, color = "currentColor", showText = true }) {
  return (
    <div style={{ display: "inline-flex", alignItems: "center", gap: 10, color }}>
      <svg width={size} height={size} viewBox="0 0 40 40" fill="none">
        <rect x="0.5" y="0.5" width="39" height="39" rx="3.5" stroke="currentColor" strokeWidth="1" fill="none"/>
        <path d="M11 13v14M11 13h6a3.5 3.5 0 1 1 0 7h-6" stroke="currentColor" strokeWidth="2" strokeLinecap="square" fill="none"/>
        <path d="M21 27V13M21 13h4a3 3 0 0 1 3 3v2M28 18l-5 4 5 5" stroke="currentColor" strokeWidth="2" strokeLinecap="square" strokeLinejoin="miter" fill="none"/>
        <path d="M14 7l3-2 3 2M20 7l3-2 3 2" stroke="currentColor" strokeWidth="1" strokeLinecap="round" fill="none"/>
      </svg>
      {showText && (
        <div style={{ lineHeight: 1, fontFamily: "var(--display)", fontWeight: 600, fontSize: 17, letterSpacing: "-0.01em" }}>
          Panorama
          <span style={{ marginLeft: 6, fontFamily: "var(--mono)", fontSize: 10, letterSpacing: "0.14em", textTransform: "uppercase", color: "var(--muted)", fontWeight: 500 }}>
            BUR&nbsp;DUBAI
          </span>
        </div>
      )}
    </div>
  );
}
window.Logo = Logo;

// ============================================================
//  Score badge — Trivago 6.5/10, framed not hidden
// ============================================================
function ScoreBadge({ compact = false, source = "Trivago" }) {
  return (
    <div className="score" role="img" aria-label={`${BRAND.trivagoScore} out of 10 from ${BRAND.trivagoReviews.toLocaleString()} guests on ${source}`}>
      <div className="score-num num">{BRAND.trivagoScore}</div>
      <div className="score-text">
        <div>{compact ? `${source} 6.5/10` : "Decent · 6.5 / 10"}</div>
        <div>{BRAND.trivagoReviews.toLocaleString()} {source} reviews</div>
      </div>
    </div>
  );
}
window.ScoreBadge = ScoreBadge;

// ============================================================
//  Price-from chip
// ============================================================
function PriceFromChip({ amount = 79, currency = "AED", note = "per night" }) {
  return (
    <div style={{
      display: "inline-flex",
      alignItems: "baseline",
      gap: 8,
      padding: "10px 16px",
      borderRadius: 999,
      background: "var(--accent)",
      color: "white",
      boxShadow: "var(--shadow-sm)",
    }}>
      <span style={{ fontSize: 11, fontFamily: "var(--mono)", letterSpacing: "0.14em", textTransform: "uppercase", opacity: 0.85 }}>From</span>
      <span className="num" style={{ fontSize: 19, fontWeight: 600 }}>{currency} {amount}</span>
      <span style={{ fontSize: 12.5, opacity: 0.88 }}>{note}</span>
    </div>
  );
}
window.PriceFromChip = PriceFromChip;

// ============================================================
//  Distance chip — one location proof point
// ============================================================
function DistanceChip({ icon = "walk", label, distance, time }) {
  const I = Icon[icon] || Icon.walk;
  return (
    <div style={{
      display: "inline-flex",
      alignItems: "center",
      gap: 10,
      padding: "8px 14px",
      borderRadius: 999,
      background: "rgba(255,255,255,0.92)",
      backdropFilter: "blur(6px)",
      WebkitBackdropFilter: "blur(6px)",
      border: "1px solid rgba(11,27,43,0.08)",
      color: "var(--ink)",
      fontSize: 13.5,
      fontWeight: 500,
    }}>
      <span style={{ color: "var(--accent)", display: "inline-flex" }}><I /></span>
      <span>{label}</span>
      <span className="num" style={{ color: "var(--muted)", fontSize: 12.5 }}>{distance}{time ? ` · ${time}` : ""}</span>
    </div>
  );
}
window.DistanceChip = DistanceChip;

// ============================================================
//  Top navigation
// ============================================================
function Navbar({ route, setRoute, scrolled }) {
  const [mobileOpen, setMobileOpen] = useState(false);
  return (
    <>
      <header className="nav-desktop" style={{
        position: "sticky", top: 0, zIndex: 40,
        background: scrolled ? "rgba(255,255,255,0.92)" : "rgba(255,255,255,0.6)",
        backdropFilter: "blur(14px)",
        WebkitBackdropFilter: "blur(14px)",
        borderBottom: scrolled ? "1px solid var(--line)" : "1px solid transparent",
        transition: "background 180ms ease, border-color 180ms ease",
      }}>
        <div className="wrap" style={{ display: "flex", alignItems: "center", justifyContent: "space-between", height: 68 }}>
          <a href="#home" onClick={(e) => { e.preventDefault(); setRoute("home"); }} aria-label="Panorama Hotel home" style={{ display: "inline-flex" }}>
            <Logo size={26} />
          </a>
          <nav style={{ display: "flex", gap: 4 }} aria-label="Primary">
            {ROUTES.map(r => (
              <button
                key={r.id}
                onClick={() => setRoute(r.id)}
                style={{
                  padding: "8px 12px",
                  borderRadius: 8,
                  background: "none",
                  border: 0,
                  fontSize: 14,
                  fontWeight: 500,
                  color: route === r.id ? "var(--ink)" : "var(--muted)",
                  position: "relative",
                  transition: "color 120ms",
                }}
                onMouseEnter={(e) => e.currentTarget.style.color = "var(--ink)"}
                onMouseLeave={(e) => e.currentTarget.style.color = route === r.id ? "var(--ink)" : "var(--muted)"}
              >
                {r.label}
                {route === r.id && (
                  <span style={{
                    position: "absolute", left: 12, right: 12, bottom: -1,
                    height: 2, background: "var(--accent)", borderRadius: 2,
                  }}/>
                )}
              </button>
            ))}
          </nav>
          <div style={{ display: "flex", gap: 8, alignItems: "center" }}>
            <a href={BRAND.phoneHref} className="btn btn-ghost btn-sm" aria-label={`Call reception ${BRAND.phone}`}>
              <Icon.phone /> <span className="num">{BRAND.phone}</span>
            </a>
            <button className="btn btn-primary btn-sm" onClick={() => setRoute("home")}>
              Book direct <Icon.arrow />
            </button>
          </div>
        </div>
      </header>

      {/* Mobile nav */}
      <header className="nav-mobile" style={{
        display: "none",
        position: "sticky", top: 0, zIndex: 40,
        background: "rgba(255,255,255,0.95)",
        backdropFilter: "blur(14px)",
        WebkitBackdropFilter: "blur(14px)",
        borderBottom: "1px solid var(--line)",
        alignItems: "center",
        justifyContent: "space-between",
        padding: "14px 20px",
      }}>
        <a href="#home" onClick={(e) => { e.preventDefault(); setRoute("home"); setMobileOpen(false); }} style={{ display: "inline-flex" }}>
          <Logo size={24} />
        </a>
        <button
          aria-label="Open menu"
          onClick={() => setMobileOpen(!mobileOpen)}
          style={{
            width: 40, height: 40, borderRadius: 10, border: "1px solid var(--line)",
            background: "white", display: "grid", placeItems: "center",
          }}
        >
          {mobileOpen ? <Icon.close /> : <Icon.menu />}
        </button>
      </header>

      {/* Mobile drawer */}
      {mobileOpen && (
        <div style={{
          position: "fixed", inset: 0, zIndex: 60, background: "rgba(11,27,43,0.4)",
        }} onClick={() => setMobileOpen(false)}>
          <div
            onClick={(e) => e.stopPropagation()}
            style={{
              position: "absolute", top: 0, right: 0, bottom: 0,
              width: "min(86%, 340px)", background: "white",
              padding: 24, display: "flex", flexDirection: "column", gap: 4,
              animation: "pgIn 240ms cubic-bezier(.2,.7,.2,1)",
            }}
          >
            <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 20 }}>
              <Logo size={24} />
              <button aria-label="Close menu" onClick={() => setMobileOpen(false)}
                style={{ width: 40, height: 40, borderRadius: 10, border: "1px solid var(--line)", background: "white", display: "grid", placeItems: "center" }}>
                <Icon.close />
              </button>
            </div>
            {ROUTES.map(r => (
              <button key={r.id}
                onClick={() => { setRoute(r.id); setMobileOpen(false); }}
                style={{
                  textAlign: "left", padding: "14px 4px", border: 0, background: "none",
                  fontSize: 18, fontFamily: "var(--display)", fontWeight: 500,
                  color: route === r.id ? "var(--accent)" : "var(--ink)",
                  borderBottom: "1px solid var(--line-soft)",
                }}
              >{r.label}</button>
            ))}
            <div style={{ marginTop: 20, display: "flex", flexDirection: "column", gap: 10 }}>
              <a className="btn btn-primary" href={BRAND.whatsapp} target="_blank" rel="noopener">
                <Icon.whatsapp /> WhatsApp reception
              </a>
              <a className="btn btn-ghost" href={BRAND.phoneHref}>
                <Icon.phone /> <span className="num">{BRAND.phone}</span>
              </a>
            </div>
          </div>
        </div>
      )}
    </>
  );
}
window.Navbar = Navbar;

// ============================================================
//  WhatsApp FAB (mobile)
// ============================================================
function WhatsAppFab() {
  return (
    <a
      href={BRAND.whatsapp}
      target="_blank"
      rel="noopener"
      aria-label="Message reception on WhatsApp"
      style={{
        position: "fixed",
        right: 16, bottom: 90,
        zIndex: 45,
        width: 54, height: 54, borderRadius: 999,
        background: "#1FAE5A", color: "white",
        boxShadow: "0 12px 32px -6px rgba(31,174,90,0.45), 0 4px 10px rgba(0,0,0,0.12)",
        display: "grid", placeItems: "center",
      }}
      className="wa-fab"
    >
      <Icon.whatsapp width={26} height={26} />
    </a>
  );
}
window.WhatsAppFab = WhatsAppFab;

// ============================================================
//  Mobile booking strip
// ============================================================
function MobileStrip({ setRoute }) {
  return (
    <div className="mobile-strip">
      <div style={{ flex: 1 }}>
        <div className="label" style={{ color: "var(--muted)", fontSize: 10 }}>From</div>
        <div style={{ display: "flex", alignItems: "baseline", gap: 6 }}>
          <span className="num" style={{ fontWeight: 600, fontSize: 18 }}>AED 79</span>
          <span style={{ color: "var(--muted)", fontSize: 12 }}>per night</span>
        </div>
      </div>
      <a href={BRAND.whatsapp} target="_blank" rel="noopener" className="btn btn-whatsapp btn-sm" aria-label="WhatsApp reception">
        <Icon.whatsapp /> WhatsApp
      </a>
      <button className="btn btn-primary btn-sm" onClick={() => setRoute("home")}>
        Book <Icon.arrow />
      </button>
    </div>
  );
}
window.MobileStrip = MobileStrip;

// ============================================================
//  Footer
// ============================================================
function Footer({ setRoute }) {
  return (
    <footer style={{ background: "var(--ink)", color: "white", padding: "64px 0 32px", marginTop: 0 }}>
      <div className="wrap">
        <div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))", gap: 40 }}>
          <div>
            <Logo size={26} color="white" />
            <p style={{ marginTop: 16, color: "rgba(255,255,255,0.65)", fontSize: 14, lineHeight: 1.6, maxWidth: 280 }}>
              58 rooms, six floors, one job: a clean bed and a strong shower 500 metres from Al Fahidi Metro.
            </p>
            <div style={{ marginTop: 16, display: "flex", gap: 8, flexWrap: "wrap" }}>
              <span className="micro-tag" style={{ background: "transparent", borderColor: "rgba(255,255,255,0.18)", color: "rgba(255,255,255,0.7)" }}>
                2★ classification
              </span>
              <span className="micro-tag" style={{ background: "transparent", borderColor: "rgba(255,255,255,0.18)", color: "rgba(255,255,255,0.7)" }}>
                {BRAND.dtcm}
              </span>
            </div>
          </div>

          <div>
            <div className="label" style={{ color: "rgba(255,255,255,0.5)", marginBottom: 14 }}>Visit</div>
            <ul style={{ listStyle: "none", padding: 0, margin: 0, display: "flex", flexDirection: "column", gap: 8, fontSize: 14, color: "rgba(255,255,255,0.85)" }}>
              {ROUTES.map(r => (
                <li key={r.id}>
                  <a href={`#${r.id}`} onClick={(e) => { e.preventDefault(); setRoute(r.id); }}
                    style={{ borderBottom: "1px solid transparent", paddingBottom: 1 }}
                    onMouseEnter={(e) => e.currentTarget.style.borderBottomColor = "rgba(255,255,255,0.5)"}
                    onMouseLeave={(e) => e.currentTarget.style.borderBottomColor = "transparent"}
                  >
                    {r.label}
                  </a>
                </li>
              ))}
            </ul>
          </div>

          <div>
            <div className="label" style={{ color: "rgba(255,255,255,0.5)", marginBottom: 14 }}>Contact</div>
            <ul style={{ listStyle: "none", padding: 0, margin: 0, display: "flex", flexDirection: "column", gap: 10, fontSize: 14, color: "rgba(255,255,255,0.85)" }}>
              <li><a href={BRAND.phoneHref} className="num">{BRAND.phone}</a></li>
              <li><a href={BRAND.whatsapp} target="_blank" rel="noopener">WhatsApp reception</a></li>
              <li><a href={BRAND.emailHref}>{BRAND.email}</a></li>
              <li style={{ color: "rgba(255,255,255,0.5)", fontSize: 12.5 }} className="num">Fax {BRAND.fax}</li>
            </ul>
          </div>

          <div>
            <div className="label" style={{ color: "rgba(255,255,255,0.5)", marginBottom: 14 }}>Address</div>
            <p style={{ margin: 0, fontSize: 14, color: "rgba(255,255,255,0.85)", lineHeight: 1.6 }}>
              {BRAND.address}<br/>
              Dubai, United Arab Emirates
            </p>
            <p style={{ marginTop: 14, fontSize: 12.5, color: "rgba(255,255,255,0.55)", lineHeight: 1.6 }}>
              Check-in 14:00 · Check-out 12:00<br/>
              24-hour reception
            </p>
          </div>
        </div>

        <div style={{ marginTop: 48, paddingTop: 24, borderTop: "1px solid rgba(255,255,255,0.12)", display: "flex", flexWrap: "wrap", gap: 16, justifyContent: "space-between", alignItems: "center" }}>
          <p style={{ margin: 0, fontSize: 12.5, color: "rgba(255,255,255,0.5)" }}>
            © {new Date().getFullYear()} Panorama Hotel Bur Dubai. Independent 2-star property licensed by DTCM (226715). Last renovated 2014.
          </p>
          <p style={{ margin: 0, fontSize: 12, color: "rgba(255,255,255,0.4)" }}>
            <strong style={{ color: "rgba(255,255,255,0.65)", fontWeight: 500 }}>Booking notice:</strong>&nbsp;
            this is our only official site. Older URLs may redirect to third-party domains we do not control.
          </p>
        </div>
      </div>
    </footer>
  );
}
window.Footer = Footer;

// ============================================================
//  Reusable section header
// ============================================================
function SectionHeader({ eyebrow, title, kicker, align = "left", maxWidth }) {
  return (
    <div style={{ textAlign: align, marginBottom: 40, maxWidth: maxWidth || (align === "center" ? 720 : 820), marginLeft: align === "center" ? "auto" : 0, marginRight: align === "center" ? "auto" : 0 }}>
      {eyebrow && <div className="eyebrow" style={{ marginBottom: 12 }}>{eyebrow}</div>}
      <h2 className="display" style={{ fontSize: "clamp(28px, 4vw, 44px)", margin: 0, color: "var(--ink)" }}>{title}</h2>
      {kicker && <p style={{ marginTop: 16, fontSize: 17, color: "var(--muted)", lineHeight: 1.55, textWrap: "pretty" }}>{kicker}</p>}
    </div>
  );
}
window.SectionHeader = SectionHeader;

// ============================================================
//  Amenity row (small inline icons)
// ============================================================
function AmenityRow({ items }) {
  return (
    <div style={{ display: "flex", flexWrap: "wrap", gap: 10, color: "var(--muted)", fontSize: 13 }}>
      {items.map((it, i) => {
        const I = Icon[it.icon] || Icon.check;
        return (
          <span key={i} style={{ display: "inline-flex", alignItems: "center", gap: 5 }}>
            <I /> {it.label}
          </span>
        );
      })}
    </div>
  );
}
window.AmenityRow = AmenityRow;

// ============================================================
//  Image
// ============================================================
function Img({ src, alt, ratio = "16/9", warm = false, dark = false, style }) {
  return (
    <div className={"photo-tint" + (warm ? " photo-warm-tint" : "") + (dark ? " hero" : "")} style={{ aspectRatio: ratio, borderRadius: 12, ...style }}>
      <img src={src} alt={alt} loading="lazy" />
    </div>
  );
}
window.Img = Img;
