/* página de achados — Apple style */

body {
  background: var(--bg);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ── SEARCH BAR (sub-nav abaixo do nav principal) ───────────────────────── */

.search-bar {
  position: sticky;
  top: 44px;
  z-index: 48;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sep);
}

.search-bar-inner {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* mantido para retrocompatibilidade */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--surface);
  font-size: 16px;
}

.search-pill {
  display: flex;
  align-items: center;
  height: 36px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--r-pill);
  padding: 0 14px;
  gap: 8px;
  transition: background 0.15s;
  color: var(--text);
}

.search-pill:focus-within {
  background: rgba(0, 0, 0, 0.1);
  outline: 3px solid rgba(0, 102, 204, 0.35);
  outline-offset: 0;
}

.search-label { display: none; }

.search-pill input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  width: 100%;
}

.search-pill input::placeholder { color: var(--secondary); }

.search-icon {
  color: var(--secondary);
  font-size: 18px;
  flex: 0 0 auto;
}

.search-pill .divider { display: none; }

.refresh {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--sep-solid);
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s;
}

.refresh:hover { background: var(--bg); }

.refresh.spin .material-symbols-outlined {
  animation: spin 0.7s linear infinite;
}

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

/* ── MAIN ───────────────────────────────────────────────────────────────── */

.ofertas-main { padding: 40px 0 80px; }

.page-intro {
  max-width: 680px;
  margin: 0 0 20px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
}

.page-intro h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.07;
  color: var(--text);
}

.page-intro p {
  margin-top: 10px;
  font-size: 19px;
  line-height: 1.42;
  color: var(--secondary);
}

/* ── TRUST NOTE (PUBLICIDADE — CONAR ostensivo) ──────────────────────────── */

.trust-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 680px;
  margin: 24px 0 36px;
  padding: 16px 18px;
  background: #fff8e1;
  border-radius: var(--r-sm);
  border: 2px solid #f0c040;
  color: var(--text);
}

.trust-note .material-symbols-outlined {
  font-size: 22px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #b8860b;
}

.trust-note-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #b8860b;
  color: #fff;
  border-radius: 4px;
  padding: 2px 7px;
  margin-bottom: 6px;
}

.trust-note p {
  font-size: 13px;
  line-height: 1.52;
  letter-spacing: 0;
  color: #5a4000;
  margin: 0;
}

/* ── CATALOG BAR ────────────────────────────────────────────────────────── */

.catalog-bar {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.catalog-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.result-count {
  margin: 0;
  font-size: 14px;
  color: var(--secondary);
  letter-spacing: 0;
}

.filter-btn {
  height: 28px;
  padding: 0 14px;
  border: 1px solid var(--sep-solid);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.filter-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

/* ── PAGER ──────────────────────────────────────────────────────────────── */

.pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pager-bottom {
  width: 100%;
  justify-content: center;
  margin-top: 48px;
}

.pager-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sep-solid);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s;
}

.pager-btn:hover:not(:disabled) { border-color: var(--text); }
.pager-btn:disabled { cursor: not-allowed; opacity: 0.3; }
.pager-btn .material-symbols-outlined { font-size: 20px; }

.page-info {
  min-width: 88px;
  text-align: center;
  font-size: 13px;
  color: var(--secondary);
}

/* ── STATUS ─────────────────────────────────────────────────────────────── */

.status {
  text-align: center;
  padding: 48px 0;
  font-size: 15px;
  color: var(--secondary);
}

.status.error { color: #d70015; }

/* ── GRID ───────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
  gap: 12px;
}

/* ── CARD ───────────────────────────────────────────────────────────────── */

.card { min-width: 0; }

.card-link {
  display: block;
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
  color: inherit;
  transition: transform 0.22s cubic-bezier(.25,.46,.45,.94),
              box-shadow 0.22s ease;
}

.card-link:hover {
  transform: scale(1.012);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
}

.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg);
  overflow: hidden;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  display: block;
  transition: transform 0.3s ease;
}

.card-link:hover .thumb-img { transform: scale(1.04); }

/* badge marketplace */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.badge.ml     { color: #2d3277; }
.badge.amazon { color: #e47911; }

/* favorite */
.favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 22px;
  color: rgba(0, 0, 0, 0.18);
  transition: color 0.18s;
}

.card-link:hover .favorite { color: #d70015; }

/* body */
.body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.28;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.description {
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.features { display: none !important; }

.footer {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.cta {
  font-size: 13px;
  color: var(--blue);
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.15s;
}

.card-link:hover .cta { color: var(--blue-dark); }

.captured-at {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--secondary);
  opacity: 0.7;
  letter-spacing: 0;
}

/* ── CARROSSEL ──────────────────────────────────────────────────────────── */

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.14);
  transition: opacity 0.18s;
}

.arrow .material-symbols-outlined { font-size: 18px; }
.arrow-prev { left: 8px; }
.arrow-next { right: 8px; }
.thumb:hover .arrow { opacity: 1; }

.dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.dot.active { background: var(--text); }

/* ── RESPONSIVO ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .ofertas-header .container {
    height: 52px;
  }
  .brand span:last-child { display: none; }
}

@media (max-width: 620px) {
  .page-intro p { font-size: 17px; }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .thumb-img { padding: 8px; }
  .body { padding: 10px 12px 14px; }
  .title { font-size: 13px; }
  .price { font-size: 15px; }
  .catalog-bar { flex-direction: column; align-items: flex-start; }
  .pager { width: 100%; justify-content: space-between; }
  .page-info { flex: 1; }
}
