/**
 * Layout estilo Palácio dos Leilões - responsivo
 * Não altera a lógica do sistema, apenas visual.
 */
/* ===== TOP BAR (faixa branca com links) ===== */
.palacio-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 8px 0;
  font-size: 13px;
}
.palacio-topbar .centerr {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.palacio-topbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
}
.palacio-topbar a {
  color: #333;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
}
.palacio-topbar a:hover {
  color: var(--cor-topo, #0066cc);
}

/* ===== HEADER (logo + busca + ações) ===== */
.palacio-header {
  background: #fff;
  padding: 16px 0;
  border-bottom: 1px solid #e5e5e5;
}
.palacio-header .centerr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.palacio-logo {
  flex-shrink: 0;
}
.palacio-logo img {
  max-height: 50px;
  width: auto;
  display: block;
}
.palacio-busca {
  flex: 1;
  min-width: 200px;
  max-width: 500px;
}
.palacio-busca form {
  display: flex;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}
.palacio-busca input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  font-size: 14px;
}
.palacio-busca input::placeholder {
  color: #999;
}
.palacio-busca button {
  padding: 12px 18px;
  background: var(--cor-topo, #0066cc);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
}
.palacio-busca button:hover {
  background: var(--cor-hover, #0052a3);
}
.palacio-acoes {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.palacio-btn-entrar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--cor-topo, #0066cc);
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}
.palacio-btn-entrar:hover {
  background: var(--cor-hover, #0052a3);
}
.palacio-btn-cadastrar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--cor-topo, #0066cc) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
}
.palacio-btn-cadastrar:hover {
  color: var(--cor-hover, #004080);
}

/* ===== BANNER AVISO (cor padrão admin) ===== */
.palacio-banner-aviso {
  background: var(--cor-topo, #022e4d);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.03) 8px,
    rgba(255,255,255,0.03) 16px
  );
  color: #fff;
  padding: 24px 0;
  position: relative;
}
.palacio-banner-aviso .centerr {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}
.palacio-banner-aviso .aviso-icone {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: #f1c40f;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  color: #000;
  font-size: 28px;
  font-weight: bold;
}
.palacio-banner-aviso .aviso-conteudo h2 {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.palacio-banner-aviso .aviso-conteudo p {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.95;
}
.palacio-banner-aviso .aviso-conteudo p:last-child {
  margin-bottom: 0;
}
/* Navegação do banner (setas) - opcional */
.palacio-banner-aviso .banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.palacio-banner-aviso .banner-nav:hover {
  opacity: 1;
}
.palacio-banner-aviso .banner-nav.prev { left: 10px; }
.palacio-banner-aviso .banner-nav.next { right: 10px; }

/* ===== BANNER IMAGEM (carrossel existente) ===== */
.palacio-banner-img {
  margin-top: 0;
  overflow: visible;
  min-height: 520px;
}
.palacio-banner-img .Plugin1 {
  border-radius: 0;
  margin-top: 0;
  overflow: visible;
  min-height: 520px;
}
.palacio-banner-img .Plugin1 a img {
  object-fit: contain;
  min-height: 520px;
  height: auto;
  width: 100%;
}
@media (max-width: 767px) {
  .palacio-banner-img { display: none !important; }
}

/* ===== CARDS ESTATÍSTICAS (home) ===== */
.palacio-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
  justify-content: center;
}
.palacio-stat-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 140px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.palacio-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.palacio-stat-card .icone {
  width: 40px;
  height: 40px;
  background: #e8f4fc;
  color: var(--cor-topo, #0066cc);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.palacio-stat-card .numero {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cor-topo, #022e4d);
}
.palacio-stat-card .label {
  font-size: 0.8rem;
  color: #666;
}

/* ===== LEILÕES EM ANDAMENTO (sidebar style) ===== */
.palacio-leiloes-andamento {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.palacio-leiloes-andamento h3 {
  color: #2d7a3e;
  font-size: 1.1rem;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #2d7a3e;
}
.palacio-card-live {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.palacio-card-live:last-child {
  border-bottom: none;
}
.palacio-card-live:hover {
  background: #f9f9f9;
}
.palacio-card-live .thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.palacio-card-live .badge-live {
  background: #c0392b;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.palacio-card-live .titulo {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.palacio-card-live .desc {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.3;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  .palacio-topbar ul {
    justify-content: center;
  }
  /* Header coluna só quando menu expandido (ver bloco .mobile-menu-open abaixo) */
  .palacio-logo img {
    margin: 0 auto;
  }
  .palacio-busca {
    max-width: none;
  }
  .palacio-acoes {
    justify-content: center;
    flex-wrap: wrap;
  }
  .palacio-banner-aviso .aviso-conteudo h2 {
    font-size: 1.25rem;
  }
  .palacio-banner-aviso .aviso-conteudo p {
    font-size: 0.9rem;
  }
  .palacio-stats {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .palacio-stat-card {
    min-width: 120px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .palacio-topbar {
    font-size: 11px;
    padding: 6px 0;
  }
  .palacio-topbar ul {
    gap: 6px 10px;
  }
  .palacio-topbar a {
    padding: 2px 0;
  }
  .palacio-btn-entrar,
  .palacio-btn-cadastrar {
    padding: 8px 14px;
    font-size: 13px;
  }
  .palacio-banner-aviso {
    padding: 16px 0;
  }
  .palacio-banner-aviso .aviso-icone {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

/* Top bar SEMPRE visível no mobile (políticas Google Ads) */
@media (max-width: 768px) {
  .palacio-topbar {
    display: block !important;
  }
  .palacio-topbar .centerr {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .palacio-topbar .nav-links,
  .palacio-topbar .direito {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
  }
}

/* Header com menu hamburger no mobile (logo + busca + ações ocultos, abrem ao clicar) */
@media (max-width: 768px) {
  .palacio-header .centerr {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }
  .palacio-header .palacio-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 20px;
  }
  .palacio-header .palacio-hamburger:hover {
    background: #f5f5f5;
  }
  .palacio-header .palacio-logo {
    flex: 1;
    text-align: center;
  }
  .palacio-header .palacio-busca,
  .palacio-header .palacio-acoes {
    display: none;
  }
  .palacio-header.mobile-menu-open .palacio-busca,
  .palacio-header.mobile-menu-open .palacio-acoes {
    display: flex;
  }
  .palacio-header.mobile-menu-open .centerr {
    flex-wrap: wrap;
  }
  .palacio-header.mobile-menu-open .palacio-busca {
    order: 3;
    width: 100%;
    max-width: none;
  }
  .palacio-header.mobile-menu-open .palacio-acoes {
    order: 4;
    width: 100%;
    justify-content: center;
  }
}
@media (min-width: 769px) {
  .palacio-header .palacio-hamburger {
    display: none !important;
  }
}
