/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: #1a1a2e; background: #f8f9fc; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Variables ───────────────────────────────────────────── */
:root {
  --primary: #6C63FF;
  --primary-dark: #5A52E0;
  --secondary: #FF6B6B;
  --dark: #1a1a2e;
  --text: #374151;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --bg: #f8f9fc;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

/* ── Container ───────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ── Header ──────────────────────────────────────────────── */
:root {
  --header-bg:  #0f1117;
  --catbar-bg:  #1a1d27;
  --orange:     #FF6600;
  --orange-dark:#E55A00;
}

.site-header { position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 16px rgba(0,0,0,.4); }

/* ── Barra principal ──────────────────────────────────────── */
.header-main { background: var(--header-bg); }
.header-main-inner { display: flex; flex-direction: row; align-items: center; gap: 20px; padding: 12px 20px; max-width: 1280px; margin: 0 auto; }

/* Logo — fica fixo à esquerda */
.logo { display: flex; flex-direction: row; align-items: center; gap: 10px; color: #fff; font-size: 20px; font-weight: 800; flex: 0 0 auto; text-decoration: none; white-space: nowrap; }
.logo svg { flex-shrink: 0; }
.logo-img { max-height: 48px; width: auto; object-fit: contain; }

/* Busca — ocupa todo o espaço central */
.search-bar { flex: 1 1 0; display: flex; flex-direction: row; background: #fff; border-radius: 6px; overflow: hidden; min-width: 0; transition: box-shadow .2s; }
.search-bar:focus-within { box-shadow: 0 0 0 2px var(--orange); }
.search-bar input { flex: 1; border: none; padding: 12px 18px; font-size: 15px; outline: none; color: #111; min-width: 0; background: transparent; }
.search-bar input::placeholder { color: #aaa; }
.search-bar button { background: var(--orange); color: #fff; padding: 0 24px; font-size: 14px; font-weight: 700; border: none; cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; flex: 0 0 auto; transition: background .2s; }
.search-bar button:hover { background: var(--orange-dark); }

/* Direita — fica fixo à direita */
.header-right { display: flex; flex-direction: row; align-items: center; gap: 12px; flex: 0 0 auto; }
.header-account { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(255,255,255,.8); font-size: 11px; font-weight: 600; text-decoration: none; transition: color .2s; }
.header-account:hover { color: #fff; }
.menu-toggle { display: none; color: #fff; padding: 6px; background: none; border: none; cursor: pointer; }

/* ── Barra de categorias (texto) ─────────────────────────── */
.header-catbar { background: var(--catbar-bg); border-top: 1px solid rgba(255,255,255,.08); }
.header-catbar-inner { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.header-catbar-inner::-webkit-scrollbar { display: none; }

.catbar-item { display: flex; align-items: center; padding: 0 16px; min-height: 40px; color: #e0e0e0; text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; transition: all .2s; border-bottom: 2px solid transparent; }
.catbar-item:hover { color: #fff; background: rgba(255,255,255,.07); border-bottom-color: var(--orange); }

/* ── Menu mobile ──────────────────────────────────────────── */
.mobile-nav { display: none; background: var(--catbar-bg); border-top: 1px solid rgba(255,255,255,.08); }
.mobile-nav .container { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 20px; }
.mobile-nav a { color: rgba(255,255,255,.8); padding: 6px 12px; border-radius: 6px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.mobile-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.mobile-nav.open { display: block; }

/* ── Banners ──────────────────────────────────────────────── */
.banners-wrap { padding: 20px 20px 0; max-width: 1280px; margin: 0 auto; }
.banner-principal { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; background: #e5e7eb; line-height: 0; }
.banner-principal a, .banner-principal-plain { display: block; }
.banner-principal img { width: 100%; max-height: 400px; object-fit: cover; display: block; transition: opacity .3s; }
.banner-principal img:hover { opacity: .95; }
.banners-sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.banner-sec-item { border-radius: 8px; overflow: hidden; background: #e5e7eb; line-height: 0; }
.banner-sec-item a { display: block; }
.banner-sec-item img { width: 100%; aspect-ratio: 16/5; object-fit: cover; display: block; transition: opacity .3s; }
.banner-sec-item img:hover { opacity: .92; }

/* Hero removido — substituído por banners gerenciáveis */

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-size: 15px; font-weight: 600; transition: all .2s; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(108,99,255,.4); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 10px; }
.btn-store { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 14px; transition: transform .2s, box-shadow .2s; }
.btn-store:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 60px 0; }
.section-alt { background: var(--white); }
.section-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.section-sub { color: var(--text-muted); margin-bottom: 40px; font-size: 16px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.link-more { color: var(--primary); font-weight: 600; font-size: 14px; }
.link-more:hover { text-decoration: underline; }

/* ── Category Grid ───────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.cat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 16px; text-align: center; transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cat-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-icon { font-size: 36px; }
.cat-name { font-weight: 700; font-size: 14px; color: var(--dark); }
.cat-count { font-size: 12px; color: var(--text-muted); }

/* ── Product Grid ────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }

.product-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .2s; display: flex; flex-direction: column; position: relative; }
.product-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.badge-destaque { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; z-index: 1; }
.product-img { aspect-ratio: 1; overflow: hidden; background: #f0f0f8; }
.card-img { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform .3s; }
.product-card:hover .card-img { transform: scale(1.05); }
.product-info { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-desc { font-size: 12px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { margin-top: auto; }
.price-from { display: block; font-size: 11px; color: var(--text-muted); }
.price-value { font-size: 20px; font-weight: 800; color: var(--primary); }
.price-na { font-size: 14px; color: var(--text-muted); font-style: italic; }
.btn-compare { display: block; margin-top: 12px; text-align: center; background: var(--bg); color: var(--primary); font-size: 13px; font-weight: 600; padding: 10px; border-radius: 8px; transition: background .2s; }
.product-card:hover .btn-compare { background: var(--primary); color: #fff; }

/* ── Store Cards (homepage) ──────────────────────────────── */
.section-stores { background: var(--dark); }
.section-stores .section-title { color: #fff; }
.section-stores .section-sub { color: rgba(255,255,255,.6); }
.stores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.store-card { background: var(--store-bg); color: var(--store-fg); border-radius: var(--radius); padding: 28px 20px; text-align: center; font-size: 16px; font-weight: 800; transition: transform .2s, box-shadow .2s; }
.store-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }

/* ── Store Badge ─────────────────────────────────────────── */
.store-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }

/* ── Catalog Layout ──────────────────────────────────────── */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 40px 20px; }

.filter-sidebar { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.filter-block { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.filter-block h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 12px; }
.filter-link { display: block; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--text); transition: all .2s; }
.filter-link:hover { background: var(--bg); color: var(--primary); }
.filter-link.active { background: #EEF2FF; color: var(--primary); font-weight: 600; }
.filter-link span { float: right; color: var(--text-muted); font-size: 12px; }
.filter-store { padding-left: 12px; border-left: 3px solid var(--store-bg, #ccc); }
.filter-store.active { border-left-color: var(--store-bg, var(--primary)); }

.catalog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.catalog-count { color: var(--text-muted); font-size: 14px; }

/* ── Product Detail ──────────────────────────────────────── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 40px 0; }
.product-gallery .main-img { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.detail-img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 32px; }

.product-meta { padding: 8px 0; }
.cat-tag { display: inline-block; background: #EEF2FF; color: var(--primary); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 100px; margin-bottom: 12px; }
.product-meta h1 { font-size: clamp(20px, 3vw, 32px); font-weight: 800; margin-bottom: 12px; }
.product-short-desc { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.detail-price { background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.price-label { display: block; font-size: 12px; color: #16A34A; font-weight: 600; margin-bottom: 4px; }
.price-big { font-size: 36px; font-weight: 800; color: #15803D; }

.price-table { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.price-table h3 { padding: 16px 20px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--border); }
.price-row { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.price-row:last-child { border-bottom: none; }
.price-store { flex-shrink: 0; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 700; min-width: 110px; text-align: center; }
.price-amount { flex: 1; font-size: 18px; font-weight: 700; color: var(--dark); }
.affiliate-notice { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

.product-description { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 48px; }
.product-description h2 { font-size: 20px; margin-bottom: 20px; }
.desc-content { line-height: 1.8; color: var(--text); }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--dark); font-weight: 600; }

/* ── Search ──────────────────────────────────────────────── */
.search-header { padding: 40px 0 24px; }
.search-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 20px; }
.search-form-big { display: flex; gap: 12px; max-width: 600px; }
.search-form-big input { flex: 1; padding: 14px 20px; border: 2px solid var(--border); border-radius: 10px; font-size: 16px; outline: none; transition: border-color .2s; }
.search-form-big input:focus { border-color: var(--primary); }
.search-meta { margin-bottom: 24px; color: var(--text-muted); font-size: 15px; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 32px 0; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; font-size: 14px; font-weight: 600; background: var(--white); border: 1px solid var(--border); color: var(--text); transition: all .2s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state p { margin: 16px 0 24px; font-size: 16px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.8); margin-top: 80px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding: 60px 20px 40px; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p, .footer-brand .disclaimer { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.7; margin-bottom: 8px; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,.5); font-size: 14px; margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 20px; font-size: 13px; color: rgba(255,255,255,.3); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .banners-sec-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .header-catbar { display: none; }
  .header-account span { display: none; }
  .header-main-inner { gap: 12px; padding: 10px 14px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; max-height: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .banners-wrap { padding: 12px 12px 0; }
  .banners-sec-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .banners-sec-grid { grid-template-columns: 1fr 1fr; }
  .search-bar button span { display: none; }
  .logo span { display: none; }
}
