/* ============================================
   PEDE BARRA - Identidade Visual
   Baseada na logo: Vermelho vibrante + Verde natureza
   ============================================ */

:root {
  --pb-red: #E30613;
  --pb-red-dark: #B00410;
  --pb-red-light: #FF3B47;
  --pb-green: #0E7A3D;
  --pb-green-dark: #084F27;
  --pb-green-light: #2FA85F;
  --pb-blue: #4FB3E8; /* cascata */
  --pb-bg: #FAFAFA;
  --pb-card: #FFFFFF;
  --pb-dark: #0F0F10;
  --pb-text: #1E1E22;
  --pb-muted: #6B7280;
  --pb-border: #E5E7EB;
  --pb-warn: #F59E0B;
  --pb-success: #10B981;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --radius: 14px;
  --radius-sm: 8px;
  --gradient-hero: linear-gradient(135deg, #0E7A3D 0%, #084F27 60%, #0F0F10 100%);
  --gradient-red: linear-gradient(135deg, #FF3B47 0%, #E30613 60%, #B00410 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--pb-text);
  background: var(--pb-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; font-size: 15px; }

/* ============ LOADER ============ */
.pb-loader {
  position: fixed; inset: 0; background: var(--pb-dark);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .4s;
}
.pb-loader.hide { opacity: 0; pointer-events: none; }
.pb-loader img { width: 180px; animation: pulse 1.6s infinite ease-in-out; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ============ HEADER ============ */
.pb-header {
  background: #fff;
  border-bottom: 1px solid var(--pb-border);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.pb-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 20px;
}
.pb-logo { display: flex; align-items: center; height: 48px; }
.pb-logo img { height: 48px; width: auto; }

.pb-location {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: #F3F4F6; border-radius: 10px;
  font-size: 14px; color: var(--pb-text); cursor: pointer;
  transition: background .2s;
}
.pb-location:hover { background: #E5E7EB; }
.pb-location i { color: var(--pb-red); flex-shrink: 0; }
.pb-location span {
  min-width: 0; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: left;
}

.pb-search {
  flex: 1; max-width: 520px; position: relative;
}
.pb-search input {
  width: 100%; min-width: 0; padding: 12px 16px 12px 44px;
  border: 1px solid var(--pb-border); border-radius: 12px;
  background: #F9FAFB; font-size: 15px; transition: all .2s;
}
.pb-search input:focus {
  outline: none; border-color: var(--pb-red); background: #fff;
  box-shadow: 0 0 0 3px rgba(227,6,19,.1);
}
.pb-search i {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--pb-muted);
}

.pb-header-actions { display: flex; gap: 10px; align-items: center; }

.pb-btn {
  padding: 10px 20px; border-radius: 10px; font-weight: 600;
  font-size: 14px; transition: all .2s; display: inline-flex;
  align-items: center; gap: 8px; cursor: pointer;
}
.pb-btn-primary { background: var(--pb-red); color: white; }
.pb-btn-primary:hover { background: var(--pb-red-dark); transform: translateY(-1px); }
.pb-btn-secondary { background: #fff; color: var(--pb-text); border: 1.5px solid var(--pb-border); }
.pb-btn-secondary:hover { border-color: var(--pb-red); color: var(--pb-red); }
.pb-btn-green { background: var(--pb-green); color: white; }
.pb-btn-green:hover { background: var(--pb-green-dark); }
.pb-btn-ghost { background: transparent; color: var(--pb-text); }
.pb-btn-ghost:hover { background: #F3F4F6; }
.pb-btn-danger { background: #FEE2E2; color: var(--pb-red-dark); }
.pb-btn-danger:hover { background: var(--pb-red); color: #fff; }
.pb-btn-sm { padding: 6px 12px; font-size: 13px; }
.pb-btn-lg { padding: 14px 28px; font-size: 16px; }
.pb-btn-block { width: 100%; justify-content: center; }

.pb-cart-btn { position: relative; }
.pb-cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--pb-red); color: #fff;
  width: 20px; height: 20px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ============ HERO ============ */
.pb-hero {
  background: var(--gradient-hero);
  color: white; padding: 60px 20px 80px;
  position: relative; overflow: hidden;
}
.pb-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(227,6,19,.25), transparent 60%);
  pointer-events: none;
}
.pb-hero-inner {
  max-width: 1080px; margin: 0 auto; position: relative;
  text-align: center;
}
.pb-hero h1 {
  font-size: clamp(28px, 5vw, 44px); font-weight: 800;
  margin-bottom: 12px; letter-spacing: -0.5px;
}
.pb-hero h1 span { color: #FFD54A; }
.pb-hero p {
  font-size: 17px; opacity: .95; margin-bottom: 30px;
  max-width: 560px; margin-left: auto; margin-right: auto;
}
.pb-hero-search {
  background: #fff; border-radius: 14px; padding: 8px;
  display: flex; gap: 8px; max-width: 640px; margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.pb-hero-search input {
  flex: 1; border: none; padding: 14px 18px; font-size: 15px;
  color: var(--pb-text); background: transparent;
}
.pb-hero-search input:focus { outline: none; }
.pb-hero-search button {
  background: var(--pb-red); color: #fff; padding: 12px 24px;
  border-radius: 10px; font-weight: 600;
}
.pb-hero-search button:hover { background: var(--pb-red-dark); }

/* ============ MAIN LAYOUT ============ */
.pb-container {
  max-width: 1280px; margin: 0 auto; padding: 40px 20px;
}

.pb-section { margin-bottom: 50px; }
.pb-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.pb-section-title {
  font-size: 22px; font-weight: 700; color: var(--pb-text);
  display: flex; align-items: center; gap: 10px;
}
.pb-section-title i { color: var(--pb-red); }

/* ============ CATEGORIES (carrossel horizontal responsivo) ============ */
.pb-categories-carousel {
  position: relative;
  margin: 0 -4px;
  overflow: hidden;
}
.pb-categories {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}
.pb-categories::-webkit-scrollbar { display: none; /* Chrome/Safari */ }
.pb-categories .pb-category-card {
  flex: 0 0 auto;
  width: 118px;
  scroll-snap-align: start;
}

/* Seta indicadora de "deslize horizontal" no carrossel de categorias */
.pb-categories-arrow {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-58%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--pb-red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(15, 15, 16, 0.12), 0 0 0 1px var(--pb-border);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .2s ease, background .2s ease;
}
.pb-categories-arrow.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.pb-categories-arrow:hover {
  background: var(--pb-red);
  color: #fff;
  transform: translateY(-58%) scale(1.06);
}
.pb-categories-arrow:active {
  transform: translateY(-58%) scale(0.96);
}
.pb-categories-arrow i,
.pb-categories-arrow svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}
/* Gradiente sutil atrás da seta para "revelar" que há mais conteúdo à direita */
.pb-categories-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: calc(100% - 12px);
  background: linear-gradient(to left, rgba(250,250,250,0.95) 20%, rgba(250,250,250,0));
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 2;
  border-radius: 0 8px 8px 0;
}
.pb-categories-carousel.has-overflow::after {
  opacity: 1;
}

/* Em telas grandes: ocupa a largura toda em grade, sem scroll */
@media (min-width: 1100px) {
  .pb-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    overflow-x: visible;
  }
  .pb-categories .pb-category-card { width: auto; }
  /* Em desktop, o carrossel vira grade — some com a seta e o gradiente */
  .pb-categories-arrow { display: none; }
  .pb-categories-carousel::after { display: none; }
}

/* Chips de subcategoria (aparecem ao clicar numa categoria principal) */
.pb-subcategories {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 4px 10px;
  margin-top: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pb-subcategories::-webkit-scrollbar { display: none; }
.pb-subcategory-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--pb-border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--pb-text);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.pb-subcategory-chip:hover { border-color: var(--pb-red); color: var(--pb-red); }
.pb-subcategory-chip.active {
  background: var(--pb-red);
  border-color: var(--pb-red);
  color: #fff;
}
.pb-category-card {
  background: #fff; border-radius: 14px; padding: 20px 14px;
  text-align: center; cursor: pointer; border: 1.5px solid var(--pb-border);
  transition: all .2s;
}
.pb-category-card:hover {
  border-color: var(--pb-red); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pb-category-card.active {
  border-color: var(--pb-red);
  background: linear-gradient(135deg, #FFF1F2, #FFFFFF);
  box-shadow: var(--shadow-md);
}
.pb-category-card.active .pb-category-icon {
  background: linear-gradient(135deg, #FECACA, #FCA5A5);
}
.pb-category-icon {
  width: 56px; height: 56px; margin: 0 auto 10px;
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 26px;
}
.pb-category-card span { font-size: 13px; font-weight: 600; }

/* ============ STORE CARDS ============ */
.pb-stores {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.pb-store-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--pb-border); cursor: pointer;
  transition: all .2s;
}
.pb-store-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
}
.pb-store-cover {
  height: 140px; background: linear-gradient(135deg, var(--pb-green), var(--pb-green-dark));
  position: relative; background-size: cover; background-position: center;
}
.pb-store-cover .pb-store-status {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.95);
}
.pb-store-status.open { color: var(--pb-green); }
.pb-store-status.closed { color: var(--pb-red); }
.pb-store-logo {
  position: absolute; bottom: -22px; left: 16px;
  width: 60px; height: 60px; border-radius: 12px;
  background: #fff; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); overflow: hidden;
  font-size: 24px; font-weight: 800; color: var(--pb-red);
}
.pb-store-logo img { width: 100%; height: 100%; object-fit: cover; }
.pb-store-body { padding: 30px 16px 16px; }
.pb-store-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.pb-store-address {
  font-size: 12px;
  color: #E30613;
  margin-bottom: 6px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.pb-store-address i { color: #E30613; }
.pb-store-address-line {
  font-size: 14px;
  color: #374151;
  margin: 4px 0 8px;
  font-weight: 500;
  background: #FEF2F2;
  border-left: 3px solid #E30613;
  padding: 6px 10px;
  border-radius: 4px;
  display: inline-block;
  max-width: 100%;
}
.pb-highlight-address {
  background: #FEF2F2;
  border: 1px dashed #FCA5A5;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 4px 0 8px;
}
.pb-highlight-address label { color: #B91C1C; font-weight: 700; }
.pb-store-cat { font-size: 13px; color: var(--pb-muted); margin-bottom: 10px; }
.pb-store-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--pb-muted);
}
.pb-store-meta .rating { color: var(--pb-warn); font-weight: 600; }

/* ============ EMPTY STATE ============ */
.pb-empty {
  text-align: center; padding: 60px 20px;
  background: #fff; border-radius: var(--radius);
  border: 2px dashed var(--pb-border);
}
.pb-empty-icon {
  width: 90px; height: 90px; margin: 0 auto 20px;
  background: linear-gradient(135deg, #FEE2E2, #DCFCE7);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 40px;
}
.pb-empty h3 { font-size: 20px; margin-bottom: 8px; }
.pb-empty p { color: var(--pb-muted); font-size: 15px; max-width: 400px; margin: 0 auto; }

/* ============ MODAL ============ */
.pb-modal {
  position: fixed; inset: 0; background: rgba(15,15,16,.6);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; backdrop-filter: blur(4px);
}
.pb-modal.active { display: flex; }
.pb-modal-content {
  background: #fff; border-radius: var(--radius);
  max-width: 480px; width: 100%; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.pb-modal-lg { max-width: 640px; }
.pb-modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--pb-border);
  display: flex; align-items: center; justify-content: space-between;
}
.pb-modal-title { font-size: 18px; font-weight: 700; }
.pb-modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--pb-muted); transition: all .2s;
}
.pb-modal-close:hover { background: #F3F4F6; color: var(--pb-text); }
.pb-modal-body { padding: 24px; }
.pb-modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--pb-border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ============ FORMS ============ */
.pb-form-group { margin-bottom: 16px; }
.pb-form-group label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--pb-text);
}
.pb-input, .pb-select, .pb-textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--pb-border); border-radius: 10px;
  background: #fff; transition: all .2s;
}
.pb-input:focus, .pb-select:focus, .pb-textarea:focus {
  outline: none; border-color: var(--pb-red);
  box-shadow: 0 0 0 3px rgba(227,6,19,.08);
}
.pb-textarea { min-height: 80px; resize: vertical; }
.pb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pb-form-hint { font-size: 12px; color: var(--pb-muted); margin-top: 4px; }
.pb-checkbox {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.pb-checkbox:hover { background: #F3F4F6; }
.pb-checkbox input { width: 18px; height: 18px; accent-color: var(--pb-red); }
.pb-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.pb-checkbox-chip {
  border: 1.5px solid var(--pb-border);
  background: #fff;
  min-height: 48px;
}
.pb-checkbox-chip:hover { border-color: var(--pb-red); }
.pb-checkbox-chip:has(input:checked) {
  border-color: var(--pb-red);
  background: #FFF1F2;
}
.pb-mobile-store-list {
  display: grid;
  gap: 14px;
}
.pb-mobile-store-card {
  background: #fff;
  border: 1px solid var(--pb-border);
  border-radius: var(--radius);
  padding: 16px;
}
.pb-mobile-store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* ============ AUTH PAGE ============ */
.pb-auth-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.pb-auth-card {
  background: #fff; border-radius: 20px; padding: 32px 24px 40px;
  max-width: 440px; width: 100%; box-shadow: var(--shadow-lg);
}
.pb-auth-logo {
  text-align: center; margin: -8px 0 8px;
  display: flex; justify-content: center; align-items: center;
}
.pb-auth-logo img {
  height: auto;
  width: 100%;
  max-width: 420px;
  max-height: 320px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@media (max-width: 480px) {
  .pb-auth-logo img { max-width: 100%; max-height: 280px; }
}
.pb-auth-title {
  text-align: center; font-size: 22px; font-weight: 700;
  margin-bottom: 8px;
}
.pb-auth-subtitle {
  text-align: center; color: var(--pb-muted); font-size: 14px;
  margin-bottom: 26px;
}
.pb-auth-tabs {
  display: flex; background: #F3F4F6; border-radius: 10px;
  padding: 4px; margin-bottom: 20px;
}
.pb-auth-tab {
  flex: 1; padding: 10px; border-radius: 8px;
  font-weight: 600; color: var(--pb-muted); font-size: 14px;
  transition: all .2s;
}
.pb-auth-tab.active { background: #fff; color: var(--pb-red); box-shadow: var(--shadow-sm); }
.pb-auth-footer {
  text-align: center; margin-top: 20px; font-size: 13px;
  color: var(--pb-muted);
}
.pb-auth-footer a { color: var(--pb-red); font-weight: 600; }

/* ============ ADMIN & STORE PANEL ============ */
.pb-app { display: flex; min-height: 100vh; }
.pb-sidebar {
  width: 260px; background: var(--pb-dark); color: #fff;
  padding: 24px 0; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; flex-shrink: 0;
}
.pb-sidebar-logo {
  padding: 0 24px 24px; border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 20px;
}
.pb-sidebar-logo img { height: 60px; }
.pb-sidebar-user {
  padding: 12px 24px 20px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.pb-sidebar-user-name { font-weight: 600; font-size: 14px; }
.pb-sidebar-user-role { font-size: 12px; opacity: .6; text-transform: uppercase; letter-spacing: .5px; }
.pb-menu { list-style: none; padding: 0 12px; }
.pb-menu li {
  padding: 11px 14px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; margin-bottom: 3px; opacity: .82;
  transition: all .15s;
}
.pb-menu li:hover { background: rgba(255,255,255,.06); opacity: 1; }
.pb-menu li.active {
  background: linear-gradient(90deg, var(--pb-red), var(--pb-red-dark));
  color: #fff; opacity: 1; box-shadow: var(--shadow-md);
}
.pb-menu li i { width: 20px; text-align: center; }
.pb-menu .divider {
  padding: 14px 0 6px; opacity: .4; font-size: 11px;
  text-transform: uppercase; letter-spacing: 1px; cursor: default;
}
.pb-menu .divider:hover { background: none; }
.pb-menu li.pb-menu-locked {
  opacity: .55; cursor: not-allowed;
}
.pb-menu li.pb-menu-locked:hover { background: rgba(255,255,255,.04); }
.pb-lock-badge {
  display: inline-block; margin-left: 6px;
  background: #F59E0B; color: #111827;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px;
  letter-spacing: .3px;
}

.pb-main {
  flex: 1; padding: 30px 40px; background: var(--pb-bg);
  min-width: 0;
}
.pb-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.pb-page-title { font-size: 26px; font-weight: 700; }
.pb-page-subtitle { color: var(--pb-muted); font-size: 14px; margin-top: 4px; }

/* ============ STATS CARDS ============ */
.pb-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 30px;
}
.pb-stat-card {
  background: #fff; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--pb-border); position: relative; overflow: hidden;
}
.pb-stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--pb-red);
}
.pb-stat-card.green::before { background: var(--pb-green); }
.pb-stat-card.blue::before { background: var(--pb-blue); }
.pb-stat-card.orange::before { background: var(--pb-warn); }
.pb-stat-label {
  font-size: 13px; color: var(--pb-muted);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px; font-weight: 600;
}
.pb-stat-value { font-size: 30px; font-weight: 800; }
.pb-stat-hint { font-size: 12px; color: var(--pb-muted); margin-top: 6px; }

/* ============ DATA TABLE ============ */
.pb-table-wrap {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--pb-border); overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.pb-table { width: 100%; border-collapse: collapse; }
.pb-table th {
  background: #F9FAFB; text-align: left; padding: 14px 20px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--pb-muted); font-weight: 700;
  border-bottom: 1px solid var(--pb-border);
}
.pb-table td {
  padding: 14px 20px; font-size: 14px;
  border-bottom: 1px solid var(--pb-border); vertical-align: middle;
}
.pb-table tr:last-child td { border-bottom: none; }
.pb-table tr:hover td { background: #FAFAFA; }
.pb-table-actions { display: flex; gap: 6px; }

.pb-tag {
  display: inline-block; padding: 4px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.pb-tag.active { background: #DCFCE7; color: var(--pb-green-dark); }
.pb-tag.inactive { background: #FEE2E2; color: var(--pb-red-dark); }
.pb-tag.pending { background: #FEF3C7; color: #92400E; }
.pb-tag.info { background: #DBEAFE; color: #1E40AF; }

/* ============ STORE PAGE ============ */
.pb-store-hero {
  height: 240px; background: linear-gradient(135deg, var(--pb-green), var(--pb-dark));
  background-size: cover; background-position: center;
  position: relative;
}
.pb-store-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.5));
}
.pb-store-info {
  background: #fff; margin-top: -50px; position: relative; z-index: 2;
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-md); display: flex; gap: 20px; align-items: center;
}
.pb-store-info-logo {
  width: 90px; height: 90px; border-radius: 16px;
  background: #fff; border: 4px solid #fff;
  overflow: hidden; box-shadow: var(--shadow-md); flex-shrink: 0;
}
.pb-store-info-logo img { width: 100%; height: 100%; object-fit: cover; }
.pb-store-info h1 { font-size: 24px; margin-bottom: 6px; }
.pb-store-info .meta {
  display: flex; gap: 16px; color: var(--pb-muted); font-size: 14px;
  flex-wrap: wrap;
}

.pb-catalog { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 30px; }
.pb-catalog-nav {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--pb-border); padding: 12px;
  position: sticky; top: 90px; height: fit-content; max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.pb-catalog-nav h4 {
  padding: 8px 12px; font-size: 12px; text-transform: uppercase;
  color: var(--pb-muted); letter-spacing: .5px;
}
.pb-catalog-nav a {
  display: block; padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--pb-text); transition: all .15s;
}
.pb-catalog-nav a:hover { background: #F3F4F6; }
.pb-catalog-nav a.active { background: #FEE2E2; color: var(--pb-red-dark); font-weight: 600; }

.pb-cat-section { margin-bottom: 30px; }
.pb-cat-title {
  font-size: 20px; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--pb-border);
}
.pb-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pb-product-card {
  background: #fff; border-radius: var(--radius); padding: 14px;
  border: 1px solid var(--pb-border); cursor: pointer;
  display: flex; gap: 12px; transition: all .2s;
}
.pb-product-card:hover { border-color: var(--pb-red); box-shadow: var(--shadow-md); }
.pb-product-info { flex: 1; min-width: 0; }
.pb-product-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.pb-product-desc {
  font-size: 13px; color: var(--pb-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}
.pb-product-price { font-weight: 700; color: var(--pb-red); font-size: 16px; }
.pb-product-price .old {
  color: var(--pb-muted); text-decoration: line-through;
  font-size: 13px; font-weight: 500; margin-right: 6px;
}
.pb-product-img {
  width: 90px; height: 90px; border-radius: 10px;
  background: #F3F4F6; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--pb-muted); overflow: hidden;
}
.pb-product-img img { width: 100%; height: 100%; object-fit: cover; }

/* ============ CART ============ */
.pb-cart-drawer {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 100%;
  height: 100vh; /* fallback */
  height: 100dvh; /* usa altura dinâmica no mobile p/ manter o rodapé sempre visível */
  background: #fff; box-shadow: var(--shadow-lg);
  z-index: 999; transition: right .3s ease;
  display: flex; flex-direction: column;
  overscroll-behavior: contain;
}
.pb-cart-drawer.active { right: 0; }
.pb-cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 998; display: none;
}
.pb-cart-overlay.active { display: block; }
.pb-cart-header {
  padding: 20px; border-bottom: 1px solid var(--pb-border);
  display: flex; align-items: center; justify-content: space-between;
}
.pb-cart-header h3 { font-size: 18px; font-weight: 700; }
.pb-cart-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.pb-cart-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--pb-border);
}
.pb-cart-item:last-child { border-bottom: none; }
.pb-cart-item-info { flex: 1; }
.pb-cart-item-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.pb-cart-item-price { color: var(--pb-red); font-weight: 700; font-size: 14px; }
.pb-cart-item-obs { font-size: 12px; color: var(--pb-muted); margin-top: 4px; font-style: italic; }
.pb-qty {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--pb-border); border-radius: 8px;
  padding: 4px; margin-top: 6px;
}
.pb-qty button {
  width: 26px; height: 26px; border-radius: 6px;
  background: #F3F4F6; color: var(--pb-red); font-weight: 700;
  font-size: 14px;
}
.pb-qty button:hover { background: var(--pb-red); color: #fff; }
.pb-qty span { min-width: 24px; text-align: center; font-weight: 600; }
.pb-cart-footer {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--pb-border);
  background: #FAFAFA;
  flex-shrink: 0;
  position: sticky; bottom: 0;
}
.pb-cart-row {
  display: flex; justify-content: space-between; font-size: 14px;
  margin-bottom: 6px;
}
.pb-cart-total {
  display: flex; justify-content: space-between; font-size: 17px;
  font-weight: 700; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--pb-border);
}
.pb-cart-total .val { color: var(--pb-red); }

/* ============ ORDER STATUS ============ */
.pb-status-track {
  background: #fff; border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--pb-border);
}
.pb-status-steps {
  display: flex; justify-content: space-between; position: relative;
  padding: 20px 0;
}
.pb-status-steps::before {
  content: ''; position: absolute; top: 40px; left: 8%; right: 8%;
  height: 3px; background: var(--pb-border); z-index: 0;
}
.pb-status-step {
  position: relative; z-index: 1; text-align: center; flex: 1;
}
.pb-status-step .dot {
  width: 40px; height: 40px; margin: 0 auto 8px;
  border-radius: 50%; background: #fff;
  border: 3px solid var(--pb-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--pb-muted);
}
.pb-status-step.done .dot { background: var(--pb-green); color: #fff; border-color: var(--pb-green); }
.pb-status-step.current .dot {
  background: var(--pb-red); color: #fff; border-color: var(--pb-red);
  animation: pulse-red 1.4s infinite;
}
.pb-status-step.cancelled .dot { background: var(--pb-red-dark); border-color: var(--pb-red-dark); color: #fff; }
@keyframes pulse-red { 0%,100% { box-shadow: 0 0 0 0 rgba(227,6,19,.5); } 50% { box-shadow: 0 0 0 10px rgba(227,6,19,0); } }
.pb-status-step .label { font-size: 12px; font-weight: 600; }
.pb-status-step.done .label, .pb-status-step.current .label { color: var(--pb-text); }
.pb-status-step .label { color: var(--pb-muted); }

/* ============ TABS ============ */
.pb-tabs {
  display: flex; gap: 4px; border-bottom: 1.5px solid var(--pb-border);
  margin-bottom: 20px;
}
.pb-tab {
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  color: var(--pb-muted); position: relative; cursor: pointer;
}
.pb-tab:hover { color: var(--pb-text); }
.pb-tab.active { color: var(--pb-red); }
.pb-tab.active::after {
  content: ''; position: absolute; bottom: -1.5px; left: 0; right: 0;
  height: 2.5px; background: var(--pb-red); border-radius: 2px;
}
.pb-tab-content { display: none; }
.pb-tab-content.active { display: block; }

/* ============ RATING ============ */
.pb-stars { display: inline-flex; gap: 2px; }
.pb-stars i { color: #D1D5DB; }
.pb-stars i.filled { color: #F59E0B; }
.pb-rating-input { display: inline-flex; gap: 6px; margin: 10px 0; align-items: center; }
.pb-rating-input i {
  font-size: 26px; color: #D1D5DB; cursor: pointer;
  transition: all .15s;
}
.pb-rating-input i:hover, .pb-rating-input i.hovered, .pb-rating-input i.selected {
  color: #F59E0B; transform: scale(1.1);
}
.pb-star-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; cursor: pointer;
  color: #D1D5DB; transition: color .15s, transform .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.pb-star-btn svg { width: 26px; height: 26px; stroke: currentColor; fill: none; pointer-events: none; }
.pb-star-btn:hover, .pb-star-btn.selected { color: #F59E0B; transform: scale(1.08); }
.pb-star-btn.selected svg { fill: #F59E0B; }

/* ============ FOOTER ============ */
.pb-footer {
  background: var(--pb-dark); color: #fff; padding: 50px 20px 20px;
  margin-top: 60px;
}
.pb-footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px;
  margin-bottom: 30px;
}
.pb-footer-logo img { height: 70px; margin-bottom: 14px; }
.pb-footer-desc { opacity: .7; font-size: 14px; line-height: 1.6; }
.pb-footer h4 { font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.pb-footer ul { list-style: none; }
.pb-footer li { padding: 5px 0; font-size: 14px; opacity: .7; cursor: pointer; transition: opacity .15s; }
.pb-footer li:hover { opacity: 1; color: var(--pb-red-light); }
.pb-footer-bottom {
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08);
  text-align: center; opacity: .5; font-size: 13px;
}

/* ============ TOAST ============ */
.pb-toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 2000;
  display: flex; flex-direction: column; gap: 10px;
}
.pb-toast {
  background: #fff; padding: 14px 18px; border-radius: 10px;
  box-shadow: var(--shadow-lg); border-left: 4px solid var(--pb-green);
  display: flex; align-items: center; gap: 12px; min-width: 260px;
  animation: slideInRight .3s ease;
}
.pb-toast.error { border-left-color: var(--pb-red); }
.pb-toast.warn { border-left-color: var(--pb-warn); }
.pb-toast.info { border-left-color: var(--pb-blue); }
.pb-toast i { font-size: 20px; }
.pb-toast.success i { color: var(--pb-green); }
.pb-toast.error i { color: var(--pb-red); }
.pb-toast.warn i { color: var(--pb-warn); }
.pb-toast.info i { color: var(--pb-blue); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .pb-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
  }
  .pb-location {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 10px;
  }
  .pb-search {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }
  .pb-header-actions {
    justify-self: end;
    gap: 8px;
  }
  .pb-header-actions .pb-btn { padding: 8px 14px; font-size: 13px; }
  .pb-hero { padding: 40px 20px 50px; }
  .pb-app { flex-direction: column; }
  .pb-sidebar {
    width: 100%; height: auto; position: relative;
    padding: 12px 0;
  }
  .pb-sidebar-logo { display: none; }
  .pb-sidebar-user { padding: 8px 20px; border: none; margin: 0; }
  .pb-menu { display: flex; overflow-x: auto; padding: 0 12px; gap: 6px; }
  .pb-menu li { flex-shrink: 0; padding: 8px 14px; font-size: 13px; }
  .pb-menu .divider { display: none; }
  .pb-main { padding: 20px; overflow-x: hidden; }
  .pb-catalog { grid-template-columns: 1fr; }
  .pb-catalog-nav { position: relative; top: 0; max-height: none; }
  .pb-footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .pb-form-row { grid-template-columns: 1fr; }
  .pb-store-info { flex-direction: column; text-align: center; }
  .pb-page-title { font-size: 22px; }
  .pb-status-steps { flex-wrap: wrap; gap: 12px; }
  .pb-status-steps::before { display: none; }
  .pb-status-step { flex: 0 0 30%; }
  .pb-table { min-width: 720px; }
}

@media (max-width: 500px) {
  .pb-logo img { height: 40px; }
  .pb-hero h1 { font-size: 26px; }
  .pb-hero-search { flex-direction: column; padding: 12px; }
  .pb-hero-search button { width: 100%; }
  .pb-stores { grid-template-columns: 1fr; }
  .pb-products { grid-template-columns: 1fr; }
  .pb-auth-card { padding: 24px; }
  .pb-cart-drawer { width: 100%; }
  .pb-btn { padding: 8px 14px; font-size: 13px; }
  .pb-header-inner { grid-template-columns: auto 1fr auto; }
  .pb-header-actions .pb-btn span { display: none; }
  .pb-header-actions { gap: 6px; }
  .pb-search input { font-size: 14px; }
  .pb-location { font-size: 12px; }
  .pb-modal { padding: 12px; }
  .pb-modal-body, .pb-modal-header, .pb-modal-footer { padding-left: 16px; padding-right: 16px; }
  .pb-mobile-store-actions .pb-btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

/* Utility */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--pb-muted); }
.text-red { color: var(--pb-red); }
.text-green { color: var(--pb-green); }

/* ============ SELETOR VISUAL DE CATEGORIAS ============ */
.pb-cat-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}
.pb-cat-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
  min-height: 90px;
  user-select: none;
}
.pb-cat-chip:hover {
  border-color: var(--pb-red);
  background: #FFF5F5;
  transform: translateY(-2px);
}
.pb-cat-chip.active {
  border-color: var(--pb-red);
  background: linear-gradient(135deg, #FFF5F5 0%, #FFE5E5 100%);
  box-shadow: 0 4px 12px rgba(227,6,19,.15);
}
.pb-cat-chip.active::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: var(--pb-red);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pb-cat-chip-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 6px;
}
.pb-cat-chip-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--pb-text);
  line-height: 1.2;
}
.pb-cat-chip-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  font-size: 9px;
  color: var(--pb-green);
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .pb-cat-picker {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }
  .pb-cat-chip { min-height: 80px; padding: 10px 6px; }
  .pb-cat-chip-icon { font-size: 24px; }
  .pb-cat-chip-name { font-size: 11px; }
}

/* ============ HEADER BANNER (NOVA LOGO) ============ */
.pb-header-banner {
  width: 100%;
  background: #fff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-bottom: 1px solid var(--pb-border);
}
.pb-header-banner img {
  width: 100%;
  max-width: 1280px;
  height: auto;
  display: block;
  object-fit: contain;
}
@media (max-width: 640px) {
  .pb-header-banner img { max-height: 140px; object-fit: cover; object-position: center; }
}

/* ============================================
   ANÚNCIOS PATROCINADOS - HOME
   ============================================ */
.pb-ads-section { padding-top: 8px; }

.pb-ads-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.pb-ads-header .pb-section-title {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.pb-ad-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #92400E;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid #FCD34D;
}

.pb-ads-carousel {
  position: relative;
  display: flex; align-items: stretch; gap: 10px;
}
.pb-ads-track-wrap {
  flex: 1; min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #F3F4F6;
  box-shadow: var(--shadow-sm);
}
.pb-ads-track {
  display: flex;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.pb-ad-slide {
  flex: 0 0 100%;
  display: flex; flex-direction: column;
  background: #fff;
  color: inherit; text-decoration: none;
  overflow: hidden;
  transition: transform .2s;
}
.pb-ad-slide:hover { transform: translateY(-2px); }

.pb-ad-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 520px;
  overflow: hidden;
  background: #0F0F10;
}
.pb-ad-image img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.pb-ad-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(15,15,16,.78); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em;
  padding: 5px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

.pb-ad-caption {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  border-top: 1px solid var(--pb-border);
  background: #fff;
}
.pb-ad-store { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pb-ad-store-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: #F3F4F6; display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: var(--pb-red); font-weight: 800;
  flex-shrink: 0;
}
.pb-ad-store-logo img { width: 100%; height: 100%; object-fit: cover; }
.pb-ad-store-name { font-weight: 700; font-size: 15px; color: var(--pb-text); }
.pb-ad-store-cat { font-size: 12px; color: var(--pb-muted); }

.pb-ads-nav {
  width: 44px; min-width: 44px; height: auto;
  border-radius: 12px;
  background: #fff; border: 1px solid var(--pb-border);
  color: var(--pb-text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.pb-ads-nav:hover { background: var(--pb-red); color: #fff; border-color: var(--pb-red); }

.pb-ads-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 12px;
}
.pb-ads-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #D1D5DB; border: none; cursor: pointer;
  transition: all .2s;
}
.pb-ads-dot.active { background: var(--pb-red); width: 22px; border-radius: 4px; }

@media (max-width: 720px) {
  .pb-ad-image { max-height: 380px; }
  .pb-ads-nav { display: none !important; }
  .pb-ad-caption { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pb-ad-caption .pb-btn { width: 100%; justify-content: center; }
}

@media (min-width: 900px) {
  .pb-ads-track-wrap { border-radius: 18px; }
  .pb-ad-image { max-height: 480px; }
}

/* ============================================
   ANÚNCIOS PATROCINADOS - PAINEL ADM
   ============================================ */
.pb-ad-store-picker { position: relative; }
.pb-ad-store-results {
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--pb-border);
  border-radius: 10px;
  max-height: 280px; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.pb-ad-store-result {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer; transition: background .15s;
}
.pb-ad-store-result:last-child { border-bottom: none; }
.pb-ad-store-result:hover { background: #F9FAFB; }

.pb-ad-store-selected { margin-top: 10px; }
.pb-ad-store-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: 12px;
}

.pb-ad-image-preview {
  margin-top: 10px;
  width: 100%; max-width: 240px;
  aspect-ratio: 1 / 1;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--pb-border);
  background: #F3F4F6;
}
.pb-ad-image-preview img { width: 100%; height: 100%; object-fit: cover; }

.pb-ads-list { display: flex; flex-direction: column; gap: 12px; }

/* ============================================
   HOME - HEADER COMPACTO
   (remove logo pequeno e barra de busca do topo;
   mantém apenas banner principal + ícones de acesso)
   Escopo restrito à página inicial (.pb-page-home)
   ============================================ */
.pb-page-home .pb-header {
  padding: 10px 0;
  box-shadow: none;
  background: transparent;
  border-bottom: none;
  position: static;
}
.pb-page-home .pb-header-inner {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  grid-template-columns: none !important;
}

/* Compensação visual: hero sobe um pouco, mantendo o respiro */
.pb-page-home .pb-hero { padding: 44px 20px 72px; }

/* ============================================
   HEADER AUTH BUTTONS - PADRÃO iFood
   (Entrar / Cadastrar à esquerda, carrinho à direita)
   ============================================ */
.pb-header-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pb-header-cart {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* Botões estilo iFood: uniformes, minimalistas, bordas arredondadas */
.pb-btn-ifood {
  min-width: 128px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  line-height: 1;
}
.pb-btn-ifood i { flex-shrink: 0; }

/* Entrar: outline branco com borda e texto verde */
.pb-btn-ifood-outline {
  background: #fff;
  color: var(--pb-green);
  border: 1.5px solid var(--pb-green);
}
.pb-btn-ifood-outline:hover {
  background: var(--pb-green);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

/* Cadastrar: sólido vermelho (identidade Pede Barra + estilo iFood) */
.pb-btn-ifood-solid {
  background: var(--pb-red);
  color: #fff;
  border: 1.5px solid var(--pb-red);
}
.pb-btn-ifood-solid:hover {
  background: var(--pb-red-dark);
  border-color: var(--pb-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(227, 6, 19, .18);
}

@media (max-width: 640px) {
  .pb-page-home .pb-header { padding: 8px 0; }
  .pb-page-home .pb-hero { padding: 32px 20px 56px; }
  .pb-header-auth { gap: 8px; }
  .pb-btn-ifood {
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .pb-btn-ifood {
    height: 36px;
    padding: 0 12px;
    gap: 6px;
  }
  .pb-btn-ifood span { display: inline; }
}

/* ============================================
   ANÚNCIO PATROCINADO (LOJA) - RESPONSIVO MOBILE
   ============================================ */
.pb-sp-grid {
  min-width: 0;
}
.pb-sp-grid > form,
.pb-sp-grid > .pb-sp-preview {
  min-width: 0;
  max-width: 100%;
}
.pb-sp-grid .pb-input,
.pb-sp-grid .pb-textarea {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .pb-sp-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .pb-sp-preview {
    position: static !important;
    top: auto !important;
  }
}

@media (max-width: 640px) {
  .pb-sp-grid > form,
  .pb-sp-grid > .pb-sp-preview {
    padding: 16px !important;
    border-radius: 12px !important;
  }
}

/* ============================================
   PAINEL MOTOBOY - RESPONSIVIDADE MOBILE
   ============================================ */
@media (max-width: 900px) {
  .pb-motoboy-profile-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .pb-motoboy-profile-card {
    position: static !important;
    top: auto !important;
    padding: 18px !important;
  }
  .pb-motoboy-profile-edit {
    padding: 18px !important;
  }
}

@media (max-width: 640px) {
  /* Sidebar/menu do motoboy no mobile não corta itens */
  .pb-sidebar { padding: 10px 0 6px; }
  .pb-sidebar-user { padding: 6px 16px 10px; }
  .pb-sidebar-user-name { font-size: 13px; }
  .pb-sidebar-user-role { font-size: 11px; }
  .pb-menu {
    padding: 0 10px 4px;
    gap: 4px;
    scrollbar-width: none;
  }
  .pb-menu::-webkit-scrollbar { display: none; }
  .pb-menu li {
    padding: 8px 12px !important;
    font-size: 12.5px !important;
    white-space: nowrap;
    border-radius: 8px;
  }
  .pb-menu li i {
    width: 16px;
    height: 16px;
  }
  /* Conteúdo principal com padding mais respirado */
  .pb-main { padding: 16px 14px !important; }
  .pb-page-header { margin-bottom: 18px; }
  .pb-page-title { font-size: 20px !important; }
  .pb-page-subtitle { font-size: 13px; }

  /* Tabelas de histórico / pedidos do motoboy: garantir scroll horizontal completo */
  .pb-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  .pb-table {
    min-width: 640px;
    font-size: 13px;
  }
  .pb-table th,
  .pb-table td {
    padding: 10px 12px !important;
    white-space: nowrap;
  }
  .pb-table td:nth-child(2),
  .pb-table td:nth-child(3) {
    white-space: normal;
    min-width: 120px;
  }

  /* Cards de estatísticas do motoboy: 2 colunas no celular */
  .pb-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .pb-stat-card { padding: 14px !important; }
  .pb-stat-value { font-size: 22px !important; }
  .pb-stat-label { font-size: 11px !important; }

  /* Detalhes do pedido (pedido.html) - grid 1 coluna no celular */
  .pb-order-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Status track do pedido: melhor distribuição no mobile */
  .pb-status-steps { gap: 8px !important; }
  .pb-status-step { flex: 0 0 30% !important; }
  .pb-status-step .dot {
    width: 34px !important;
    height: 34px !important;
  }
  .pb-status-step .label { font-size: 11px !important; }
}

@media (max-width: 420px) {
  .pb-stats {
    grid-template-columns: 1fr 1fr !important;
  }
  .pb-menu li {
    padding: 7px 10px !important;
    font-size: 12px !important;
  }
  .pb-page-title { font-size: 18px !important; }
  .pb-table { min-width: 560px; font-size: 12.5px; }
}

/* ============================================
   RESPONSIVIDADE GLOBAL EXTRA
   Varredura mobile completa: headers, menus,
   tabelas, cards, modais e safe areas
   ============================================ */
html {
  overflow-x: clip;
}
body {
  min-width: 0;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.pb-main > *,
.pb-container > *,
.pb-section,
.pb-section-header,
.pb-section-title,
.pb-store-body,
.pb-store-info,
.pb-store-info > div,
.pb-store-info h1,
.pb-store-name,
.pb-store-cat,
.pb-store-meta,
.pb-product-card,
.pb-product-info,
.pb-ad-caption,
.pb-ad-store,
.pb-ad-store > div,
.pb-ad-store-name,
.pb-ad-store-cat,
.pb-page-title,
.pb-page-subtitle,
.pb-modal-title,
.pb-empty h3,
.pb-empty p {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pb-store-meta,
.pb-modal-header,
.pb-modal-footer,
.pb-cart-row,
.pb-cart-total,
.pb-header-actions,
.pb-header-auth,
.pb-mobile-store-actions,
.pb-table-actions {
  flex-wrap: wrap;
}

.pb-store-meta {
  align-items: flex-start;
}

.pb-table td,
.pb-table th,
.pb-btn,
.pb-tag,
.pb-form-hint,
.pb-auth-footer,
.pb-footer-desc,
.pb-footer li,
.pb-page-subtitle {
  overflow-wrap: anywhere;
}

.pb-modal {
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
}
.pb-modal-content {
  width: min(100%, 640px);
  max-width: min(100%, 640px);
  max-height: min(90vh, 90dvh);
}
.pb-modal-lg {
  max-width: min(100%, 720px);
}

.pb-toast-container {
  max-width: calc(100vw - 24px);
}
.pb-toast {
  min-width: min(260px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
}

#ckGrid,
#pfGrid,
.pb-order-detail-grid {
  min-width: 0;
}
#ckGrid > *,
#pfGrid > *,
.pb-order-detail-grid > * {
  min-width: 0;
}

.pb-order-link-card,
.pb-address-card {
  min-width: 0;
}
.pb-order-link-main,
.pb-order-link-aside,
.pb-address-card > div:first-child {
  min-width: 0;
}

@media (max-width: 900px) {
  .pb-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0 12px 4px;
  }
  .pb-menu li {
    min-width: 0;
    white-space: normal;
    align-items: center;
    justify-content: flex-start;
    line-height: 1.3;
  }
  .pb-sidebar {
    padding-bottom: 12px;
  }
  .pb-main {
    padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .pb-stats {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  .pb-store-info {
    align-items: flex-start;
    text-align: left;
  }
  .pb-catalog-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
  }
  .pb-catalog-nav h4 {
    grid-column: 1 / -1;
    padding-bottom: 0;
  }
  .pb-catalog-nav a {
    background: #F9FAFB;
    border: 1px solid var(--pb-border);
  }
  #ckGrid {
    grid-template-columns: 1fr !important;
  }
  #ckGrid > aside {
    position: static !important;
    top: auto !important;
  }
}

@media (max-width: 700px) {
  .pb-header {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }
  .pb-header-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 14px;
  }
  .pb-logo {
    height: 40px;
  }
  .pb-logo img {
    height: 40px;
    max-width: 100%;
    object-fit: contain;
  }
  .pb-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }
  .pb-header-actions,
  .pb-header-auth {
    flex: 1 1 auto;
    justify-content: flex-start;
  }
  .pb-header-cart {
    margin-left: auto;
  }
  .pb-header-inner > div,
  .pb-header-inner > a,
  .pb-header-inner > button {
    min-width: 0;
  }
  .pb-btn {
    max-width: 100%;
  }
  .pb-btn span {
    overflow-wrap: anywhere;
  }
  .pb-page-home .pb-header-inner {
    flex-wrap: wrap;
  }
  .pb-page-home .pb-header-auth {
    flex: 1 1 auto;
  }
  .pb-page-home .pb-header-cart {
    margin-left: auto;
  }
  .pb-store-info {
    gap: 14px;
    padding: 18px;
  }
  .pb-store-info-logo {
    width: 72px;
    height: 72px;
  }
  .pb-store-info h1 {
    font-size: 22px;
  }
  .pb-store-info .meta {
    gap: 10px;
  }
  .pb-ad-caption {
    padding: 12px 14px;
  }
  .pb-ad-store {
    width: 100%;
  }
  .pb-modal-header,
  .pb-modal-footer {
    gap: 10px;
  }
  .pb-modal-footer > * {
    width: 100%;
  }
  .pb-modal-footer .pb-btn,
  .pb-modal-footer button,
  .pb-modal-footer a {
    width: 100%;
    justify-content: center;
  }
  .pb-status-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 12px;
  }
  .pb-status-step {
    flex: none !important;
  }
  .pb-status-step .dot {
    margin-bottom: 6px;
  }
  .pb-status-step .label {
    line-height: 1.3;
  }
  .pb-table-wrap {
    border: none;
    background: transparent;
    overflow: visible !important;
  }
  .pb-table,
  .pb-table thead,
  .pb-table tbody,
  .pb-table tr,
  .pb-table th,
  .pb-table td {
    display: block;
    width: 100%;
  }
  .pb-table {
    min-width: 0 !important;
    border-collapse: separate;
  }
  .pb-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .pb-table tr {
    background: #fff;
    border: 1px solid var(--pb-border);
    border-radius: 14px;
    margin-bottom: 12px;
    padding: 10px 12px;
    box-shadow: var(--shadow-sm);
  }
  .pb-table td {
    border: none;
    padding: 8px 0 !important;
    white-space: normal !important;
  }
  .pb-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--pb-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .pb-table td:empty {
    display: none;
  }
  .pb-table-actions {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .pb-table-actions .pb-btn {
    flex: 1 1 140px;
    justify-content: center;
  }
  #addrList .pb-checkbox,
  .pb-address-card {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }
  #addrList [data-del-addr],
  .pb-address-card [data-del] {
    align-self: flex-end;
  }
  .pb-order-link-card {
    flex-direction: column;
    align-items: stretch !important;
  }
  .pb-order-link-aside {
    text-align: left !important;
  }
  #orderContent .pb-btn.pb-btn-lg,
  #orderContent a.pb-btn.pb-btn-lg {
    width: 100%;
    min-width: 0 !important;
  }
}

@media (max-width: 520px) {
  .pb-page-home .pb-header-auth {
    width: 100%;
    justify-content: space-between;
  }
  .pb-page-home .pb-btn-ifood {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 0 10px;
  }
  .pb-btn-ifood span {
    white-space: normal;
    line-height: 1.1;
    text-align: center;
  }
  .pb-hero {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pb-container,
  .pb-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pb-auth-card {
    padding: 20px 16px 28px;
    border-radius: 16px;
  }
  .pb-auth-tabs {
    gap: 4px;
  }
  .pb-auth-tab {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
  }
  .pb-cart-header,
  .pb-cart-body,
  .pb-cart-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 380px) {
  .pb-page-home .pb-btn-ifood span {
    display: none;
  }
  .pb-page-home .pb-btn-ifood {
    flex: 0 1 auto;
    padding: 0 12px;
  }
  .pb-page-home .pb-header-auth {
    gap: 6px;
  }
  .pb-status-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pb-stats {
    grid-template-columns: 1fr;
  }
}
