:root {
  color-scheme: light dark;
  --bg: #f7f7f9;
  --card: #ffffff;
  --border: #e6e7eb;
  --text: #16181c;
  --muted: #6b7280;
  --accent: #e0472c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header.top {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}
header.top .inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand-link:hover { text-decoration: none; }
.brand-icon { color: var(--accent); }
.brand-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-name .accent { color: var(--accent); }
.header-subtitle { white-space: nowrap; }
.header-search-group { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; max-width: 560px; min-width: 180px; }
.header-search-group .search-wrap { flex: 1 1 0; max-width: none; min-width: 0; }
.header-categories-link { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 0.88rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; transition: background .15s, color .15s; }
.header-categories-link:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.header-categories-link .icon { flex-shrink: 0; }
.header-coupons-link { color: var(--accent); }
.header-coupons-link:hover { background: #fff3e0; color: var(--accent); }

.search-wrap { position: relative; flex: 1 1 320px; max-width: 460px; min-width: 180px; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap input {
  width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.9rem; background: var(--bg); color: var(--text); box-sizing: border-box;
}
.search-wrap input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: #fff; }

.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12); max-height: 420px; overflow-y: auto; z-index: 30;
}
.search-section-label {
  padding: 10px 14px 4px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  color: var(--muted); letter-spacing: 0.04em;
}
.search-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  text-decoration: none; color: var(--text); font-size: 0.87rem;
}
.search-item:hover, .search-item.active { background: #fdeee9; text-decoration: none; }
.search-item img, .search-item-noimg {
  width: 32px; height: 32px; object-fit: contain; background: var(--bg); border-radius: 6px; flex-shrink: 0;
}
.search-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item-price { color: var(--accent); font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.search-item-cat { justify-content: space-between; font-weight: 600; }
.search-item mark { background: #fff3cd; color: inherit; border-radius: 2px; padding: 0 1px; }
.search-see-all {
  display: block; text-align: center; padding: 10px; font-size: 0.85rem; font-weight: 600;
  color: var(--accent); text-decoration: none; border-top: 1px solid var(--border);
}
.search-see-all:hover, .search-see-all.active { background: var(--bg); text-decoration: none; }
.search-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 0.85rem; }

.filters { max-width: 1200px; margin: 20px auto 0; padding: 0 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.filters a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.filters a.active { background: var(--text); color: #fff; border-color: var(--text); }
.filters a .count { color: var(--muted); font-size: 0.82em; }
.filters a.active .count { color: #d8d8dc; }

.section { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 4px; gap: 12px; }
.section-head h2 { font-size: 1.15rem; margin: 0; }
.section-more { font-size: 0.85rem; font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.section-more:hover { text-decoration: underline; }
.sort-select { font-size: 0.82rem; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; flex-shrink: 0; }
.section .grid { padding: 0; margin: 16px 0 10px; }

.grid {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.offer-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  transition: transform 0.1s ease;
}
.offer-card:hover { transform: translateY(-2px); }
.offer-card .img-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }

.offer-card .img-wrap {
  height: 200px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.offer-card img {
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.offer-card .source-tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,0.75); color: #fff;
}
.offer-card .discount-tag {
  position: absolute; top: 8px; right: 8px;
  font-size: 0.75rem; font-weight: 700;
  padding: 4px 8px; border-radius: 999px; background: var(--accent); color: #fff;
}
.offer-card .opinion-tag {
  position: absolute; top: 34px; left: 8px; display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; background: #fff7ed; color: #c2410c; border: 1px solid #fdba74;
}

.offer-card .body { padding: 12px 14px 16px; flex: 1; display: flex; flex-direction: column; }
.offer-card .title { font-size: 0.88rem; line-height: 1.3; margin-bottom: 10px; flex: 1; }
.offer-card .price-row .old { color: var(--muted); text-decoration: line-through; font-size: 0.8rem; display: block; }
.offer-card .price-row .now { color: var(--accent); font-weight: 700; font-size: 1.15rem; }
.offer-card .price-row .price-single { color: var(--text); font-weight: 600; font-size: 1rem; }
.offer-card .coupon { margin-top: 8px; font-size: 0.78rem; background: #fff3cd; color: #8a6d00; padding: 4px 8px; border-radius: 6px; display: inline-block; }

.card-actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.card-btn {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.card-btn.ghost { border: 1px solid var(--border); color: var(--text); }
.card-btn.solid { background: var(--accent); color: #fff; }
.card-btn:hover { opacity: 0.9; text-decoration: none; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
footer.site { background: var(--card); border-top: 1px solid var(--border); padding: 32px 24px 40px; margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1rem; color: var(--text); margin-bottom: 12px; flex-wrap: wrap; }
.footer-ig-link { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; font-weight: 600; color: #e1306c; text-decoration: none; transition: opacity .15s; }
.footer-ig-link:hover { opacity: .75; }
.footer-inner p { margin: 0 0 10px; }
.footer-fine { font-size: 0.76rem; opacity: 0.85; }

/* ---- página de detalhe ---- */
.breadcrumb { max-width: 1200px; margin: 16px auto 0; padding: 0 24px; font-size: 0.85rem; }
.breadcrumb a { color: var(--muted); }

.product {
  max-width: 1200px; margin: 20px auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 32px;
}
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } }

.description-section { max-width: 1200px; margin: 32px auto 0; padding: 0 24px; }
.description-section h2 { font-size: 1.1rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.offer-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.offer-tags svg { color: var(--muted); flex-shrink: 0; }
.offer-tag { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
.offer-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.opinion-box {
  background: linear-gradient(135deg, #fff7ed, #fff);
  border: 1px solid #fdba74; border-left: 5px solid var(--accent);
  border-radius: 12px; padding: 20px;
}
.opinion-box h2 { color: var(--accent); margin: 0 0 10px; }
.opinion-text { line-height: 1.7; white-space: pre-line; }

.gallery-main {
  aspect-ratio: 1/1; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 10px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 64px; height: 64px; object-fit: contain; background: var(--card);
  border: 2px solid var(--border); border-radius: 8px; cursor: pointer;
}
.gallery-thumbs img.active { border-color: var(--accent); }

.video-section { background: #0b0b0d; padding: 32px 24px; margin: 32px 0; }
.video-wrap { max-width: 900px; margin: 0 auto; }
.video-wrap iframe, .video-wrap video {
  display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; background: #000;
}

.product-info .source-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; background: #eee; margin-bottom: 10px;
}
.product-info h1 { font-size: 1.3rem; line-height: 1.35; margin: 0 0 12px; }
.product-info .price-block .old { color: var(--muted); text-decoration: line-through; font-size: 1rem; }
.product-info .price-block .now { display: block; color: var(--accent); font-weight: 800; font-size: 2rem; }
.product-info .price-block .price-single { display: block; color: var(--text); font-weight: 700; font-size: 1.6rem; }
.product-info .discount-badge {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700;
  font-size: 0.85rem; padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.product-info .coupon-box {
  margin-top: 10px; background: #fff3cd; color: #8a6d00; padding: 8px 12px;
  border-radius: 8px; display: inline-block; font-weight: 600;
}

.action-row { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; align-items: stretch; }
.btn-store {
  display: inline-flex; align-items: center; justify-content: center;
  background: #1db954; color: #fff; padding: 18px 32px; border-radius: 12px;
  text-decoration: none; font-weight: 800; font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(29, 185, 84, 0.35);
}
.btn-store:hover { background: #17a648; text-decoration: none; }
.btn-store .icon { vertical-align: -3px; margin-right: 8px; }
.modal-submit {
  background: var(--accent); color: #fff; border: 0; padding: 14px 24px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
}
.modal-submit:hover { opacity: 0.92; }
.btn-share {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 14px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 0.95rem;
}
.btn-share:hover { background: #f0f0f2; }

.referral-box {
  margin: 4px 0 20px; padding: 16px; border: 1px solid var(--border); border-radius: 10px;
  background: #fafafb;
}
.referral-box h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 0.95rem; }
.referral-box .muted { margin: 0 0 12px; font-size: 0.85rem; }
.referral-row { display: flex; gap: 8px; margin-bottom: 10px; }
.referral-row input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.85rem; background: #fff; color: var(--muted); min-width: 0;
}
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #fff;
  padding: 11px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.btn-whatsapp:hover { background: #20bd5a; text-decoration: none; }

.description {
  line-height: 1.7; white-space: pre-line; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 20px;
}

.icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.btn-share .icon, .card-btn .icon, .btn-whatsapp .icon { vertical-align: -4px; margin-right: 4px; }
.btn-whatsapp .icon { margin-right: 0; }

.stars { display: inline-flex; gap: 1px; color: #f5a623; }
.stars .star-empty { color: #d5d5d8; }

/* ---- comentários ---- */
.comments { max-width: 1200px; margin: 40px auto; padding: 0 24px; }
.comments h2 { font-size: 1.15rem; }
.rating-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.rating-summary .avg { font-size: 1.8rem; font-weight: 800; }

.comment-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px;
}
.comment-item .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.comment-item .name { font-weight: 700; }
.comment-item .date { color: var(--muted); font-size: 0.78rem; }

.comment-form {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; margin-top: 20px;
}
.comment-form label { display: block; font-weight: 600; font-size: 0.85rem; margin: 12px 0 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.9rem;
}
.comment-form textarea { min-height: 90px; }
.star-picker { display: flex; gap: 4px; font-size: 1.6rem; cursor: pointer; }
.star-picker span { color: #d5d5d8; }
.star-picker span.filled { color: #f5a623; }
.comment-form button {
  margin-top: 16px; background: var(--accent); color: #fff; border: 0;
  padding: 12px 22px; border-radius: 8px; font-weight: 700; cursor: pointer;
}
.form-msg { margin-top: 10px; font-size: 0.85rem; }
.form-msg.error { color: #c0392b; }
.form-msg.ok { color: #1f9d55; }

/* ---- modal de reportar erro ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-box {
  background: var(--card); border-radius: 12px; padding: 24px; max-width: 440px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.reason-options { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.reason-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 400;
}
.reason-item input { width: auto; margin: 0; }
.modal-box textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; min-height: 70px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
