/* ==========================================================================
   ACHADINHOS MERCADO LIVRE — TEMA MODERNO GRAFITE / DARK LUXO
   Identidade: Vermelho, Preto, Branco e Amarelo Mercado Livre
   ========================================================================== */

:root {
  --primary: #ffe600;
  --primary-hover: #ffd000;
  --primary-dark: #ffe600;
  --accent-green: #00a650;
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-card-hover: #182230;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #202b3c;
  --border-light: #182230;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at 50% 0%, #16202e 0%, #0d131c 550px, #070a0f 100%);
  background-attachment: fixed;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   TOPO & HEADER
   ========================================================================== */

.top-bar-notice {
  background: linear-gradient(90deg, #070a0f 0%, #151d2a 50%, #070a0f 100%);
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid #1a2332;
}

.top-bar-notice span {
  color: var(--primary);
  font-weight: 800;
}

.header-site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 19, 28, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.header-container {
  width: min(1360px, 94%);
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* LOGO */
.logo-achadinhos {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icone {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(255, 230, 0, 0.35);
  transition: transform 0.2s ease;
}

.logo-achadinhos:hover .logo-icone {
  transform: scale(1.05);
}

.logo-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-info strong {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.logo-info span {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* BARRA DE PESQUISA */
.busca-container {
  flex: 1;
  max-width: 650px;
  position: relative;
}

.busca-form {
  display: flex;
  align-items: center;
  background: #151d2a;
  border: 1.5px solid #283548;
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: all 0.2s ease;
}

.busca-form:focus-within {
  border-color: var(--primary);
  background: #182230;
  box-shadow: 0 0 0 4px rgba(255, 230, 0, 0.2);
}

.busca-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-size: 14px;
  color: #ffffff;
  outline: none;
  min-width: 0;
}

.busca-input::placeholder {
  color: var(--text-muted);
}

.busca-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: #0f172a;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-full);
  margin-right: 3px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.busca-btn:hover {
  background: var(--primary-hover);
}

.busca-btn:active {
  transform: scale(0.97);
}

/* AÇÕES DO TOPO */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: #16202e;
  color: #f1f5f9;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #283548;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-admin-link:hover {
  background: var(--primary);
  color: #0f172a;
  border-color: var(--primary);
}

/* ==========================================================================
   MENU DE CATEGORIAS
   ========================================================================== */

.nav-categorias-wrapper {
  background: #0d131c;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.nav-categorias {
  width: min(1360px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-categorias::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: #151d2a;
  border: 1px solid #233042;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-pill:hover,
.cat-pill.ativa {
  background: var(--primary);
  border-color: #ffd000;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 230, 0, 0.25);
}

/* ==========================================================================
   BANNER PRINCIPAL (HERO)
   ========================================================================== */

.hero-banner {
  background: linear-gradient(135deg, #070a0f 0%, #111827 50%, #161f2e 100%);
  color: #ffffff;
  padding: 44px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--primary);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -45%;
  right: -5%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 230, 0, 0.22) 0%, rgba(255, 215, 0, 0.05) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-container {
  width: min(1360px, 94%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 30px;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero-title span {
  color: var(--primary);
}

.hero-desc {
  font-size: 15px;
  color: #cbd5e1;
  max-width: 580px;
  margin-bottom: 22px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #0f172a;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 4px 15px rgba(255, 230, 0, 0.3);
  transition: all 0.2s ease;
}

.btn-hero:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 230, 0, 0.45);
}

.hero-badges-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 230, 0, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.hero-badge-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.hero-badge-item small {
  color: #94a3b8;
  font-size: 12px;
}

/* ==========================================================================
   ESTRUTURA GERAL DAS SEÇÕES & VITRINES
   ========================================================================== */

.main-content {
  width: min(1360px, 94%);
  margin: 32px auto;
  flex: 1;
}

.secao-vitrine {
  margin-bottom: 44px;
}

/* DESTAQUE COM FUNDO ESPECIAL ESCURO / VERMELHO / DOURADO */
#secaoDestaques {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, #131b26 45%, rgba(255, 230, 0, 0.08) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

#secaoMaisProcurados {
  background: linear-gradient(135deg, #131b26 0%, #182230 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.secao-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.secao-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.secao-header h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin: 0;
}

.secao-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ver-mais-link {
  font-size: 13px;
  font-weight: 800;
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ver-mais-link:hover {
  color: #93c5fd;
  transform: translateX(3px);
}

/* ==========================================================================
   GRID DE PRODUTOS & CARDS MODERNOS
   ========================================================================== */

.grade-produtos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card-produto {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  position: relative;
}

.card-produto:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #f59e0b;
}

/* ÁREA DA IMAGEM */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.card-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  user-select: none;
}

.card-produto:hover .card-media img {
  transform: scale(1.04);
}

/* BADGES FLUTUANTES */
.badge-desconto {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
  z-index: 2;
  text-transform: uppercase;
}

.badge-frete {
  position: absolute;
  bottom: 8px;
  left: 10px;
  background: var(--accent-green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0, 166, 80, 0.3);
  z-index: 2;
}

.badge-video {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

/* CONTEÚDO DO CARD */
.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-categoria-tag {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.card-titulo {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card-titulo a:hover {
  color: var(--primary);
}

/* ÁREA DE PREÇO */
.card-preco-box {
  margin-top: auto;
  margin-bottom: 12px;
}

.card-preco-antigo {
  font-size: 11.5px;
  color: var(--text-light);
  text-decoration: line-through;
  min-height: 16px;
  line-height: 1;
}

.card-preco-atual {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.card-preco-atual small {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}

/* BOTÕES DE AÇÃO DO CARD */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-ver-oferta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  background: var(--primary);
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(255, 230, 0, 0.25);
}

.btn-ver-oferta:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(255, 230, 0, 0.4);
}

.btn-detalhes {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
  transition: color 0.2s ease;
}

.btn-detalhes:hover {
  color: #ffffff;
}

/* ==========================================================================
   ESTADOS DE CARREGAMENTO & VAZIO
   ========================================================================== */

.box-carregando,
.box-vazio {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed #2d3b4e;
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 14px;
}

.box-carregando {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #283548;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   FILTROS DA VITRINE GERAL
   ========================================================================== */

.filtros-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.filtros-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filtro-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filtro-item label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.filtro-item select,
.filtro-item input {
  padding: 9px 12px;
  border: 1px solid #283548;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #ffffff;
  background: #182230;
  outline: none;
}

.filtro-item select:focus,
.filtro-item input:focus {
  border-color: var(--primary);
}

.filtro-botoes {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.btn-filtrar {
  padding: 9px 16px;
  background: var(--primary);
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-md);
  transition: opacity 0.2s, transform 0.1s;
}

.btn-limpar {
  padding: 9px 14px;
  background: #1e293b;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.btn-filtrar:hover { opacity: 0.9; }
.btn-limpar:hover { background: #283548; color: #fff; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer-site {
  background: #080c12;
  color: #cbd5e1;
  padding: 44px 0 24px;
  margin-top: auto;
  border-top: 3px solid var(--primary);
}

.footer-container {
  width: min(1360px, 94%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand strong {
  font-size: 18px;
  color: #fff;
  display: block;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 400px;
  color: #94a3b8;
}

.footer-col h4 {
  font-size: 14px;
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  width: min(1360px, 94%);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 1024px) {
  .grade-produtos {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .hero-container {
    grid-template-columns: 1fr;
  }
  .hero-badges-list {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    gap: 12px;
  }
  .busca-container {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .grade-produtos {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card-media {
    padding: 8px;
  }
  .card-body {
    padding: 10px;
  }
  .card-titulo {
    font-size: 12.5px;
    min-height: 2.6em;
  }
  .card-preco-atual {
    font-size: 17px;
  }
  .btn-ver-oferta {
    padding: 8px 10px;
    font-size: 11.5px;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .top-bar-notice {
    font-size: 11px;
    padding: 4px 2%;
  }
  .logo-info strong {
    font-size: 16px;
  }
  .hero-title {
    font-size: 24px;
  }
  .hero-banner {
    padding: 24px 0;
  }
}