/* largo.ph home page. Layout follows the foodpanda web home (sidebar + store grid);
   colors and type follow design-system/largo/MASTER.md. */
:root {
  --bg: #fffffc;
  --surface: #ffffff;
  --ink: #013b2d;
  --muted: #5b6b63;
  --line: #dce6df;
  --field: #eef3ef;
  --primary: #007a37;
  --primary-hover: #00672e;
  --on-primary: #ffffff;
  --brand: #00b14f;
  --tint: #dcf4e5;
  --tint-deep: #b8e8c9;
  --dark: #013b2d;
  --orange: #fc5a22;
  --orange-deep: #c2410c;
  --orange-soft: #fff0e8;
  --olive: #bfba00;
  --star: #b45309;
  --shadow: 0 1px 2px rgb(1 59 45 / 6%), 0 4px 16px rgb(1 59 45 / 6%);
  --radius: 16px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.5; }
h1, h2, h3 { font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 82rem; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--field); }
.btn-light { background: #fff; color: var(--dark); }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 1rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer; color: inherit;
}

/* Promo bar */
.promo-bar { background: var(--dark); color: #fff; position: relative; }
.promo-inner { display: flex; justify-content: center; gap: 12px; padding: 10px 56px; flex-wrap: wrap; }
.promo-btn {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase;
  border: 1.5px solid rgb(255 255 255 / 70%); border-radius: 8px; padding: 9px 14px;
}
.promo-btn:hover { background: rgb(255 255 255 / 10%); }
.promo-close { position: absolute; right: 4px; top: 50%; translate: 0 -50%; color: #fff; }

/* Header */
.site-header { background: var(--surface); box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.logo img { display: block; height: 30px; width: auto; }
.logo picture { display: block; }
.location { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.95rem; margin-inline: auto; }
.location strong { color: var(--ink); font-weight: 600; }
.location svg { color: var(--primary); }
.header-actions { display: flex; gap: 10px; }
.nav-row { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding-bottom: 10px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; min-height: 48px;
  border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tab[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--primary); }
.tab:hover { color: var(--ink); }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--field); border-radius: 999px;
  padding: 0 18px; min-height: 48px; width: min(100%, 26rem); color: var(--muted);
}
.search input { border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); width: 100%; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { outline: 3px solid var(--brand); outline-offset: 0; }

@media (max-width: 860px) {
  .location { display: none; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-outline { display: none; }
  .nav-row { flex-direction: column-reverse; align-items: stretch; gap: 4px; padding-bottom: 0; }
  .search { width: 100%; }
}

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 24px 64px; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: 16.5rem minmax(0, 1fr); gap: 40px; }
  .sidebar { position: sticky; top: 140px; align-self: start; }
}
.main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }

/* Sidebar */
.sidebar { display: grid; gap: 20px; }
.app-card { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 24px 20px; text-align: center; }
.app-card-mark { width: 56px; height: auto; margin: 0 auto 12px; display: block; }
.app-card p { font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
.store-badges { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.badge-btn {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--dark);
  border-radius: 8px; padding: 7px 10px; font-size: 0.85rem; font-weight: 600;
}
.badge-btn svg { width: 18px; height: 18px; }
.app-card .soon { font-size: 0.8rem; font-weight: 500; opacity: 0.8; margin-top: 10px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.filters h2 { font-size: 1.15rem; margin-bottom: 8px; }
fieldset { border: 0; padding: 0; margin: 16px 0 0; }
legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; padding: 0; }
.radio { display: flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; }
.radio input { appearance: none; width: 20px; height: 20px; margin: 0; border: 2px solid var(--muted); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.radio input:checked { border-color: var(--primary); }
.radio input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; cursor: pointer; font-size: 0.9rem; font-weight: 500;
}
.chip svg { width: 16px; height: 16px; color: var(--star); }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--tint); color: var(--ink); }
@media (max-width: 1023px) {
  .app-card { display: none; }
  .filters { border: 0; padding: 0; background: none; display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; }
  .filters h2 { display: none; }
  .filters fieldset { margin: 0; }
  .filters fieldset:first-of-type { display: flex; gap: 2px 14px; flex-wrap: wrap; align-items: center; }
  .filters legend { float: left; margin: 0 6px 0 0; line-height: 40px; }
  .filters fieldset:last-of-type legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Hero */
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  background: var(--tint); border-radius: var(--radius); padding: 32px 24px; min-height: 220px;
}
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; }
.hero-text { position: relative; z-index: 1; display: grid; gap: 12px; justify-items: start; max-width: 32rem; }
.hero-text p { color: var(--muted); font-size: 1.02rem; margin-bottom: 8px; }
.hero-art { display: none; }
@media (min-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr) 15rem; padding: 40px 40px; }
  .hero-art { display: block; position: relative; height: 200px; }
  .hero-art img { position: absolute; inset: 0; margin: auto; width: 150px; height: auto; filter: drop-shadow(0 12px 24px rgb(1 59 45 / 18%)); }
  .blob { position: absolute; border-radius: 50%; }
  .blob-a { width: 210px; height: 210px; background: var(--tint-deep); inset: 0; margin: auto; }
  .blob-b { width: 44px; height: 44px; background: var(--orange); top: 6px; right: 18px; }
  .blob-c { width: 26px; height: 26px; background: var(--olive); bottom: 10px; left: 14px; }
}

/* Section heads */
.block h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.015em; margin-bottom: 20px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.count { color: var(--muted); font-size: 0.95rem; }

/* Horizontal scrollers */
.scroller { position: relative; }
.cuisines, .deals { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
.cuisines::-webkit-scrollbar, .deals::-webkit-scrollbar { display: none; }
.scroll-next {
  position: absolute; right: -10px; top: 50%; translate: 0 -50%;
  background: var(--surface); box-shadow: 0 2px 10px rgb(1 59 45 / 18%); border: 1px solid var(--line);
}
@media (hover: none) { .scroll-next { display: none; } }

.cuisine {
  flex: none; width: 104px; display: grid; justify-items: center; gap: 10px; scroll-snap-align: start;
  border: 0; background: none; cursor: pointer; font-weight: 500; font-size: 0.95rem; color: var(--primary); padding: 4px 0;
}
.cuisine span {
  width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center;
  background: var(--tint); color: var(--primary); transition: transform .15s, background-color .15s;
}
.cuisine span svg { width: 40px; height: 40px; stroke-width: 1.6; }
.cuisine:hover span { transform: translateY(-2px); background: var(--tint-deep); }
.cuisine[aria-pressed="true"] span { background: var(--primary); color: var(--on-primary); }
.cuisine.grocery, .cuisine.grocery span { color: var(--orange-deep); }
.cuisine.grocery span { background: var(--orange-soft); }

/* Deals */
.deal {
  flex: none; width: min(80vw, 300px); min-height: 132px; scroll-snap-align: start; border-radius: var(--radius);
  padding: 18px; color: #fff; display: grid; align-content: space-between; gap: 12px; position: relative; overflow: hidden;
  border: 0; text-align: left; cursor: default;
}
.deal[data-color="green"] { background: #007a37; }
.deal[data-color="dark"] { background: #013b2d; }
.deal[data-color="orange"] { background: #c2410c; }
.deal[data-color="olive"] { background: #bfba00; color: #013b2d; }
.deal img { position: absolute; right: 0; top: 0; height: 100%; width: 42%; object-fit: cover; }
.deal.has-img .deal-text { max-width: 56%; }
.deal h3 { font-size: 1.2rem; line-height: 1.2; }
.deal p { font-size: 0.88rem; opacity: 0.92; margin-top: 4px; }
.code { justify-self: start; background: #fff; color: #013b2d; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 4px 10px; letter-spacing: 0.04em; }

/* Stores */
.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 24px 20px; }
.store-card {
  display: grid; gap: 10px; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; color: inherit; min-width: 0;
}
.store-cover {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--tint), var(--tint-deep)); display: grid; place-items: center;
}
.store-cover.grocery { background: linear-gradient(135deg, var(--orange-soft), #ffd9c5); }
.store-cover > img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.store-cover .ph-logo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: #fff; box-shadow: var(--shadow); }
.store-cover .ph-mark { width: 64px; height: auto; opacity: 0.55; }
.store-card:hover .store-cover > img { transform: scale(1.03); }
.closed-veil { position: absolute; inset: 0; background: rgb(1 59 45 / 55%); color: #fff; display: grid; place-items: center; font-weight: 600; }
.type-pill { position: absolute; left: 10px; bottom: 10px; background: var(--surface); color: var(--ink); font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.store-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.store-name { font-weight: 600; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9rem; font-weight: 600; flex: none; }
.rating svg { width: 16px; height: 16px; color: var(--star); fill: currentColor; }
.rating small { color: var(--muted); font-weight: 400; }
.store-sub { color: var(--muted); font-size: 0.9rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: -6px; }
.store-sub svg { width: 15px; height: 15px; }
.open-tag { color: var(--primary); font-weight: 600; }
.skeleton { aspect-ratio: 16 / 11; border-radius: var(--radius); background: var(--field); animation: pulse 1.4s ease-in-out infinite; cursor: default; }
@keyframes pulse { 50% { opacity: 0.55; } }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty img { width: 56px; height: auto; opacity: 0.8; }
.empty h3 { font-size: 1.2rem; }
.empty p { color: var(--muted); max-width: 32rem; }
.empty .btn { margin-top: 8px; }

/* App banner */
.app-banner {
  background: var(--dark); color: #fff; border-radius: var(--radius); padding: 32px 24px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center;
}
.app-banner img { width: 72px; height: auto; }
.app-banner h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.015em; }
.app-banner h2 span { color: #6fe3a4; }
.app-banner p { opacity: 0.9; margin-top: 8px; max-width: 40rem; }
.app-banner .notify a { color: #fff; font-weight: 600; }
@media (min-width: 720px) { .app-banner { grid-template-columns: auto minmax(0, 1fr); padding: 36px 40px; gap: 32px; } .app-banner img { width: 96px; } }

/* Partners */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.partner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; justify-items: start; }
.partner-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--tint); color: var(--primary); display: grid; place-items: center; }
.partner-icon svg { width: 24px; height: 24px; }
.partner h3 { font-size: 1.15rem; }
.partner p { color: var(--muted); margin-bottom: 8px; }

/* Footer */
.site-footer { background: var(--dark); color: rgb(255 255 255 / 85%); padding-block: 48px 120px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer-logo { height: 28px; width: auto; display: block; margin-bottom: 14px; }
.site-footer nav { display: grid; gap: 10px; align-content: start; }
.site-footer h2 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; margin-bottom: 4px; }
.site-footer a { color: rgb(255 255 255 / 85%); text-decoration: underline; text-decoration-color: rgb(255 255 255 / 35%); }
.site-footer a:hover { color: #fff; text-decoration-color: #fff; }
.copyright { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 15%); font-size: 0.85rem; }

/* Bottom bar */
.bottom-bar {
  position: fixed; left: 50%; bottom: 0; translate: -50% 0; z-index: 30; width: min(100%, 60rem);
  display: flex; align-items: center; gap: 14px; background: #011f18; color: #fff;
  border-radius: 20px 20px 0 0; padding: 12px 12px 12px 20px;
}
.bottom-bar[hidden] { display: none; }
.bottom-bar img { width: 28px; height: auto; }
.bottom-bar p { flex: 1; font-size: 0.95rem; }
.bottom-bar strong { color: #6fe3a4; font-weight: 600; }
@media (max-width: 600px) { .bottom-bar img, .bottom-bar .btn { display: none; } .bottom-bar p { font-size: 0.875rem; } }

/* Store dialog */
.store-dialog {
  width: min(100% - 32px, 40rem); max-height: min(100dvh - 48px, 48rem); padding: 0; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--ink); overflow: auto;
}
.store-dialog::backdrop { background: rgb(1 31 24 / 55%); }
.dlg-cover { aspect-ratio: 16 / 6; background: linear-gradient(135deg, var(--tint), var(--tint-deep)); }
.dlg-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlg-close { position: absolute; top: 12px; right: 12px; background: var(--surface); box-shadow: var(--shadow); }
.dlg-body { padding: 20px 24px 24px; display: grid; gap: 8px; }
.dlg-body h2 { font-size: 1.5rem; }
.dlg-meta { color: var(--muted); font-size: 0.92rem; display: flex; gap: 6px 12px; flex-wrap: wrap; }
.dlg-desc { margin-top: 4px; }
.menu { margin-top: 12px; display: grid; gap: 4px; }
.menu h3 { font-size: 1.05rem; margin: 14px 0 4px; }
.item { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item-text { min-width: 0; }
.item-name { font-weight: 600; }
.item-desc { color: var(--muted); font-size: 0.88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-price { font-weight: 600; margin-top: 4px; }
.item img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.item.sold-out { opacity: 0.55; }
.dlg-note { margin-top: 16px; background: var(--tint); border-radius: 12px; padding: 14px 16px; font-weight: 500; }
.dlg-note a { font-weight: 600; }
[hidden] { display: none !important; }
