/* 
 * TeixeiraZap Mercados - Premium Styles 
 * @since 3.0.0
 */

/* --- Variáveis & Globais --- */
:root {
  --tzo-primary: #25d366;
  --tzo-primary-dark: #128c7e;
  --tzo-text: #1a1a1a;
  --tzo-text-light: #666;
  --tzo-bg: #f4f6f8;
  --tzo-white: #ffffff;
  --tzo-radius: 20px;
}

/* Hub Premium UI (v4.1.0) - Absolute Zero Density (Fixed Tab Visibility) */
.teixeirazap-container.hub-mercados-container {
  padding-top: 10px !important; /* Respiro padrão mobile */
  margin-top: 0 !important;
}

/* Desktop: Compensar header fixo com mais folga */
@media (min-width: 769px) {
  .teixeirazap-container.hub-mercados-container {
    padding-top: 80px !important; 
  }
}

/* Reset de Overflow para habilitar Sticky (Funciona em iPhone/Android) */
html, 
body.teixeirazap-ofertas-page,
#page, 
.site,
.site-content {
  overflow: visible !important;
  height: auto !important;
}

/* Ocultar explicitamente o header original do tema para não ocupar espaço */
body.teixeirazap-ofertas-page header.site-header,
body.teixeirazap-ofertas-page #masthead {
  display: none !important;
}

/* Forçar o header a não empurrar nada com margens */
.teixeirazap-header-fixed {
  margin-bottom: 0 !important;
}

/* Garantir que as abas sempre apareçam */
.hub-tabs-nav {
  position: relative; /* Removido !important para permitir sticky no mobile */
  z-index: 950 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.hub-mercados-header {
  display: none !important;
}

.hub-mercados-header h1 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.hub-mercados-header p {
  display: none; /* Escondido no extreme para ganhar espaço */
}

.hub-lojas-vitrine {
  margin-bottom: 20px !important; /* Espaçamento Padrão */
  padding-bottom: 0 !important;
  padding-top: 0 !important; /* Padding removido pois o container já compensa */
}

/* Desktop: Remover padding-top pois já temos espaço do margin-bottom das abas */
@media (min-width: 769px) {
  .hub-lojas-vitrine {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

.hub-section-title {
  display: none !important; /* Título removido para densidade máxima */
}

.lojas-carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 0 5px 0 !important; /* Zero top e bottom padding */
  margin-top: 0 !important;
  margin-bottom: 30px !important; /* Aumentado para dar respiro aos cards no mobile */
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Desktop: Mais espaçamento até os cards */
@media (min-width: 769px) {
  .lojas-carousel {
    margin-bottom: 60px !important;
  }
}

.lojas-carousel::-webkit-scrollbar {
  display: none;
}

.loja-bubble {
  flex: 0 0 85px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  scroll-snap-align: start;
}

.loja-logo-circle {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0; /* Zero margin bottom - Gap #2 */
  overflow: hidden;
  padding: 3px;
  /* Reduzido para estilo story */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid #eee;
  transition: all 0.3s ease;
}

.loja-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Instagram-style: preenche tudo */
  border-radius: 50%;
}

.loja-initials {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ccc;
}

.loja-name-label {
  font-size: 0.65rem;
  color: #444;
  font-weight: 700;
  display: block;
  line-height: 1.1;
  max-height: 1.1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .hub-mercados-header h1 {
    font-size: 1.6rem;
  }

  .lojas-carousel {
    gap: 15px;
  }

  .loja-bubble {
    flex: 0 0 75px;
  }

  .loja-logo-circle {
    width: 65px;
    height: 65px;
  }
}

.teixeirazap-hub-wrapper,
.teixeirazap-loja-wrapper {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--tzo-bg);
  min-height: 100vh;
  color: var(--tzo-text);
}

.tzo-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gz-container-spacing);
}

/* --- Hub Hero Section --- */
.hub-hero {
  background: var(--tzo-white);
  padding: 40px 0 60px;
  border-bottom: 1px solid #eee;
  margin-bottom: 40px;
}

.hub-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--tzo-text);
  letter-spacing: -0.5px;
}

.hub-subtitle {
  font-size: 1.1rem;
  color: var(--tzo-text-light);
  margin-bottom: 30px;
}

/* --- Carousel de Encartes --- */
.encarte.lojas-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 5px 10px; /* Padronizado */
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* Firefox */
}

.encartes-carousel::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.encarte-card {
  min-width: 280px;
  background: var(--tzo-white);
  border-radius: var(--tzo-radius);
  overflow: hidden;
  box-shadow: var(--tzo-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.encarte-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.encarte-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.encarte-thumb {
  height: 300px;
  /* Reduzi um pouco para não ficar tão alto se sobrar espaço */
  background: #f8f9fa;
  /* Fundo neutro caso a imagem não preencha tudo */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.encarte-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* O Pulo do Gato: Mostra a imagem inteira sem cortar */
  transition: transform 0.5s ease;
}

.encarte-card:hover .encarte-thumb img {
  transform: scale(1.05);
}

.badge-urgente {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff5252;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.encarte-info {
  padding: 16px;
  background: white;
  border-top: 1px solid #f0f0f0;
}

.encarte-info .loja-tag {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.encarte-info h3 {
  margin: 5px 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--tzo-text);
}

.encarte-info small {
  display: block;
  color: #95a5a6;
  font-size: 0.85rem;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Grid de Lojas --- */
.hub-lojas {
  padding-bottom: 60px;
}

.hub-section-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tzo-text);
}

.hub-section-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 22px;
  background: var(--tzo-primary);
  border-radius: 10px;
}

.lojas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gz-container-spacing);
}

.loja-card {
  background: var(--tzo-white);
  border-radius: var(--tzo-radius);
  padding: 20px 15px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.loja-card:hover {
  border-color: var(--tzo-primary);
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.12);
}

.loja-logo-wrapper {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #f8f9fa;
  padding: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loja-logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Encarte/Mercado geralmente tem logos retangulares em áreas redondas */
  border-radius: 50%;
}

.loja-initial {
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #cbd5e0;
  border-radius: 50%;
}

.loja-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--tzo-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.loja-address {
  font-size: 0.75rem;
  color: var(--tzo-text-light);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.btn-ver-loja {
  display: inline-block;
  padding: 6px 14px;
  background: #f8f9fa;
  color: var(--tzo-text-light);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s;
  border: 1px solid #eee;
}

.loja-card:hover .btn-ver-loja {
  background: var(--tzo-primary);
  color: white;
  border-color: var(--tzo-primary);
}

/* --- Single Loja Profile --- */
.loja-profile-header {
  background-color: #2c3e50;
  /* Fallback */
  background-size: cover;
  background-position: center;
  color: white;
  padding: 60px 0 100px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.header-inner {
  display: flex;
  align-items: flex-end;
  gap: 30px;
}

.loja-big-logo {
  width: 140px;
  height: 140px;
  background: white;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.4);
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.loja-big-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loja-header-info h1 {
  margin: 0 0 10px;
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loja-meta-info {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.loja-meta-info a {
  color: white;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}

.loja-actions-bar {
  display: flex;
  gap: 12px;
}

.btn-loja-action {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-whatsapp {
  background: #25d366;
  color: white;
}

.btn-call {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-loja-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pro-content {
  margin-top: -50px;
  padding-bottom: 60px;
}

.grid-encartes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}

/* --- Panzoom Container --- */
.panzoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
}

.panzoom-modal.active {
  display: flex;
  flex-direction: column;
}

.panzoom-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  color: white;
  z-index: 100000;
}

.panzoom-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.panzoom-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.panzoom-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panzoom-content img {
  max-width: 100%;
  max-height: 100%;
}

/* --- Perfil de Loja Premium (single-loja) --- */
.loja-profile-hero {
  position: relative;
  padding: 100px 0 120px;
  color: white;
  text-align: center;
  overflow: hidden;
}

/* Overlay sutil para garantir leitura se a cor for muito clara */
.loja-profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.25) 100%
  );
  pointer-events: none;
}

.loja-hero-content {
  position: relative;
  z-index: 5;
}

.loja-logo-avatar {
  width: 110px;
  height: 110px;
  background: white;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.loja-logo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.loja-main-info h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 0 0 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loja-location-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}

.loja-cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-loja-cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 0.95rem;
}

.btn-whatsapp-loja {
  background: #25d366;
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-maps-loja {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
}

.btn-loja-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.loja-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
}

/* Área de Conteúdo */
.loja-content-area {
  padding: 40px 15px 80px;
}

.loja-section-header {
  margin-bottom: 30px;
  text-align: center;
}

.loja-section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.loja-section-header p {
  color: #666;
  font-size: 0.95rem;
}

.loja-empty-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: var(--tzo-radius);
  box-shadow: var(--tzo-shadow);
}

.loja-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.btn-back-hub {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 25px;
  background: #eee;
  color: #444;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 700;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .loja-profile-hero {
    padding: 80px 0 100px;
  }

  .loja-logo-avatar {
    width: 90px;
    height: 90px;
  }

  .loja-main-info h1 {
    font-size: 1.8rem;
  }

  .loja-cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }

  .btn-loja-cta {
    width: 100%;
    justify-content: center;
  }
}

.loja-logo-avatar {
  width: 110px;
  height: 110px;
  background: white;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  /* Estilo Instagram Story */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.loja-logo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Preenche tudo */
  border-radius: 50%;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .hub-title {
    font-size: 1.75rem;
  }

  .lojas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .loja-card {
    padding: 15px 10px;
  }

  .loja-logo-wrapper {
    width: 70px;
    height: 70px;
  }

  .loja-card h3 {
    font-size: 0.95rem;
  }

  /* Single Loja Mobile */
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .loja-big-logo {
    width: 100px;
    height: 100px;
    margin-top: -20px;
  }

  .loja-header-info h1 {
    font-size: 1.8rem;
  }

  .loja-meta-info {
    justify-content: center;
  }

  .loja-actions-bar {
    justify-content: center;
    width: 100%;
  }

  .btn-loja-action {
    flex: 1;
    justify-content: center;
  }
}

/* --- Smart List (Lista de Compras Interativa) --- */
.tzo-smart-list-container {
  background: white;
  border-radius: var(--tzo-radius);
  padding: 20px;
  margin-top: -5px;
  /* "Cola" no encarte */
  margin-bottom: var(--gz-container-spacing);
  box-shadow: var(--tzo-shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.tzo-smart-list-header {
  margin-bottom: var(--gz-container-spacing);
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tzo-smart-list-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--tzo-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tzo-smart-list-title svg {
  color: var(--tzo-primary);
}

.tzo-smart-list-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tzo-smart-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f8f9fa;
  cursor: pointer;
  transition: background 0.2s;
}

.tzo-smart-item:last-child {
  border-bottom: none;
}

.tzo-smart-item:hover {
  background: #fcfcfc;
}

.tzo-item-check-wrapper {
  margin-right: 15px;
}

.tzo-item-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: white;
}

.tzo-smart-item.selected .tzo-item-checkbox {
  background: var(--tzo-primary);
  border-color: var(--tzo-primary);
}

.tzo-item-checkbox::after {
  content: "✓";
  color: white;
  font-size: 14px;
  display: none;
}

.tzo-smart-item.selected .tzo-item-checkbox::after {
  display: block;
}

.tzo-item-details {
  flex: 1;
}

.tzo-item-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tzo-text);
  line-height: 1.3;
}

.tzo-item-meta {
  font-size: 0.8rem;
  color: var(--tzo-text-light);
  margin-top: 2px;
}

/* Categoria Divider */
.tzo-smart-cat-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #6c757d;
  background: #f1f3f5;
  padding: 8px 12px;
  margin: 20px 0 5px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tzo-smart-cat-title:first-child {
  margin-top: 0;
}

.tzo-smart-cat-title::before {
  content: "";
  display: block;
  width: 4px;
  height: 12px;
  background: var(--tzo-primary);
  border-radius: 2px;
}

.tzo-item-price-tag {
  text-align: right;
  font-size: 1rem;
  font-weight: 800;
  color: var(--tzo-primary-dark);
}

.tzo-smart-list-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.btn-send-list {
  width: 100%;
  padding: 14px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--tzo-radius);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-send-list:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.btn-send-list:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.tzo-list-counter {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
}

/* Animations */
.btn-send-list:not(:disabled) {
  animation: tzo-pulse-green 2s infinite;
}

@keyframes tzo-pulse-green {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (max-width: 768px) {
  .tzo-smart-list-container {
    padding: 15px;
    margin-top: -15px;
    /* Ajuste para mobile */
    border-radius: 0 0 var(--tzo-radius) var(--tzo-radius);
  }
}

/* --- Hub Tabs (Segmented Control) --- */
.hub-tabs-nav {
  margin-top: 0 !important;
  margin-bottom: 2px !important; /* Reduzido de 4px - X vermelho #1 */
  display: flex;
  justify-content: center;
}

.segmented-control {
  background: #e9ecef;
  padding: 3px; /* Reduzido de 4px */
  border-radius: 14px;
  display: flex;
  width: 100%;
  max-width: 400px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px; /* Reduzido de 10px 15px */
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: white;
  color: var(--tzo-primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-btn .tab-icon {
  font-size: 1.1rem;
}

.hub-tabs-content {
  margin: 0 !important;
  padding: 0 !important;
}

.tab-pane {
  display: none;
  animation: tzo-fade-in 0.3s ease;
  margin: 0 !important;
  padding: 0 !important;
}

.tab-pane.active {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

/* Esconder parágrafos vazios injetados pelo WordPress que criam gaps */
.hub-mercados-container p:empty {
  display: none !important;
}

@keyframes tzo-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Ajustes no Diretório de Lojas */
.hub-mercados-container .ofertas-grid {
  margin-top: 0 !important; /* Cola na vitrine de logos sem a barra de busca */
}

.hub-lojas-completo {
  margin-top: 10px; /* Reduzido de 70px para eliminar buraco mobile */
}

/* --- Desktop: Forçar Visibilidade das Abas --- */
@media (min-width: 769px) {
  .hub-tabs-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    justify-content: center !important;
    margin-top: 0 !important;
    margin-bottom: 80px !important; /* Espaçamento até o carrossel */
    width: 100% !important;
    z-index: 100 !important;
  }

  .segmented-control {
    max-width: 500px !important; /* Um pouco maior no desktop */
    margin: 0 auto !important;
  }

  .tab-btn {
    font-size: 0.95rem !important; /* Texto um pouco maior no desktop */
    padding: 10px 16px !important;
  }
}

@media (max-width: 768px) {
  .hub-tabs-nav {
    position: sticky;
    top: 60px; /* Logo abaixo do header fixo */
    z-index: 900;
    background: rgba(244, 246, 248, 0.85); /* Fundo semi-transparente */
    backdrop-filter: blur(10px); /* Efeito Vidro */
    -webkit-backdrop-filter: blur(10px);
    margin: 0 -15px 10px !important; /* Respiro inferior de 10px */
    padding: 10px 15px !important; /* Mais respiro interno */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .hub-lojas-completo .lojas-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    display: grid !important;
  }

  .loja-card {
    padding: 12px 8px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .loja-logo-wrapper {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 10px !important;
  }

  .loja-card h3 {
    font-size: 0.85rem !important;
    min-height: 2.4em !important;
    margin-bottom: 4px !important;
  }

  .loja-address {
    font-size: 0.65rem !important;
    margin-bottom: 10px !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .btn-ver-loja {
    font-size: 0.6rem !important;
    padding: 4px 8px !important;
    width: 100% !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}

/* --- Aba de Ofertas (Global Feed) --- */
.hub-ofertas-global-container {
  padding: 20px 0 20px 0; /* Reduzido de 80px para eliminar buraco mobile */
}

.tzo-category-group {
  margin-bottom: 30px;
}

.tzo-category-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tzo-primary, #e63946);
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tzo-category-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: currentColor;
  border-radius: 2px;
}

/* --- Novo Feed de Ofertas Individuais (Card-Based Mobile First) --- */

.tzo-category-nav-wrapper {
  position: sticky;
  top: 118px; /* Ajustado: Header (60px) + Tabs (~58px) */
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  padding: 6px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.tzo-category-nav {
  display: flex;
  gap: 12px; /* Aumentado de 10px */
  overflow-x: auto;
  padding: 8px var(--gz-container-spacing); /* Aumentado de 5px */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tzo-category-nav::-webkit-scrollbar {
  display: none;
}

.tzo-cat-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px; /* Aumentado de 4px */
  text-decoration: none;
  min-width: 75px; /* Aumentado de 70px */
  transition: transform 0.2s;
}

.tzo-cat-nav-item .nav-emoji {
  width: 42px; /* Aumentado de 28px */
  height: 42px; /* Aumentado de 28px */
  background: #f8f9fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem; /* Aumentado de 0.95rem */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  transition: all 0.2s;
}

.tzo-cat-nav-item .nav-label {
  font-size: 0.75rem; /* Aumentado de 0.7rem */
  font-weight: 700;
  color: #666;
  white-space: nowrap;
}

.tzo-cat-nav-item:active {
  transform: scale(0.95);
}

.tzo-cat-nav-item.active .nav-emoji {
  background: var(--tzo-primary);
  border-color: var(--tzo-primary);
  color: white;
}

.tzo-cat-nav-item.active .nav-label {
  color: var(--tzo-primary);
}

/* Container de Lista */
.tzo-global-offers-list {
  padding: 0 var(--gz-container-spacing);
}

.tzo-category-group {
  margin-bottom: 15px; /* Reduzido de 20px */
  scroll-margin-top: 120px;
}

.tzo-category-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--tzo-text);
  background: #f8f8f8;
  padding: 4px 10px;
  border-radius: 6px;
  border-left: 3px solid #333;
}

.tzo-cat-emoji {
  font-size: 1.2rem;
}

/* Grid de Cards - Otimizado para evitar estiramento */
.tzo-items-cards-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(220px, 1fr)
  ); /* Colunas mais finas no desktop */
  gap: 8px; /* Equilíbrio */
}

@media (min-width: 1024px) {
  .tzo-offer-card {
    max-width: 280px; /* Impede que o card fique gigante pro lado no desktop */
  }
}

.tzo-offer-card {
  background: white;
  border-radius: 8px; /* Mais compacto */
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tzo-offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tzo-offer-card:active {
  transform: scale(0.98);
}

/* Store Badge no Card */
.tzo-card-store {
  padding: 4px 8px; /* Ultra compact */
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tzo-card-store img {
  width: 14px; /* Mini logo */
  height: 14px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
}

.tzo-card-store-name {
  font-size: 0.65rem; /* Restaurado um pouco para ler */
  font-weight: 800;
  color: #888;
  text-transform: uppercase;
}

/* Conteúdo do Card */
.tzo-card-content {
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tzo-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
  margin-bottom: 2px;
}

.tzo-card-unit {
  font-size: 0.55rem;
  color: #aaa;
  font-weight: 700;
  margin-bottom: 4px; /* Mais apertado */
}

.tzo-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tzo-card-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: #f8fdf9;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #eef7ef;
}

.tzo-card-currency {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--tzo-primary-dark);
}

.tzo-card-value {
  font-size: 1.25rem; /* Compactado para evitar quebras em 2 colunas */
  font-weight: 900;
  color: #000;
  letter-spacing: -0.6px;
}

/* Ajustes Mobile (2 Colunas) */
@media (max-width: 580px) {
  .tzo-items-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px; /* Extreme density */
  }

  .tzo-offer-card {
    border-radius: 8px;
    max-width: none; /* Mobile usa 100% da coluna */
  }

  .tzo-card-content {
    padding: 8px; /* Restaurado equilíbrio */
  }

  .tzo-card-title {
    font-size: 0.82rem;
    height: 2.4em;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .tzo-card-value {
    font-size: 1.15rem;
  }

  .tzo-category-nav-wrapper {
    top: 105px; /* Mesmo valor para mobile */
  }
}

/* --- Store Cluster (Agrupamento por Mercado) --- */
.tzo-store-cluster {
  margin-bottom: 25px;
}

.tzo-store-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px var(--gz-container-spacing);
  margin-bottom: 12px;
  position: relative;
}

.tzo-store-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tzo-store-logo-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 2px solid #eee;
  flex-shrink: 0;
}

.tzo-store-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4b5563;
  text-transform: none;
  white-space: nowrap;
}

.tzo-store-profile-link {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gz-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 6px;
}

.tzo-store-profile-link:hover {
  color: var(--gz-accent);
  background: rgba(34, 197, 94, 0.08);
}

.tzo-store-divider {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin-left: 8px;
  border-radius: 2px;
}

/* Cards Limpos (sem header de loja) */
.tzo-card-clean .tzo-card-content {
  padding: 10px 8px; /* Mais padding top pois não há header */
}

.tzo-card-clean {
  border: 1px solid #e5e7eb;
  background: #fff;
}

/* Cards Clicáveis (navegação inteligente) */
.tzo-card-clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.tzo-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: var(--gz-primary);
}

.tzo-card-clickable:active {
  transform: translateY(0);
}
