/* ============================================================
   QUINOTA — main.css
   ============================================================ */

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

:root {
  --yellow: #CDFF00;
  --black:  #0a0a0a;
  --white:  #ffffff;
  --light:  #f4f4f2;
  --line:   #e8e8e8;
  --gray:   #888;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 6px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--light); color: var(--black); font-size: 14px; line-height: 1.5; }

/* ── HEADER ── */
.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 20px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon { width: 36px; height: 36px; background: var(--yellow); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-text { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--black); letter-spacing: -0.5px; }

.search-wrap { flex: 1; position: relative; }
.search-input { width: 100%; height: 42px; border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 0 44px 0 16px; font-family: var(--font-body); font-size: 14px; color: var(--black); background: var(--light); outline: none; transition: border-color .2s; }
.search-input::placeholder { color: #aaa; }
.search-input:focus { border-color: var(--yellow); background: var(--white); }
.search-btn { position: absolute; right: 0; top: 0; height: 42px; width: 44px; border: none; background: none; cursor: pointer; color: #aaa; display: flex; align-items: center; justify-content: center; }
.search-btn:hover { color: var(--black); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn { height: 38px; padding: 0 18px; border-radius: var(--radius); font-family: var(--font-body); font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: opacity .2s, transform .1s; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.btn:hover { opacity: .85; }
.btn:active { transform: scale(.97); }
.btn-outline { background: transparent; border: 1.5px solid var(--black); color: var(--black); }
.btn-solid { background: var(--black); color: var(--white); }
.btn-icon { width: 38px; height: 38px; padding: 0; background: var(--yellow); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }

/* ── NAVBAR ── */
.navbar { background: var(--white); border-bottom: 1px solid var(--line); }
.navbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 44px; display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; align-items: center; list-style: none; }
.nav-links a { display: flex; align-items: center; gap: 6px; padding: 0 14px; height: 44px; font-size: 12px; font-weight: 500; color: #555; text-decoration: none; letter-spacing: .3px; text-transform: uppercase; border-right: 1px solid #f0f0f0; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--black); background: #fafafa; }
.nav-links li:first-child a { border-left: 1px solid #f0f0f0; }
.nav-links .active { color: var(--black); font-weight: 700; }
.nav-badge { background: var(--yellow); color: var(--black); font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 3px; }
.nav-dot-green { color: #22c55e; font-size: 10px; }
.nav-dot-red { color: #ef4444; font-size: 10px; }
.nav-sort { font-size: 12px; color: #999; display: flex; align-items: center; gap: 6px; }
.sort-select { border: none; background: none; font-size: 12px; font-family: var(--font-body); color: var(--black); font-weight: 600; cursor: pointer; outline: none; }

/* ── MENU MOBILE CATEGORIAS ── */
.cat-mobile { display: none; background: var(--white); border-bottom: 1px solid var(--line); overflow: hidden; max-height: 0; transition: max-height .3s; }
.cat-mobile.open { max-height: 300px; overflow-y: auto; }
.cat-mobile-inner { padding: 8px 16px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-mobile-item { padding: 6px 14px; border-radius: 20px; font-size: 13px; border: 1px solid var(--line); color: #555; text-decoration: none; transition: all .15s; }
.cat-mobile-item:hover, .cat-mobile-item.active { background: var(--yellow); border-color: var(--yellow); color: var(--black); font-weight: 600; }

/* ── LAYOUT ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section-title { font-family: var(--font-head); font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.section-count { font-size: 13px; color: #aaa; }

/* ── PRODUTO CARD ── */
.product-list { display: flex; flex-direction: column; background: var(--white); border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.product-card { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; padding: 20px 20px 20px 16px; border-bottom: 1px solid #f0f0f0; transition: background .15s; cursor: pointer; text-decoration: none; color: inherit; }
.product-card:last-child { border-bottom: none; }
.product-card:hover { background: #fafafa; }

.product-img { width: 80px; height: 80px; border-radius: 8px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.product-img img { width: 100%; height: 100%; object-fit: contain; }

.product-body { flex: 1; min-width: 0; }
.product-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.btn-avaliar { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); color: var(--black); border: none; border-radius: 5px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font-body); transition: opacity .2s; }
.btn-avaliar:hover { opacity: .85; }

.product-meta { display: flex; align-items: center; gap: 14px; font-size: 11px; color: #aaa; flex-wrap: wrap; }
.product-meta span { display: flex; align-items: center; gap: 4px; }
.product-name { font-size: 13px; color: #333; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.product-footer { display: flex; align-items: center; gap: 12px; }
.product-category { font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: #aaa; }
.product-votes { font-size: 11px; color: #ccc; }

/* ── NOTA Q ── */
.nota-q-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.nota-q-box { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-family: var(--font-head); font-weight: 800; font-size: 24px; letter-spacing: -1px; }
.nota-q10 { background: var(--yellow); color: #0a0a0a; }
.nota-q7  { background: #dcfce7; color: #166534; }
.nota-q5  { background: #fefce8; color: #854d0e; }
.nota-q3  { background: #fff7ed; color: #9a3412; }
.nota-q1  { background: #fef2f2; color: #991b1b; }
.nota-q-empty { background: #f5f5f5; color: #ccc; font-size: 28px; }
.nota-q-label { font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: #aaa; text-align: center; }
.trend-up   { color: #22c55e; font-size: 10px; font-weight: 700; }
.trend-down { color: #ef4444; font-size: 10px; font-weight: 700; }
.trend-flat { color: #ccc; font-size: 10px; }

/* ── EMPTY STATE ── */
.empty-state { padding: 48px; text-align: center; color: #aaa; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state a { color: var(--black); font-weight: 600; text-decoration: underline; }

/* ── PAGINAÇÃO ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 20px; border-top: 1px solid #f0f0f0; }
.pag-btn { padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; color: #555; text-decoration: none; transition: all .15s; }
.pag-btn:hover { border-color: var(--black); color: var(--black); }
.pag-btn.active { background: var(--black); color: var(--white); border-color: var(--black); font-weight: 600; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 120px; }
.sidebar-ad { background: #e8e8e8; border-radius: 10px; height: 200px; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px; border: 1px solid #ddd; }

/* Anúncio Q10 */
.ad-q10 { background: #0a0a0a; border-radius: 10px; padding: 16px; color: var(--white); border: 1px solid #222; }
.ad-q10-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--yellow); color: var(--black); font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; margin-bottom: 10px; }
.ad-q10-product { font-family: var(--font-head); font-size: 15px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.ad-q10-store { font-size: 11px; color: #666; margin-bottom: 8px; }
.ad-q10-discount { font-size: 22px; font-weight: 800; font-family: var(--font-head); color: var(--yellow); margin-bottom: 10px; }
.ad-q10-cta { display: block; width: 100%; padding: 10px; background: var(--yellow); color: var(--black); border: none; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; transition: opacity .2s; font-family: var(--font-body); }
.ad-q10-cta:hover { opacity: .85; }
.ad-q10-disclaimer { font-size: 9px; color: #444; margin-top: 6px; text-align: center; }

/* Top 10 / Categorias sidebar */
.sidebar-top10 { background: var(--white); border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.sidebar-title { padding: 14px 16px 10px; font-family: var(--font-head); font-size: 13px; font-weight: 700; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.sidebar-title span { color: var(--yellow); }
.sidebar-title a { font-size: 11px; color: #aaa; text-decoration: none; font-family: var(--font-body); font-weight: 400; }
.sidebar-title a:hover { color: var(--black); }

.top10-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #f5f5f5; cursor: pointer; transition: background .15s; text-decoration: none; color: inherit; }
.top10-item:last-child { border-bottom: none; }
.top10-item:hover, .top10-item.cat-active { background: #fafafa; }
.top10-rank { font-family: var(--font-head); font-size: 13px; font-weight: 800; color: #ddd; width: 18px; text-align: center; flex-shrink: 0; }
.top10-rank.gold { color: #FFD700; }
.top10-rank.silver { color: #aaa; }
.top10-rank.bronze { color: #cd7f32; }
.top10-img { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; background: #f5f5f5; }
.top10-img-wrap { width: 36px; height: 36px; flex-shrink: 0; }
.top10-img-placeholder { width: 36px; height: 36px; border-radius: 6px; background: #f0f0f0; }
.top10-info { flex: 1; min-width: 0; }
.top10-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top10-cat { font-size: 10px; color: #aaa; }
.top10-nota { font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--black); flex-shrink: 0; }

/* ── FOOTER ── */
.footer { background: #0a0a0a; color: #666; margin-top: 48px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 24px 24px; display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 40px; align-items: start; }
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 10px; }
.footer-logo .logo-text { color: var(--white); font-size: 20px; }
.footer-tagline { font-size: 12px; color: #444; line-height: 1.6; }
.footer-links h4, .footer-newsletter h4 { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #555; margin-bottom: 14px; }
.footer-links a { display: block; font-size: 13px; color: #555; text-decoration: none; margin-bottom: 8px; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.newsletter-row { display: flex; }
.newsletter-input { flex: 1; height: 38px; border: 1px solid #222; background: #111; color: var(--white); padding: 0 12px; font-size: 12px; font-family: var(--font-body); border-radius: 5px 0 0 5px; outline: none; }
.newsletter-input::placeholder { color: #444; }
.newsletter-input:focus { border-color: var(--yellow); }
.newsletter-btn { width: 38px; height: 38px; background: var(--yellow); border: none; border-radius: 0 5px 5px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.newsletter-btn:hover { opacity: .85; }
.footer-bottom { border-top: 1px solid #1a1a1a; padding: 16px 24px; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 11px; color: #333; letter-spacing: .3px; text-transform: uppercase; }
.footer-social { display: flex; gap: 10px; }
.social-btn { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; border: 1px solid #222; color: #555; transition: border-color .2s, color .2s; text-decoration: none; }
.social-btn:hover { border-color: var(--yellow); color: var(--yellow); }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--white); border-radius: 14px; padding: 28px; width: 460px; max-width: calc(100vw - 32px); transform: translateY(10px); transition: transform .2s; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 12px; color: #999; margin-top: 2px; }
.modal-close { background: none; border: none; cursor: pointer; color: #aaa; font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--black); }
.vote-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.vote-opt { aspect-ratio: 1; border-radius: 8px; border: 2px solid #eee; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; background: #fafafa; }
.vote-opt:hover { border-color: var(--black); background: #f0f0f0; }
.vote-opt.selected { border-color: var(--yellow); background: #f5ffe0; }
.vote-q { font-family: var(--font-head); font-size: 18px; font-weight: 800; line-height: 1; margin-bottom: 2px; }
.vote-name { font-size: 9px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: #aaa; text-align: center; }
.vote-opt.selected .vote-name { color: #666; }
.modal-comment { width: 100%; border: 1.5px solid #eee; border-radius: 7px; padding: 10px 14px; font-family: var(--font-body); font-size: 13px; resize: none; outline: none; margin-bottom: 14px; transition: border-color .2s; }
.modal-comment:focus { border-color: var(--yellow); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-cancel { background: none; border: 1.5px solid #ddd; border-radius: 6px; padding: 10px 20px; font-size: 13px; cursor: pointer; color: #666; font-family: var(--font-body); }
.btn-cancel:hover { border-color: #aaa; }
.btn-submit { background: var(--yellow); border: none; border-radius: 6px; padding: 10px 24px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--font-body); color: var(--black); transition: opacity .2s; }
.btn-submit:hover { opacity: .85; }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }
.modal-msg { margin-top: 12px; padding: 10px 14px; border-radius: 6px; font-size: 13px; text-align: center; }
.modal-msg.ok   { background: #dcfce7; color: #166534; }
.modal-msg.erro { background: #fef2f2; color: #991b1b; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .cat-mobile { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .header-inner { padding: 0 16px; gap: 12px; }
  .btn-outline { display: none; }
  .page-wrap { padding: 16px; }
  .product-card { grid-template-columns: 64px 1fr auto; gap: 10px; padding: 14px; }
  .nota-q-box { width: 56px; height: 56px; font-size: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .nav-links li:not(:first-child):not(:nth-child(4)):not(:nth-child(5)) { display: none; }
}
