/* SmartSearch PS v1.1 — Estilos Modernos do Overlay Instantâneo */
:root {
  --ssps-accent: #009304;
}

#search_popup {
  display: none !important;
}

.ssps-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(15, 23, 42, 0.34);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem 2rem;
  overflow-y: auto;
  box-sizing: border-box;
}

.ssps-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 100000;
  background: #0f172a;
  color: #ffffff;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
}
.ssps-toast a {
  color: #4ade80;
  font-weight: 800;
  text-decoration: underline;
}

.ssps-panel {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 1140px;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.ssps-top-searchbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.ssps-search-icon {
  font-size: 1.2rem;
}

.ssps-modal-input {
  flex: 1;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.62rem 0.9rem;
  font-size: 1rem;
  color: #0f172a;
  outline: none;
  background: #f8fafc;
}
.ssps-modal-input:focus {
  border-color: var(--ssps-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 147, 4, 0.16);
}

.ssps-voice-btn, .ssps-clear-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.ssps-voice-btn.listening {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.ssps-close-btn {
  background: #e2e8f0;
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.25rem;
  line-height: 1;
  color: #334155;
  cursor: pointer;
}
.ssps-close-btn:hover {
  background: #cbd5e1;
}

.ssps-trends-bar {
  padding: 0.55rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.ssps-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem 0;
}
.ssps-chips-lbl {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  margin-right: 0.25rem;
}
.ssps-chip-term {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
}
.ssps-chip-term:hover, .ssps-chip-term.is-trend:hover {
  border-color: var(--ssps-accent);
  color: var(--ssps-accent);
}

.ssps-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.ssps-status {
  font-size: 0.9rem;
  color: #334155;
}

.ssps-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.ssps-stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
  cursor: pointer;
}

.ssps-select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.83rem;
  background: #ffffff;
  color: #1e293b;
}

.ssps-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.25rem;
  background: linear-gradient(90deg, #ecfdf5, #eff6ff);
  border-bottom: 1px solid #d1fae5;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.92rem;
}
.ssps-banner img {
  max-height: 44px;
  border-radius: 6px;
}

.ssps-body {
  display: flex;
  align-items: stretch;
  min-height: 260px;
  max-height: 70vh;
  overflow-y: auto;
}

.ssps-sidebar {
  width: 235px;
  flex-shrink: 0;
  padding: 1rem;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ssps-facet-group {
  margin-bottom: 1rem;
}

.ssps-facet-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.ssps-price-inputs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ssps-price-inp {
  width: 62px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.28rem 0.4rem;
  font-size: 0.8rem;
  background: #ffffff;
}
.ssps-price-go {
  border: none;
  background: var(--ssps-accent);
  color: #ffffff;
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.ssps-facet-btn {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.32rem 0.5rem;
  font-size: 0.81rem;
  color: #334155;
  cursor: pointer;
  margin-bottom: 0.2rem;
}
.ssps-facet-btn:hover {
  background: #e2e8f0;
}
.ssps-facet-btn.active {
  background: var(--ssps-accent);
  color: #ffffff;
  font-weight: 700;
}

.ssps-results-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ssps-results {
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 0.9rem;
  align-content: start;
}

.ssps-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
  background: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ssps-card:hover {
  transform: translateY(-2px);
  border-color: var(--ssps-accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.09);
}

.ssps-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ssps-img-wrap {
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  overflow: hidden;
  background: #ffffff;
  border-radius: 6px;
}
.ssps-img-wrap img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.ssps-disc-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.14rem 0.45rem;
  border-radius: 6px;
}

.ssps-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ssps-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.ssps-brand {
  font-weight: 700;
  color: var(--ssps-accent);
}

.ssps-title {
  font-size: 0.87rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.ssps-cat {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.ssps-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.45rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.ssps-price-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ssps-old-price {
  font-size: 0.74rem;
  color: #94a3b8;
  text-decoration: line-through;
}
.ssps-price {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
}

.ssps-stock {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  width: fit-content;
}
.ssps-stock.in-stock {
  background: #dcfce7;
  color: #166534;
}
.ssps-stock.out-stock {
  background: #fee2e2;
  color: #991b1b;
}

.ssps-cart-btn, .ssps-opt-btn {
  background: var(--ssps-accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.ssps-cart-btn:hover, .ssps-opt-btn:hover {
  filter: brightness(1.08);
  color: #ffffff;
}
.ssps-cart-btn.added {
  background: #0f172a;
}

.ssps-footer-bar {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  background: #f8fafc;
}
.ssps-view-all-btn {
  background: #ffffff;
  border: 1.5px solid var(--ssps-accent);
  color: var(--ssps-accent);
  border-radius: 10px;
  padding: 0.5rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}
.ssps-view-all-btn:hover {
  background: var(--ssps-accent);
  color: #ffffff;
}

.ssps-mark {
  background: #fef08a;
  color: #0f172a;
  padding: 0 2px;
  border-radius: 2px;
}

.ssps-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
}
.ssps-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

@media (max-width: 768px) {
  .ssps-overlay { padding: 0.65rem; }
  .ssps-body { flex-direction: column; max-height: 80vh; }
  .ssps-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; }
  .ssps-results { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
}
