/* ==========================================================================
   home.css — public landing page (Viator-style marketplace)
   Uses the tokens from styles.css.
   ========================================================================== */

.home-body { display: block; background: var(--bg); }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-inner {
  max-width: 1220px; margin: 0 auto; padding: 10px clamp(12px, 2vw, 22px);
  display: flex; align-items: center; gap: 18px;
}
.hdr-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.hdr-logo .logo-mark { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.hdr-logo .logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.hdr-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.hdr-logo-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.hdr-logo-text small { font-size: 11px; color: var(--muted); }

.hdr-nav { display: flex; align-items: center; gap: 20px; margin-left: 6px; }
.hdr-nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .16s ease, border-color .16s ease; }
.hdr-nav a:hover { color: var(--accent); border-color: var(--accent); }

.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hdr-cta { width: auto; height: 42px; padding: 0 16px; font-size: 13.5px; border-radius: 12px; }
.hdr-user { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 13.5px; background: var(--card-3); border: 1px solid var(--line);
  padding: 4px 12px 4px 4px; border-radius: 99px; }
.hdr-user-name { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: clamp(420px, 56vw, 560px); display: grid; place-items: center;
  text-align: center; overflow: hidden; padding: clamp(60px, 9vw, 110px) 18px clamp(46px, 6vw, 70px); }
.hero-bg { position: absolute; inset: 0; background-image: url('/hero-morocco.jpg');
  background-size: cover; background-position: center 42%; transform: scale(1.02); }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 16, 38, .58) 0%, rgba(6, 16, 38, .42) 40%, rgba(6, 16, 38, .68) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 900px; color: #fff; }
.hero-kicker { margin: 0 0 12px; font-size: 12.5px; font-weight: 800; letter-spacing: 2.4px;
  color: #ffd9a0; text-transform: uppercase; }
.hero-title { margin: 0 0 14px; font-size: clamp(28px, 5vw, 52px); line-height: 1.08;
  font-weight: 900; letter-spacing: -1.4px; text-shadow: 0 3px 24px rgba(0, 0, 0, .45); }
.hero-sub { margin: 0 auto 26px; max-width: 62ch; font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.6; color: rgba(255, 255, 255, .92); }

.hero-search { display: flex; align-items: center; gap: 8px; max-width: 620px; margin: 0 auto;
  background: #fff; border-radius: 99px; padding: 7px 7px 7px 18px;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .55); }
.hs-ico { display: grid; place-items: center; color: #6b7793; flex: 0 0 auto; }
.hs-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.hero-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: 15px; color: #0f172a; height: 44px; }
.hero-search input::placeholder { color: #8b98b3; }
.hs-btn { width: auto; height: 46px; padding: 0 26px; border-radius: 99px; font-size: 14.5px; flex: 0 0 auto; }

.hero-stats { display: flex; justify-content: center; gap: clamp(20px, 5vw, 56px); margin-top: 30px; }
.hstat { display: flex; flex-direction: column; align-items: center; }
.hstat strong { font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -.8px; }
.hstat span { font-size: 12.5px; color: rgba(255, 255, 255, .82); font-weight: 600; }

/* ---------- sections ---------- */
.wrap { max-width: 1220px; margin: 0 auto; padding: clamp(34px, 5vw, 60px) clamp(14px, 2vw, 22px); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-head h2 { margin: 0 0 6px; font-size: clamp(21px, 2.6vw, 30px); font-weight: 900; letter-spacing: -.8px; }
.sec-head p { margin: 0; color: var(--muted); font-size: 14.5px; }
.mid-title { text-align: center; margin: 0 0 28px; font-size: clamp(21px, 2.6vw, 30px); font-weight: 900; letter-spacing: -.8px; }

.cats { display: inline-flex; gap: 4px; background: var(--card-3); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px; }
.cat { border: 0; background: transparent; cursor: pointer; font-family: inherit; font-size: 13.5px;
  font-weight: 700; color: var(--muted); padding: 8px 18px; border-radius: 99px; transition: all .18s ease; }
.cat:hover { color: var(--ink); }
.cat.active { background: var(--card); color: var(--accent); box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }

/* ---------- product grid (premium cards) ---------- */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: clamp(16px, 2vw, 26px); }
.pcard {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 14px 34px -24px rgba(20, 38, 80, .42); display: flex; flex-direction: column;
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s ease, border-color .28s ease;
}
.pcard:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(20, 38, 80, .5); border-color: var(--line-strong); }
.pcard::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55); opacity: .6; }
.pcard-media { position: relative; display: block; text-decoration: none; overflow: hidden; }
.pcard-media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none;
  background: linear-gradient(to top, rgba(6,12,28,.42), rgba(6,12,28,0)); z-index: 1; }
.pcard-media img, .pcard-ph { width: 100%; height: 208px; object-fit: cover; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--card-3), var(--card-2)); color: var(--faint);
  transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.pcard:hover .pcard-media img { transform: scale(1.07); }
.pcard-ph svg { width: 42px; height: 42px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.pcard-badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 10.5px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase; padding: 6px 11px; border-radius: 99px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px); }
.pcard-badge.driver { background: linear-gradient(135deg, #f2994a, #eb5757); }

.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; }
.pcard-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 20px; }
.pill-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase; color: var(--ok); background: var(--ok-soft);
  border: 1px solid var(--ok-line); border-radius: 99px; padding: 3px 8px; }
.pill-ok svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; }
.pcard-city { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pcard-city svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.pcard-title { font-size: 16px; font-weight: 800; letter-spacing: -.35px; line-height: 1.34; color: var(--ink);
  text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 43px; }
.pcard-title:hover { color: var(--accent); }
.pcard-seller { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.pc-av, .pc-av-fb { width: 34px; height: 34px; border-radius: 11px; object-fit: cover; flex: 0 0 auto;
  box-shadow: 0 4px 10px -6px rgba(0,0,0,.5); }
.pc-av-fb { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, #3b6ef6, #7b61ff); }
.pc-av-fb.alt { background: linear-gradient(135deg, #f2994a, #eb5757); }
.pc-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.pc-who strong { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-who small { font-size: 11px; color: var(--muted); }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.pcard-price { display: flex; flex-direction: column; line-height: 1.1; }
.pcard-price small { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.pcard-price b { font-size: 17.5px; font-weight: 900; color: var(--ink); letter-spacing: -.5px; }
.pc-btn { width: auto; height: 40px; padding: 0 18px; font-size: 13px; border-radius: 12px; font-weight: 800;
  box-shadow: 0 10px 22px -12px var(--shadow-brand); }
.pcard:hover .pc-btn { transform: translateY(-1px); }

.home-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); }
.home-empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; font-weight: 800; }

/* ---------- cities ---------- */
.cities { background: linear-gradient(180deg, var(--card-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cities h2 { margin: 0 0 20px; font-size: clamp(21px, 2.6vw, 30px); font-weight: 900; letter-spacing: -.8px; }
.city-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 99px;
  border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--ink); transition: all .18s ease; }
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.chip svg { width: 15px; height: 15px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; }
.chip em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--card-3);
  border-radius: 99px; padding: 2px 8px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px;
  box-shadow: var(--shadow-md); }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 14px;
  font-size: 18px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.step h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 800; letter-spacing: -.3px; }
.step p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- CTA band ---------- */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: clamp(26px, 4vw, 44px); border-radius: 24px; color: #fff; overflow: hidden; position: relative;
  background: linear-gradient(120deg, #2f5df0 0%, #3b6ef6 45%, #7b61ff 100%);
  box-shadow: var(--shadow-lg); }
.cta-band::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  right: -90px; top: -140px; background: rgba(255, 255, 255, .12); }
.cta-text { position: relative; z-index: 1; max-width: 620px; }
.cta-text h2 { margin: 0 0 8px; font-size: clamp(20px, 2.4vw, 27px); font-weight: 900; letter-spacing: -.6px; }
.cta-text p { margin: 0; font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, .9); }
.cta-btn { position: relative; z-index: 1; width: auto; height: 50px; padding: 0 26px; font-size: 15px;
  border-radius: 14px; background: #fff; color: var(--accent-dark); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }
.cta-btn:hover { transform: translateY(-2px); }

/* ---------- footer ---------- */
.ftr { background: var(--ink); color: rgba(255, 255, 255, .82); margin-top: 20px; }
.ftr-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 34px; padding-bottom: 24px; }
.ftr-brand { display: flex; align-items: center; gap: 12px; max-width: 420px; }
.ftr-brand .logo-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); flex: 0 0 auto; }
.ftr-brand .logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.ftr-brand strong { color: #fff; font-size: 15.5px; font-weight: 800; }
.ftr-brand p { margin: 3px 0 0; font-size: 13px; color: rgba(255, 255, 255, .68); }
.ftr-links { display: flex; gap: 20px; flex-wrap: wrap; }
.ftr-links a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.ftr-links a:hover { color: #fff; text-decoration: underline; }
.ftr-bottom { border-top: 1px solid rgba(255, 255, 255, .14); text-align: center; padding: 16px;
  font-size: 12.5px; color: rgba(255, 255, 255, .6); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hdr-nav { display: none; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hdr-inner { gap: 10px; }
  .hdr-logo-text small { display: none; }
  #hdrProvider { display: none !important; }
  .hdr-actions { gap: 7px; }
  .lang-switch button { padding: 6px 8px; }
  .hdr-cta { height: 38px; padding: 0 12px; font-size: 12.5px; }
  .hdr-user-name { display: none; }
  .hdr-user { padding: 3px; }
  .hero { min-height: 460px; }
  .hero-search { flex-direction: column; border-radius: 20px; padding: 10px; }
  .hero-search input { height: 46px; padding: 0 6px; width: 100%; text-align: center; }
  .hs-ico { display: none; }
  .hs-btn { width: 100%; border-radius: 14px; }
  .hero-stats { gap: 20px; }
  .grid-products { grid-template-columns: 1fr 1fr; }
  .pcard-media img, .pcard-ph { height: 130px; }
  .pcard-foot { flex-direction: column; align-items: stretch; }
  .pc-btn { width: 100%; }
}
@media (max-width: 460px) {
  .grid-products { grid-template-columns: 1fr; }
  .pcard-media img, .pcard-ph { height: 190px; }
}


/* ==========================================================================
   RTL — Arabic support. Applies when <html dir="rtl">.
   A few flex rows and paddings are mirrored; text alignment follows dir.
   ========================================================================== */
html[dir="rtl"] body { font-family: 'Cairo', 'Noto Kufi Arabic', 'Segoe UI', Tahoma, 'Inter', sans-serif; }
html[dir="rtl"] .hdr-inner,
html[dir="rtl"] .appbar,
html[dir="rtl"] .appbar-brand,
html[dir="rtl"] .appbar-actions,
html[dir="rtl"] .hdr-actions,
html[dir="rtl"] .hdr-logo,
html[dir="rtl"] .pcard-seller,
html[dir="rtl"] .pcard-foot,
html[dir="rtl"] .pcard-meta,
html[dir="rtl"] .ftr-links,
html[dir="rtl"] .me-chip,
html[dir="rtl"] .role-body { flex-direction: row-reverse; }
html[dir="rtl"] .sec-head,
html[dir="rtl"] .cta-band,
html[dir="rtl"] .hero-search { flex-direction: row-reverse; }
html[dir="rtl"] ul, html[dir="rtl"] ol { padding-right: 1.1em; padding-left: 0; }
html[dir="rtl"] .hdr-nav { flex-direction: row-reverse; }
html[dir="rtl"] .lang-switch { direction: ltr; }
html[dir="rtl"] .pcard-badge { left: auto; right: 12px; }
html[dir="rtl"] .verif-text, html[dir="rtl"] .paywall-text { text-align: right; }
html[dir="rtl"] .toast { text-align: right; }
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select { text-align: right; }
html[dir="rtl"] .hero-title, html[dir="rtl"] .hero-sub, html[dir="rtl"] .hero-kicker { text-align: right; }
