/* ============================================================
   JAJ Revenda - Identidade Visual
   Cores: Laranja #FF6600 | Verde #2ecc40 | Preto #111 | Branco #fff
   ============================================================ */

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:      #FF6600;
  --orange-dark: #e05500;
  --green:       #2ecc40;
  --green-dark:  #25a832;
  --black:       #111111;
  --dark:        #1a1a1a;
  --gray-dark:   #333333;
  --gray:        #666666;
  --gray-light:  #999999;
  --border:      #e0e0e0;
  --bg-light:    #f5f5f5;
  --white:       #ffffff;
  --shadow:      0 2px 8px rgba(0,0,0,.10);
  --shadow-md:   0 4px 16px rgba(0,0,0,.14);
  --radius:      6px;
  --radius-lg:   10px;
  --transition:  .2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--black);
  background: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-dark); }

img { max-width: 100%; height: auto; display: block; }

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

/* ─── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.header-logo img {
  height: 56px;
  width: auto;
}

.header-search {
  flex: 1;
  display: flex;
  max-width: 560px;
}

.header-search input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition);
}

.header-search input:focus { border-color: var(--orange); }

.header-search button {
  padding: 10px 18px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition);
}

.header-search button:hover { background: var(--orange-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--gray-dark);
  font-size: .78rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.header-action-btn:hover { background: var(--bg-light); color: var(--orange); }

.header-action-btn svg { width: 22px; height: 22px; }

/* ─── Navbar ────────────────────────────────────────────────── */
.site-nav {
  background: var(--black);
  border-top: 3px solid var(--orange);
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 0;
  overflow-x: auto;
}

.site-nav ul li a {
  display: block;
  padding: 12px 18px;
  color: var(--white);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.site-nav ul li a:hover,
.site-nav ul li a.active {
  background: var(--orange);
  color: var(--white);
}

/* ─── Page Title Banner ─────────────────────────────────────── */
.page-banner {
  background: var(--orange);
  padding: 18px 0;
  text-align: center;
}

.page-banner h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ─── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  padding: 10px 0;
  font-size: .85rem;
  color: var(--gray);
}

.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { margin: 0 6px; }

/* ─── Área de Conteúdo Principal ────────────────────────────── */
.main-content {
  flex: 1;
  padding: 24px 0 40px;
}

.content-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ─── Sidebar de Filtros ────────────────────────────────────── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--orange);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.filter-group { margin-bottom: 20px; }

.filter-group h4 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.filter-group ul { list-style: none; }

.filter-group ul li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius);
  color: var(--gray-dark);
  font-size: .88rem;
  transition: background var(--transition), color var(--transition);
}

.filter-group ul li a:hover,
.filter-group ul li a.active {
  background: var(--bg-light);
  color: var(--orange);
}

.filter-group ul li a .count {
  background: var(--bg-light);
  color: var(--gray);
  font-size: .75rem;
  padding: 1px 6px;
  border-radius: 20px;
}

.price-range { display: flex; gap: 8px; }

.price-range input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  width: 100%;
}

.btn-filter-apply {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  text-align: center;
  margin-top: 8px;
  transition: background var(--transition);
}

.btn-filter-apply:hover { background: var(--orange-dark); }

/* ─── Botão Filtrar (mobile) ────────────────────────────────── */
.btn-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  color: var(--orange);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  margin-bottom: 16px;
}

/* ─── Grid de Produtos ──────────────────────────────────────── */
.products-area { flex: 1; min-width: 0; }

.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.products-count {
  font-size: .88rem;
  color: var(--gray);
}

.products-sort select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  background: var(--white);
  cursor: pointer;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ─── Card de Produto ───────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 2px dashed var(--green);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--green);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  z-index: 1;
}

.product-card-badge.oferta { background: var(--orange); }

.product-card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-light);
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform .3s ease;
}

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

.product-card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--orange);
  margin-top: auto;
}

.product-card-footer {
  padding: 0 12px 12px;
  display: flex;
  gap: 8px;
}

.btn-details {
  flex: 1;
  padding: 9px 10px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition);
  display: block;
}

.btn-details:hover { background: var(--green-dark); color: var(--white); }

/* ─── Página de Detalhe do Produto ──────────────────────────── */
.product-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.product-detail-img {
  border: 2px dashed var(--green);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-light);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.product-detail-info { display: flex; flex-direction: column; gap: 16px; }

.product-detail-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1.3;
}

.product-detail-category {
  font-size: .85rem;
  color: var(--gray);
}

.product-detail-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--orange);
}

.product-detail-desc {
  font-size: .95rem;
  color: var(--gray-dark);
  line-height: 1.7;
}

.btn-ml {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: #FFE600;
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  margin-top: 8px;
}

.btn-ml:hover { background: #f0d800; color: var(--black); transform: translateY(-2px); }

.btn-ml img { height: 24px; width: auto; }

.ml-note {
  font-size: .82rem;
  color: var(--gray);
  margin-top: 4px;
}

/* ─── Paginação ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--gray-dark);
  font-size: .9rem;
  font-weight: 600;
  background: var(--white);
  transition: all var(--transition);
}

.page-btn:hover { border-color: var(--orange); color: var(--orange); }
.page-btn.active { background: var(--orange); border-color: var(--orange); color: var(--white); }
.page-dots { color: var(--gray-light); padding: 0 4px; }

/* ─── Alertas ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: .9rem;
  font-weight: 500;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ─── Página de Login ───────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--black) 0%, var(--dark) 100%);
  padding: 20px;
}

.login-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 8px;
}

.login-logo img { height: 70px; margin: 0 auto; }

.login-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: .9rem;
  margin-bottom: 28px;
}

.login-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 4px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition);
  background: var(--white);
  color: var(--black);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--orange); }

.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition);
  letter-spacing: .03em;
}

.btn-primary:hover { background: var(--orange-dark); }

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: .82rem;
  color: var(--gray);
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--black);
  color: #ccc;
  padding: 40px 0 20px;
  margin-top: auto;
}

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

.footer-brand p {
  font-size: .88rem;
  line-height: 1.7;
  color: #aaa;
  margin-top: 12px;
}

.footer-logo img { height: 50px; filter: brightness(0) invert(1); }

.footer-col h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange);
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a {
  color: #aaa;
  font-size: .88rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--orange); }

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: .88rem;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  font-size: .8rem;
  color: #666;
}

/* ─── WhatsApp Flutuante ────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #25D366;
  color: var(--white);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  color: var(--white);
}

.whatsapp-float svg { width: 30px; height: 30px; }

/* ─── Sem Resultados ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: .4; }
.empty-state h3 { font-size: 1.2rem; color: var(--gray-dark); margin-bottom: 8px; }
.empty-state p { font-size: .9rem; }

/* ─── Acesso Negado ─────────────────────────────────────────── */
.access-denied {
  text-align: center;
  padding: 80px 20px;
}

.access-denied h2 { font-size: 1.8rem; color: var(--orange); margin-bottom: 12px; }
.access-denied p { color: var(--gray); margin-bottom: 20px; }

/* ─── Responsividade ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header-top { flex-wrap: wrap; }
  .header-search { order: 3; width: 100%; max-width: 100%; }

  .content-layout { flex-direction: column; }
  .sidebar { width: 100%; display: none; }
  .sidebar.open { display: block; }

  .btn-filter-toggle { display: flex; }

  .products-grid { grid-template-columns: repeat(2, 1fr); }

  .product-detail { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .page-banner h1 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-body { padding: 8px; }
  .product-card-name { font-size: .8rem; }
  .product-card-price { font-size: .95rem; }
}
