:root {
  --tp-primary: #e53935;
  --tp-primary-dark: #b42318;
  --tp-primary-soft: #ffe8e5;

  --tp-secondary: #ffc928;
  --tp-secondary-soft: #fff4c2;

  --tp-success: #16a34a;
  --tp-success-soft: #dcfce7;

  --tp-bg: #fafaf7;
  --tp-surface: #ffffff;
  --tp-surface-2: #f3f4f6;

  --tp-text: #1f2933;
  --tp-muted: #6b7280;
  --tp-border: #e5e7eb;

  --tp-radius-sm: 10px;
  --tp-radius-md: 16px;
  --tp-radius-lg: 22px;

  --tp-shadow-soft: 0 8px 24px rgba(31, 41, 51, 0.08);
  --tp-shadow-card: 0 10px 30px rgba(31, 41, 51, 0.12);
}

html,
body {
  background: var(--tp-bg) !important;
  color: var(--tp-text);
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tp-logo,
.logo-toperto,
img[src*="toperto-logo"] {
  height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
}

.tp-brand-header {
  background: rgba(250, 250, 247, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--tp-border);
}

.tp-brand-title {
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--tp-text);
}

.tp-brand-subtitle {
  color: var(--tp-muted);
  font-weight: 600;
}

button,
.btn,
.tp-btn,
a.btn,
button[type="button"],
button[type="submit"] {
  border-radius: 999px;
}

.btn-primary,
.tp-btn-primary,
button.primary,
button[data-primary="true"] {
  background: var(--tp-primary) !important;
  color: #fff !important;
  border: 0 !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 18px rgba(229, 57, 53, 0.25);
}

.btn-primary:hover,
.tp-btn-primary:hover,
button.primary:hover {
  background: var(--tp-primary-dark) !important;
}

.card,
.loja-card,
.store-card,
.produto-card,
.product-card,
.tp-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-lg);
  box-shadow: var(--tp-shadow-soft);
  overflow: hidden;
}

.card:hover,
.loja-card:hover,
.store-card:hover,
.produto-card:hover,
.product-card:hover,
.tp-card:hover {
  box-shadow: var(--tp-shadow-card);
}

.badge-aberto,
.status-aberto,
.loja-aberta,
.open-badge {
  background: var(--tp-success-soft) !important;
  color: var(--tp-success) !important;
  border: 1px solid rgba(22, 163, 74, 0.18) !important;
  font-weight: 800;
}

.badge-fechado,
.status-fechado,
.loja-fechada,
.closed-badge {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  border: 1px solid #e5e7eb !important;
  font-weight: 800;
}

.promo,
.badge-promo,
.oferta,
.offer-badge {
  background: var(--tp-secondary-soft) !important;
  color: #7c4a00 !important;
  border: 1px solid rgba(245, 158, 11, 0.22) !important;
  font-weight: 900;
}

.category-grid,
.categorias-grid,
.categorias,
.tp-category-grid,
#categorias,
#categoryGrid,
#atalhosCategorias {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
}

.category-item,
.categoria-item,
.tp-category-item,
.categoria,
.cat-item {
  min-width: 0 !important;
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  padding: 10px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--tp-text);
  box-shadow: 0 6px 16px rgba(31, 41, 51, 0.06);
}

.category-icon,
.categoria-icon,
.tp-category-icon,
.cat-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 6px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--tp-primary-soft);
  color: var(--tp-primary);
  font-size: 22px;
}

input,
select,
textarea {
  border-radius: 16px !important;
  border-color: var(--tp-border) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--tp-primary) !important;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12) !important;
}

@media (max-width: 600px) {
  .tp-logo,
  .logo-toperto,
  img[src*="toperto-logo"] {
    height: 34px;
  }

  .category-grid,
  .categorias-grid,
  .categorias,
  .tp-category-grid,
  #categorias,
  #categoryGrid,
  #atalhosCategorias {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .category-item,
  .categoria-item,
  .tp-category-item,
  .categoria,
  .cat-item {
    font-size: 11px;
    padding: 8px 4px;
    border-radius: 14px;
  }

  .category-icon,
  .categoria-icon,
  .tp-category-icon,
  .cat-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}

.lfy-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
}

.lfy-brand .tp-logo {
  height: 42px !important;
  width: auto !important;
  max-width: 170px !important;
  object-fit: contain !important;
  display: block !important;
}

.lfy-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.lfy-brand-copy small {
  color: var(--tp-muted);
  font-size: 12px;
  font-weight: 700;
}

.lfy-brand-icon {
  display: none !important;
}

@media (max-width: 600px) {
  .lfy-brand {
    gap: 6px !important;
  }

  .lfy-brand .tp-logo {
    height: 34px !important;
    max-width: 132px !important;
  }

  .lfy-brand-copy small {
    font-size: 10px;
  }
}

.logo.tp-system-brand,
.tp-system-brand,
a.logo.tp-system-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
}

.logo.tp-system-brand .tp-logo,
.tp-system-brand .tp-logo {
  height: 42px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
  display: block !important;
}

.logo-mark {
  display: none !important;
}

.topbar .logo .tp-logo,
.topbar-inner .logo .tp-logo {
  height: 40px !important;
  max-width: 170px !important;
}

@media (max-width: 600px) {
  .logo.tp-system-brand .tp-logo,
  .tp-system-brand .tp-logo,
  .topbar .logo .tp-logo,
  .topbar-inner .logo .tp-logo {
    height: 34px !important;
    max-width: 145px !important;
  }
}