/* ============================================================
   HOSTZAP â€” PREMIUM REDESIGN (Mobile & Desktop)
   ============================================================ */

/* â”€â”€ VariÃ¡veis de Design â”€â”€ */
:root {
  --hz-primary: #1a1a1a;
  --hz-bg: #f8fafc;
  --hz-card-bg: #ffffff;
  --hz-text: #0f172a;
  --hz-text-muted: #64748b;
  --hz-border: #e2e8f0;
  --hz-accent: #2563eb;
  --hz-radius-sm: 8px;
  --hz-radius-md: 12px;
  --hz-radius-lg: 20px;
  --hz-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --hz-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* â”€â”€ Reset & Base â”€â”€ */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  background-color: var(--hz-bg) !important;
  color: var(--hz-text) !important;
  -webkit-font-smoothing: antialiased;
}

/* Esconde elementos legados que poluem a tela */
.header, 
.footer,
.header-interna,
.hzp-hero,
.search-bar-mobile,
.clearline,
.sidebars,
.minitop,
.top,
.navigator {
  display: none !important;
}

/* Container principal unificado */
.sceneElement { 
  background: transparent !important; 
  padding: 0 !important;
}

/* â”€â”€ Layout Responsivo (CSS Grid) â”€â”€ */
.container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

@media (max-width: 768px) {
  .container { padding: 0 !important; }
  body { padding-top: 64px !important; padding-bottom: 70px !important; }
}

/* â”€â”€ NOVO HEADER PREMIUM â”€â”€ */
.hz-header-premium {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

.hz-banner-wrap {
  width: 100%;
  aspect-ratio: 2.5; /* Proporção exata de 1000x400Px */
  max-height: 320px;
  min-height: 150px;
  overflow: hidden;
}

.hz-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hz-store-card {
  max-width: 1200px;
  margin: -60px auto 0;
  background: var(--hz-card-bg);
  border-radius: var(--hz-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--hz-shadow-lg);
  position: relative;
  z-index: 10;
}

@media (min-width: 769px) {
  .hz-store-card { width: calc(100% - 40px); }
}

.hz-store-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--hz-radius-md);
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--hz-shadow);
}

.hz-store-info {
  flex: 1;
}

.hz-store-name {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px 0;
  color: var(--hz-text);
}

.hz-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}

.status-open { background: #dcfce7; color: #166534; }
.status-closed { background: #fee2e2; color: #991b1b; }

@media (max-width: 768px) {
  .hz-banner-wrap {
    height: auto;
    aspect-ratio: 2.5;
    max-height: 180px;
    min-height: 130px;
  }
  .hz-store-card { 
    margin: -30px 16px 0; 
    padding: 16px;
    gap: 16px;
  }
  .hz-store-logo { width: 64px; height: 64px; }
  .hz-store-name { font-size: 20px; }
}

/* â”€â”€ BARRA DE BUSCA â”€â”€ */
.hz-search-wrap {
  max-width: 1200px;
  margin: 0 auto 5px;
  padding: 5px 20px;
}

.hz-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-md);
  padding: 12px 16px;
  gap: 12px;
  transition: border-color 0.2s;
}

.hz-search-bar:focus-within {
  border-color: var(--hz-accent);
}

.hz-search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

/* â”€â”€ CATEGORIAS (Tabs Estilo iFood) â”€â”€ */
.hz-categories-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--hz-bg);
  padding: 5px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.hz-categories-scroll {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 20px;
  scrollbar-width: none;
}

@media (min-width: 992px) {
  .hz-categories-scroll {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    cursor: grab;
  }
  .hz-categories-scroll:active { cursor: grabbing; }
  .hz-categories-scroll::-webkit-scrollbar {
    display: block !important;
    height: 4px;
  }
  .hz-categories-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
  }
}

.hz-categories-scroll::-webkit-scrollbar { display: none; }

.hz-cat-pill {
  flex-shrink: 0;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--hz-border);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hz-text-muted);
  text-decoration: none !important;
  transition: all 0.2s;
}

.hz-cat-pill.active {
  background: var(--hz-primary);
  color: #fff;
  border-color: var(--hz-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* â”€â”€ GRID DE PRODUTOS â”€â”€ */
.hz-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 0 20px 40px;
}

/* Modo Grade (Catálogo) */
.hz-products-grid.hz-grid-mode {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

@media (max-width: 768px) {
  .hz-products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px 10px;
  }
  .hz-products-grid.hz-grid-mode {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 10px 10px;
  }
}

/* Ajustes do Card no Modo Grade */
.hz-grid-mode .hz-card {
  flex-direction: column;
  padding: 8px;
  gap: 8px;
  border-radius: var(--hz-radius-md);
}

.hz-grid-mode .hz-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
}

.hz-grid-mode .hz-card-img {
  border-radius: var(--hz-radius-sm);
}

.hz-grid-mode .hz-card-content {
  padding: 4px;
}

.hz-grid-mode .hz-card-title {
  font-size: 14px;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px; /* Altura fixa para alinhar os preços */
}

.hz-grid-mode .hz-card-desc {
  display: none; /* Esconde descrição na grade mobile/pequena */
}

.hz-grid-mode .hz-card-price {
  font-size: 15px;
}

.hz-grid-mode .hz-btn-plus {
  width: 28px;
  height: 28px;
  font-size: 16px;
}

/* â”€â”€ CARD DE PRODUTO PREMIUM â”€â”€ */
.hz-card {
  background: var(--hz-card-bg);
  border-radius: var(--hz-radius-md);
  padding: 16px;
  display: flex;
  gap: 16px;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--hz-border);
}

.hz-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hz-shadow);
}

.hz-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hz-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hz-text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.hz-card-desc {
  font-size: 13px;
  color: var(--hz-text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hz-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hz-card-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--hz-text);
}

.hz-card-price-old {
  font-size: 12px;
  color: var(--hz-text-muted);
  text-decoration: line-through;
  margin-right: 6px;
}

.hz-card-img-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.hz-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--hz-radius-sm);
}

.hz-btn-plus {
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: #fff;
  border: 1.5px solid var(--hz-border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hz-accent);
  font-size: 18px;
  box-shadow: var(--hz-shadow);
  transition: all 0.2s;
}

.hz-btn-plus:hover {
  background: var(--hz-primary);
  color: #fff;
  border-color: var(--hz-primary);
}

/* â”€â”€ BOTTOM NAV (Mobile Only) â”€â”€ */
.hz-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--hz-border);
  height: 64px;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
  .hz-bottom-nav { display: flex; justify-content: space-around; align-items: center; }
}

.hz-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--hz-text-muted);
  text-decoration: none !important;
  font-size: 11px;
  font-weight: 600;
}

.hz-nav-item.active {
  color: var(--hz-primary);
}

.hz-nav-item i {
  font-size: 20px;
}

.hz-cart-badge {
  position: relative;
}

.hz-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* â”€â”€ PEÃ‡A DE NOVO (Mobile) â”€â”€ */
.hz-recent-order {
  background: #fff;
  margin: 0 16px 20px;
  border-radius: var(--hz-radius-md);
  padding: 16px;
  border: 1px solid #fee2e2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hz-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hz-recent-title {
  font-size: 14px;
  font-weight: 700;
  color: #ef4444;
}

.hz-recent-btn {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
}

/* â”€â”€ CUSTOM SELECT (hz-select) â”€â”€ */
.hz-select { position: relative; width: fit-content; min-width: 120px; }
.hz-select-trigger {
    background: #fff;
    border: 1px solid var(--hz-border);
    border-radius: var(--hz-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hz-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--hz-shadow);
}
.hz-select-trigger:hover, .hz-select.open .hz-select-trigger {
    border-color: var(--hz-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hz-primary) 15%, transparent);
}
.hz-select-trigger i { 
    font-size: 10px; 
    color: var(--hz-text-muted);
    transition: transform 0.2s;
}
.hz-select.open .hz-select-trigger i { transform: rotate(180deg); }

.hz-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0; /* Estica para ocupar a largura do pai */
    background: #fff;
    border-radius: var(--hz-radius-md);
    border: 1px solid var(--hz-border);
    box-shadow: var(--hz-shadow-lg);
    z-index: 1000;
    min-width: 160px;
    max-height: 250px;
    overflow-y: auto;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Scrollbar para o dropdown */
.hz-select-dropdown::-webkit-scrollbar {
    width: 6px;
}
.hz-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--hz-border);
    border-radius: 10px;
}
.hz-select.open .hz-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.hz-select-option {
    padding: 10px 14px;
    border-radius: var(--hz-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--hz-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.hz-select-option:hover {
    background: var(--hz-bg);
    color: var(--hz-primary);
}
.hz-select-option.selected {
    background: color-mix(in srgb, var(--hz-primary) 10%, transparent);
    color: var(--hz-primary);
}
.hz-select-hidden { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

/* -- Ajustes Gerais — Correção de Transbordo, Notinha e Alinhamento -- */
.comprovante {
  max-width: 100% !important;
  word-break: break-all !important;
  overflow-wrap: break-word !important;
  white-space: pre-wrap !important;
}
.comprovante-texto {
  word-break: break-all !important;
  overflow-wrap: break-word !important;
  white-space: pre-wrap !important;
}
.muda-comprovante .elemento-pagamento {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}
.pedido-actions {
  background: transparent !important;
  border-top: none !important;
}
.hz-checkout-actions {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* -- Ajustes Específicos Desktop -- */
@media (min-width: 992px) {
  .muda-comprovante {
    align-self: start;
    position: sticky;
    top: 90px;
  }
  .grudado-desktop {
    position: static !important; /* Desativa o plugin sticky em favor do CSS nativo */
  }
}
