/* ============================================================
   SSD TECNOLOGIA — loja.css
   Depende de style.css (variáveis já declaradas no :root)
   ============================================================ */

/* ===== HERO LOJA ===== */
#loja-hero {
  padding: 120px 0 56px;
  background: var(--dark2);
  position: relative;
  overflow: hidden;
}

.loja-hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.loja-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.loja-hero-text h1 {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: #F0E8DF;
  line-height: 1.1;
  text-align: center;
  margin: 12px 0 16px;
}

.loja-hero-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* Barra de busca */
.loja-search-wrap {
  width: 100%;
  max-width: 560px;
}

.loja-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.loja-search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

#loja-busca {
  width: 100%;
  padding: 14px 20px 14px 46px;
  background: var(--dark3);
  border: 1px solid rgba(232, 92, 0, 0.25);
  border-radius: 50px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

#loja-busca::placeholder { color: var(--muted); }

#loja-busca:focus {
  border-color: var(--orange2);
  box-shadow: 0 0 0 3px rgba(232, 92, 0, .12);
}

/* ===== CONTROLES (sync + filtros) ===== */
.loja-controles {
  padding-top: 28px;
  padding-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Indicador de sync */
.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .2);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: .78rem;
  color: #86efac;
  font-weight: 600;
  align-self: flex-start;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-sync 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-sync {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

/* Filtros de categoria */
.filtros-categoria {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filtro-btn {
  background: var(--dark3);
  border: 1px solid rgba(232, 92, 0, .2);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}

.filtro-btn:hover {
  border-color: var(--orange2);
  color: var(--orange2);
}

.filtro-btn.ativo {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ===== MAIN / GRID ===== */
.loja-main {
  padding-top: 24px;
  padding-bottom: 80px;
  min-height: 400px;
}

.grid-produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ===== CARD DE PRODUTO ===== */
.produto-card {
  background: var(--dark3);
  border: 1px solid rgba(232, 92, 0, .12);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  text-decoration: none;
  color: var(--text);
}

.produto-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 92, 0, .35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
}

/* Foto */
.produto-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--dark4);
  overflow: hidden;
}

.produto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.produto-card:hover .produto-thumb img {
  transform: scale(1.04);
}

/* Badges */
.produto-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge-novo   { background: var(--orange);  color: #fff; }
.badge-oferta { background: #FFE600; color: #111; }

/* Info do card */
.produto-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.produto-titulo {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.produto-preco {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--orange2);
  font-family: var(--font-title, 'Plus Jakarta Sans', system-ui, sans-serif);
}

.produto-parcela {
  font-size: .75rem;
  color: var(--muted);
  margin-top: -4px;
}

/* Botão Mercado Livre */
.btn-ml {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 16px;
  background: #FFE600;
  color: #111;
  border-radius: 8px;
  font-weight: 700;
  font-size: .82rem;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.btn-ml:hover {
  background: #ffd000;
  transform: translateY(-1px);
}

.btn-ml svg {
  flex-shrink: 0;
}

/* ===== ESTADOS LOADING / ERRO / VAZIO ===== */
.loja-estado {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}

/* display:flex acima sobrescreve o atributo `hidden` da UA stylesheet — forçar none */
.loja-estado[hidden] { display: none !important; }

.estado-icon {
  font-size: 2.5rem;
  line-height: 1;
}

/* Spinner */
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(232, 92, 0, .15);
  border-top-color: var(--orange2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-tentar {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, transform .2s;
}

.btn-tentar:hover {
  background: var(--orange2);
  transform: translateY(-2px);
}

/* ===== NÃO ENCONTROU SEU PRODUTO? (bloco consultivo) ===== */
#loja-cotacao { padding: 8px 0 32px; }

.cotacao-box {
  background: linear-gradient(135deg, rgba(232,92,0,.14), rgba(255,122,26,.05)), var(--dark3);
  border: 1px solid rgba(232, 92, 0, .3);
  border-radius: 20px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cotacao-text h2 {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.cotacao-text p {
  color: var(--muted);
  font-size: .92rem;
  max-width: 620px;
  line-height: 1.6;
}

.btn-cotacao {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #062b13;
  font-weight: 800;
  font-size: .95rem;
  padding: 14px 26px;
  border-radius: 12px;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, filter .2s;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .28);
}

.btn-cotacao:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(37, 211, 102, .4);
}

.btn-cotacao svg { flex-shrink: 0; }

/* ===== BOTÃO LOJA ATIVA NO NAV ===== */
.btn-loja {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 92, 0, .15);
  border: 1px solid rgba(232, 92, 0, .3);
  color: var(--orange2) !important;
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 700;
  transition: .3s;
}

.btn-loja:hover,
.btn-loja.loja-ativa {
  background: var(--orange) !important;
  color: #fff !important;
  border-color: var(--orange) !important;
}

/* ===== WHATSAPP FLUTUANTE ===== */
.wpp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  background: #25D366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, .4);
  transition: transform .25s, box-shadow .25s;
}

.wpp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37, 211, 102, .55);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  #loja-hero { padding: 100px 0 40px; }

  .grid-produtos {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .produto-info { padding: 12px; }
  .produto-preco { font-size: 1.05rem; }
  .btn-ml { font-size: .75rem; padding: 8px 10px; }

  .cotacao-box { flex-direction: column; text-align: center; padding: 26px 22px; }
  .cotacao-text p { max-width: none; }
}

@media (max-width: 480px) {
  .grid-produtos {
    grid-template-columns: 1fr;
  }
}
