/*
Theme Name: OfertaFlash
Theme URI: https://github.com/ofertaflash
Author: OfertaFlash Team
Description: Tema de portal de promoções e ofertas no estilo Pelando e Promobit
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ofertaflash
Tags: ofertas, promoções, deals, ecommerce
*/

/* ===========================
   CSS VARIABLES — LIGHT CLEAN
=========================== */
:root {
  --primary: #16A34A;
  --primary-dark: #15803D;
  --primary-light: #22C55E;
  --primary-xlight: #DCFCE7;
  --secondary: #1E293B;
  --accent: #F59E0B;
  --accent-hot: #EF4444;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --surface: #F1F5F9;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;
  --text: #0F172A;
  --text-muted: #475569;
  --text-dim: #94A3B8;
  --tag-bg: #F1F5F9;
  --success: #16A34A;
  --danger: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 8px rgba(0,0,0,0.07), 0 0 1px rgba(0,0,0,0.05);
  --shadow-hover: 0 8px 32px rgba(22,163,74,0.15), 0 0 1px rgba(0,0,0,0.08);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --font-head: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

h1,h2,h3,h4,h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===========================
   LAYOUT
=========================== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; padding: 28px 0 60px; }

/* ===========================
   HEADER
=========================== */
.site-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.site-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.site-logo .logo-text { color: var(--text); }
.site-logo .logo-text span { color: var(--primary); }

/* Search */
.header-search { flex: 1; max-width: 460px; position: relative; }

.header-search input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 9px 20px 9px 42px;
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.header-search input::placeholder { color: var(--text-dim); }
.header-search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }

.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.header-search button[type="submit"] {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-head);
  transition: var(--transition);
}
.header-search button[type="submit"]:hover { background: var(--primary-dark); }

/* Nav */
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 2px; align-items: center; }
.main-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.main-nav a:hover, .main-nav a.current { color: var(--text); background: var(--surface); }
.main-nav .btn-submit {
  background: var(--primary);
  color: white !important;
  padding: 8px 18px;
  font-weight: 700;
  border-radius: 50px;
}
.main-nav .btn-submit:hover { background: var(--primary-dark); }

/* ===========================
   CATEGORY BAR
=========================== */
.category-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.category-bar-inner {
  display: flex;
  gap: 4px;
  padding: 8px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
  border: 1.5px solid transparent;
  font-family: var(--font-head);
}
.cat-pill:hover { background: var(--surface); color: var(--text); border-color: var(--border); }
.cat-pill.active { background: var(--primary-xlight); color: var(--primary-dark); border-color: rgba(22,163,74,0.3); }
.cat-pill .cat-emoji { font-size: 14px; }

/* ===========================
   FILTER BAR
=========================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: var(--transition);
  font-family: var(--font-head);
}
.filter-tab:hover { color: var(--primary); border-color: var(--primary); }
.filter-tab.active { background: var(--primary); border-color: var(--primary); color: white; }

.filter-count { font-size: 13px; color: var(--text-dim); font-family: var(--font-mono); }

/* ===========================
   DEALS GRID
=========================== */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ===========================
   DEAL CARD
=========================== */
.deal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.deal-card:hover {
  border-color: rgba(22,163,74,0.35);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.deal-card:hover .deal-thumb img { transform: scale(1.05); }

/* Hot badge */
.deal-card.is-hot::before {
  content: '🔥 Quente';
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--accent-hot);
  color: white;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-head);
  padding: 3px 10px;
  border-radius: 50px;
}

.deal-card.is-free::before {
  content: '🎁 Grátis';
  background: var(--primary);
}

/* Thumb */
.deal-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.deal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.deal-thumb .thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: var(--text-dim);
}

.store-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Card body */
.deal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.deal-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-title a:hover { color: var(--primary); }

.deal-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price */
.deal-price-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deal-price {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.deal-price-free {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.deal-original-price {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: line-through;
  font-family: var(--font-mono);
}

.deal-discount {
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-head);
}

/* Card footer */
.deal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.deal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.deal-meta span { display: flex; align-items: center; gap: 4px; }

/* Vote button */
.vote-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  font-family: var(--font-head);
}
.vote-btn:hover, .vote-btn.voted {
  background: var(--primary-xlight);
  border-color: var(--primary);
  color: var(--primary);
}
.vote-btn .fire { font-size: 14px; }

/* ===========================
   SIDEBAR
=========================== */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 28px;
  align-items: start;
}

.sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
}

.widget-body { padding: 12px 16px; }

/* Trending */
.trending-list { display: flex; flex-direction: column; gap: 2px; }
.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.trending-item:hover { background: var(--surface); }
.trending-num {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dim);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.trending-num.top { color: var(--primary); }
.trending-info { flex: 1; min-width: 0; }
.trending-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.trending-price { font-family: var(--font-mono); font-size: 12px; color: var(--primary); font-weight: 700; margin-top: 2px; }
.trending-thumb { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); }
.trending-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===========================
   SINGLE DEAL PAGE
=========================== */
.single-deal-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.deal-main { display: flex; flex-direction: column; gap: 20px; }

.deal-header-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.deal-image-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  max-height: 460px;
  overflow: hidden;
  position: relative;
}

.deal-image-wrap img {
  max-height: 440px;
  width: 100%;
  object-fit: contain;
  padding: 24px;
}

.deal-info { padding: 24px; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.breadcrumb a:hover { color: var(--primary); }

/* Deal heading */
.deal-heading {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 14px;
}

/* Tags */
.deal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.deal-tag {
  background: var(--tag-bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-head);
  transition: var(--transition);
}
.deal-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-xlight); }

/* Price block */
.deal-price-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.price-current {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.price-current.is-free { color: var(--primary); }

.price-meta { display: flex; flex-direction: column; gap: 4px; }
.price-original { font-size: 13px; color: var(--text-dim); text-decoration: line-through; font-family: var(--font-mono); }
.price-badge {
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-head);
  display: inline-block;
}

/* CTA Button */
.cta-section { display: flex; flex-direction: column; gap: 10px; }

.btn-ir-oferta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: white;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  padding: 16px 28px;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(22,163,74,0.3);
  width: 100%;
}

.btn-ir-oferta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(22,163,74,0.4);
}

.cta-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Sidebar deal card */
.deal-sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 80px;
  box-shadow: var(--shadow-card);
}

.deal-sidebar-header { padding: 16px 16px 0; border-bottom: 1px solid var(--border); padding-bottom: 14px; }

.deal-sidebar-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.info-value { color: var(--text); font-weight: 600; text-align: right; }
.info-value.store-name { color: var(--primary); }

.sidebar-vote-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface);
}

.sidebar-vote-area .vote-label { font-size: 13px; color: var(--text-muted); text-align: center; }

.vote-big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}
.vote-big-btn:hover, .vote-big-btn.voted {
  background: var(--primary-xlight);
  border-color: var(--primary);
  color: var(--primary);
}
.vote-big-btn .fire-big { font-size: 20px; }

/* Description */
.deal-description {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.deal-description h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.deal-description .description-body { color: var(--text-muted); line-height: 1.75; font-size: 14px; }
.deal-description .description-body p { margin-bottom: 10px; }

/* Comments */
.deal-comments {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* ===========================
   PAGINATION
=========================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-xlight); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: white; }
.pagination .dots { background: none; border-color: transparent; }

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--secondary);
  color: #CBD5E1;
  padding: 56px 0 28px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .footer-logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.footer-brand .footer-logo span { color: var(--primary-light); }
.footer-desc { font-size: 14px; color: #94A3B8; line-height: 1.7; max-width: 280px; }

.footer-col-title {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94A3B8;
  margin-bottom: 14px;
}

.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 14px; color: #94A3B8; transition: var(--transition); }
.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #64748B;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: #64748B; }
.footer-bottom a:hover { color: var(--primary-light); }

/* ===========================
   EMPTY STATE
=========================== */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-dim); }
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--text-muted); margin-bottom: 8px; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .single-deal-layout { grid-template-columns: 1fr; }
  .deal-sidebar-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-search { max-width: 100%; }
  .main-nav { display: none; }
  .deals-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .deal-heading { font-size: 1.25rem; }
  .price-current { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .deals-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .deal-price { font-size: 1.2rem; }
  .container { padding: 0 12px; }
}
