/* Guia Comercial — App Mobile Design System (Fase 1) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

body.app-mode {
  --app-primary: var(--primary);
  --app-primary-dark: var(--primary-dark);
  --app-primary-soft: var(--primary-soft, var(--primary-light));
  --app-bg: var(--background);
  --app-card: var(--card);
  --app-text: var(--foreground);
  --app-muted: var(--muted-foreground);
  --app-border: var(--border);
  --app-success: var(--success);
  --app-radius: 1rem;
  --app-nav-h: 4.25rem;
  --hero-bg: 222 47% 11%;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: hsl(var(--app-bg));
  color: hsl(var(--app-text));
  padding-bottom: calc(var(--app-nav-h) + env(safe-area-inset-bottom, 0px));
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body.app-mode .font-display,
body.app-mode h1,
body.app-mode h2,
body.app-mode h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  .app-main {
    max-width: 48rem;
  }
}

@media (min-width: 1280px) {
  .app-main {
    max-width: 72rem;
  }
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: hsl(var(--app-card) / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--app-border));
  padding: 0.75rem 1rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 72rem;
  margin: 0 auto;
}

.app-city {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--app-text));
}

.app-header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 11rem;
  text-decoration: none;
  color: inherit;
}

.app-header-logo img {
  height: 2rem;
  width: auto;
  max-width: 9.5rem;
  object-fit: contain;
  display: block;
}

.app-header-logo-fallback {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-primary);
  flex-shrink: 0;
}

.app-header-logo-text {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}

.app-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--app-primary-soft));
  color: hsl(var(--app-primary));
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.app-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.app-menu[hidden] {
  display: none !important;
}

.app-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.app-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(20rem, 86vw);
  background: hsl(var(--app-card));
  color: hsl(var(--app-text));
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  padding: max(0.85rem, env(safe-area-inset-top)) 0.85rem max(0.85rem, env(safe-area-inset-bottom));
  transform: translateX(-105%);
  transition: transform 0.22s ease;
}

.app-menu.is-open .app-menu-panel {
  transform: translateX(0);
}

.app-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid hsl(var(--app-border));
}

.app-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  flex: 1;
}

.app-menu-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: hsl(var(--app-text));
  text-decoration: none;
}

.app-menu-nav a:active,
.app-menu-nav a:hover {
  background: hsl(var(--app-primary-soft));
  color: hsl(var(--app-primary));
}

.app-menu-login,
.app-menu-logout {
  margin-top: 0.75rem;
  display: block;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.app-menu-login {
  background: var(--gradient-primary);
  color: #fff;
}

.app-menu-logout {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.app-icon-btn:active {
  transform: scale(0.94);
}

.app-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--gradient-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.app-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 1.1rem;
  background: hsl(var(--app-card));
  border: 1px solid hsl(var(--app-border));
  box-shadow: 0 8px 24px hsl(var(--app-primary) / 0.08);
  color: hsl(var(--app-muted));
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-search:focus-within,
a.app-search:hover {
  border-color: hsl(var(--app-primary) / 0.4);
  box-shadow: 0 10px 28px hsl(var(--app-primary) / 0.14);
}

.home-hero .app-search {
  border: 0;
  box-shadow: 0 12px 32px hsl(0 0% 0% / 0.22);
  border-radius: 9999px;
  padding: 0.95rem 1.15rem;
  color: hsl(220 10% 46%);
}

.home-hero {
  background: hsl(var(--hero-bg));
  color: #fff;
  padding: 0.85rem 1rem 2.25rem;
  padding-top: max(0.85rem, env(safe-area-inset-top));
  position: relative;
  width: 100%;
}

.home-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.home-hero-city {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  min-width: 0;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-hero .app-icon-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.home-hero-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: clamp(1.7rem, 6.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.15rem;
  max-width: 18ch;
}

.home-hero-title span {
  color: hsl(var(--app-primary));
}

.home-sheet {
  background: hsl(var(--app-card));
  border-radius: 1.5rem 1.5rem 0 0;
  margin-top: -1.1rem;
  position: relative;
  z-index: 1;
  padding-top: 0.35rem;
  box-shadow: 0 -10px 30px hsl(0 0% 0% / 0.08);
  min-height: 40vh;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 0.5rem;
}

.cat-chip-icon.is-solid {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 18px hsl(var(--app-primary) / 0.28);
}

.promo-banner {
  display: block;
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  min-height: 8.75rem;
  color: #fff;
  text-decoration: none;
  background: var(--gradient-primary);
  box-shadow: 0 14px 32px hsl(var(--app-primary) / 0.28);
}

.promo-banner-media {
  position: absolute;
  inset: 0;
}

.promo-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, hsl(var(--hero-bg) / 0.82) 0%, hsl(var(--app-primary) / 0.55) 55%, transparent 100%);
}

.promo-banner-body {
  position: relative;
  z-index: 1;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 8.75rem;
  max-width: 70%;
}

.promo-banner-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
  margin-bottom: 0.35rem;
}

.promo-banner-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
}

.promo-banner-cta {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background: #fff;
  color: hsl(var(--app-primary));
  font-size: 0.75rem;
  font-weight: 700;
}

.app-section {
  padding: 1.25rem 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.app-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.app-section-title h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: hsl(var(--app-primary));
}

.cat-scroll {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.15rem 0.15rem 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
  min-width: 0;
}

.cat-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  width: 4.5rem;
  text-align: center;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

.cat-grid .cat-chip {
  width: auto;
}

.cat-chip-icon {
  width: 3.75rem;
  height: 3.75rem;
  margin: 0 auto 0.45rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--app-primary-soft));
  color: hsl(var(--app-primary));
  box-shadow: inset 0 0 0 1px hsl(var(--app-primary) / 0.08);
  transition: transform 0.15s ease;
}

.cat-chip:active .cat-chip-icon {
  transform: scale(0.94);
}

.cat-chip span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: hsl(var(--app-text));
}

.card-h-scroll {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.card-h-scroll::-webkit-scrollbar {
  display: none;
}

.empresa-card {
  flex: 0 0 min(85vw, 18rem);
  background: hsl(var(--app-card));
  border: 1px solid hsl(var(--app-border));
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 6px 20px hsl(220 20% 20% / 0.05);
  scroll-snap-align: start;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.empresa-card:active {
  transform: scale(0.985);
}

.empresa-card-img {
  height: 8.5rem;
  background: hsl(var(--muted));
  position: relative;
  overflow: hidden;
}

.empresa-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empresa-card-body {
  padding: 0.85rem;
}

.fav-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 9999px;
  background: hsl(0 0% 100% / 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--app-muted));
  border: 0;
  box-shadow: 0 4px 12px hsl(0 0% 0% / 0.1);
  cursor: pointer;
}

.fav-btn.is-active {
  color: #e11d48;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

.status-pill.open {
  background: hsl(152 60% 92%);
  color: hsl(var(--app-success));
}

.status-pill.closed {
  background: hsl(0 70% 95%);
  color: hsl(0 70% 45%);
}

.oferta-card {
  border-radius: 1.25rem;
  overflow: hidden;
  background: hsl(var(--app-card));
  border: 1px solid hsl(var(--app-border));
  box-shadow: 0 8px 24px hsl(220 20% 20% / 0.06);
}

.oferta-card-img {
  height: 10rem;
  position: relative;
  background: hsl(var(--muted));
}

.oferta-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oferta-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
}

.banner-carousel {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  justify-content: center;
  padding: 0.1rem 0;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.banner-carousel::-webkit-scrollbar {
  display: none;
}

.banner-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  scroll-snap-align: center;
  border-radius: 1.25rem;
  min-height: 8.5rem;
  padding: 1.25rem;
  color: #fff;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px hsl(var(--app-primary) / 0.25);
  box-sizing: border-box;
}

.banner-slide.promo-banner {
  padding: 0;
}

/* Só em desktop o banner fica menor / carrossel */
@media (min-width: 1024px) {
  .banner-carousel {
    justify-content: flex-start;
  }

  .banner-slide {
    flex-basis: 48%;
    width: 48%;
    max-width: 48%;
  }
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: hsl(var(--app-card) / 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid hsl(var(--app-border));
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 -8px 30px hsl(220 20% 10% / 0.06);
}

@media (min-width: 1024px) {
  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 32rem;
    border-radius: 1.25rem 1.25rem 0 0;
    border: 1px solid hsl(var(--app-border));
    border-bottom: 0;
  }
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.35rem 0.1rem;
  font-size: 0.58rem;
  font-weight: 600;
  color: hsl(var(--app-muted));
  text-decoration: none;
  border-radius: 0.85rem;
  transition: color 0.15s ease, transform 0.15s ease;
  min-width: 0;
}

.bottom-nav a span {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  white-space: nowrap;
}

.bottom-nav a svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.18s ease;
}

.bottom-nav a.is-active {
  color: hsl(var(--app-primary));
}

.bottom-nav a.is-active svg {
  transform: scale(1.12);
}

.bottom-nav a:active {
  transform: scale(0.96);
}

.app-footer-mini {
  display: none;
}

@media (min-width: 1024px) {
  .app-footer-mini {
    display: block;
    text-align: center;
    padding: 2rem 1rem 1rem;
    font-size: 0.8rem;
    color: hsl(var(--app-muted));
  }
}

.site-footer-legacy {
  display: none !important;
}

body.app-mode .site-header-legacy {
  display: none !important;
}

.action-row {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: none;
}

.action-row::-webkit-scrollbar {
  display: none;
}

.action-btn {
  flex: 0 0 auto;
  min-width: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: hsl(var(--app-text));
  text-decoration: none;
}

.action-btn span.icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--app-primary-soft));
  color: hsl(var(--app-primary));
}

.hero-empresa {
  position: relative;
  height: 15rem;
  background: hsl(var(--muted));
}

.hero-empresa img,
.hero-empresa video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-empresa-actions {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  right: 0.85rem;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.skeleton {
  background: linear-gradient(90deg, hsl(220 16% 92%) 25%, hsl(220 16% 96%) 50%, hsl(220 16% 92%) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 0.75rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.install-banner {
  display: none;
  margin: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: hsl(var(--app-primary-soft));
  border: 1px solid hsl(var(--app-primary) / 0.15);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.install-banner.is-visible {
  display: flex;
}

.push-prompt-banner.is-visible {
  display: flex !important;
}
