/*
Theme Name: Ofertas USA
Theme URI: https://seusite.com
Author: Jefferson AI
Author URI: https://ofertasusa.com.br/
Description: Tema com suporte a dark mode, melhorias modernas de SEO e responsividade.
Version: 1.3
License: GNU General Public License v2 or later
Text Domain: ofertasusa
*/

/* RESET BÁSICO */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  color: #5f4b8b;
}

a {
  text-decoration: none;
  color: #5f4b8b;
}

a:hover {
  color: #8c6fbb;
}

/* CABEÇALHO */
header.site-header {
  background-color: #f8f8f8;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e1e1e1;
}

/* TÍTULOS DE POST */
.post-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #4B0082;
}

/* CONTEÚDO DO POST */
.post-content {
  margin-top: 1rem;
  padding-bottom: 2rem;
}

/* ESPAÇAMENTO ENTRE POSTS */
.post-card {
  background-color: #faf7ff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}
.post-card:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.post-card img {
  width: 100%;
  max-height: 200px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.8rem;
  transition: transform 0.3s ease;
}
.post-card:hover img {
  transform: scale(1.02);
}

/* IMAGEM DESTACADA NO POST ÚNICO */
.post-thumbnail img {
  width: 100%;
  max-width: 800px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.5rem auto;
  border-radius: 6px;
}

/* GRID DE POSTS */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* GRID DE POSTS (ALTERNATIVO) */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.post-grid .post {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.post-grid .post:hover {
  transform: translateY(-10px);
}
.post-grid .post .thumbnail {
  width: 100%;
  height: 250px;
  background-position: center;
  background-size: cover;
}
.post-grid .post .content {
  padding: 20px;
}
.post-grid .post .content h3 {
  color: #5f4b8b;
  font-size: 22px;
  margin-bottom: 15px;
  font-weight: bold;
}
.post-grid .post .content p {
  font-size: 16px;
  color: #777;
}
.post-grid .post .content .read-more {
  font-size: 16px;
  color: #5f4b8b;
  margin-top: 10px;
}
.post-grid .post .content .read-more:hover {
  color: #8c6fbb;
}

/* CONTAINER & HEADER FLEX */
.container, .header-flex {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* LOGO */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-area .custom-logo {
  max-height: 50px;
  height: auto;
  width: auto;
}

/* TÍTULO E DESCRIÇÃO */
.site-title-text .site-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  line-height: 1.2;
}
.site-title-text .site-description {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}

/* MENU */
.menu-toggle {
  font-size: 28px;
  cursor: pointer;
  display: none;
  padding: 10px;
}
.main-menu {
  flex: 1 1 100%;
  text-align: left;
  margin-top: 15px;
}
.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-menu li {
  display: inline-block;
  margin: 0 15px;
}
.nav-menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-menu li a:hover {
  color: #5c2d91;
}

/* HERO BANNER */
.hero-banner {
  background: url('banner-image.jpg') no-repeat center center/cover;
  color: #fff;
  padding: 100px 20px;
  text-align: center;
  background-attachment: fixed;
  position: relative;
}
.hero-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}
.hero-banner .content {
  position: relative;
  z-index: 2;
}
.hero-banner h1 {
  font-size: 48px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.hero-banner .btn {
  background-color: #5f4b8b;
  color: #fff;
  padding: 15px 30px;
  font-size: 18px;
  border-radius: 5px;
  text-transform: uppercase;
  transition: background-color 0.3s;
}
.hero-banner .btn:hover {
  background-color: #4a397f;
}

/* SIDEBAR */
.sidebar {
  display: block;
}
.sidebar .widget {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 30px;
}
.sidebar .widget h3 {
  font-size: 20px;
  color: #5f4b8b;
}
.sidebar .widget ul {
  list-style-type: none;
}
.sidebar .widget ul li {
  margin-bottom: 10px;
}

/* RODAPÉ */
footer.site-footer,
footer {
  background-color: #5f4b8b;
  color: #fff;
  padding: 40px 20px;
  font-size: 0.6rem;
  text-align: center;
}
footer a {
  color: #fff;
}
footer a:hover {
  color: #8c6fbb;
}

/* PAGINAÇÃO (✅ CSS recomendado) */
.pagination {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}
.pagination ul {
  display: flex;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.pagination li a {
  text-decoration: none;
  padding: 8px 12px;
  color: #333;
  background-color: #f0f0f0;
  border-radius: 6px;
  transition: 0.2s;
}
.pagination li a:hover {
  background-color: #333;
  color: #fff;
}
.pagination li a.active {
  background-color: #0073e6;
  color: #fff;
  font-weight: bold;
  pointer-events: none;
}

/* MOBILE RESPONSIVO */
@media screen and (max-width: 768px) {
  .header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Força o logo à esquerda e o botão à direita */
    flex-wrap: nowrap; /* Impede quebra de linha */
  }

  .menu-toggle {
    display: block;
    font-size: 24px;
    cursor: pointer;
    margin-left: 16px;
    user-select: none;
  }
  
  .main-menu.menu-visible {
    display: block;
  }
  
  .main-menu {
    display: none; /* Oculta o menu no mobile */
  }
  
  .hero-banner h1 {
    font-size: 32px;
  }
  
  .hero-banner .btn {
    font-size: 16px;
    padding: 12px 25px;
  }
}
/* Estilo principal do post de produto */
.product-post {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
  line-height: 1.6;
  background: #fff;
}

.product-post h1,
.product-post h2 {
  color: #222;
  margin-bottom: 12px;
}

.product-post h1 {
  font-size: 2rem;
}

.product-post h2 {
  font-size: 1.5rem;
  margin-top: 32px;
}

/* Imagem do produto */
.product-image {
  margin: 20px 0;
  text-align: center;
}
.product-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.product-image figcaption {
  font-size: 0.9rem;
  color: #555;
  margin-top: 8px;
}

/* Resumo com bullets */
.product-summary ul {
  padding-left: 20px;
}
.product-summary li {
  margin-bottom: 8px;
}

/* Oferta com botão */
.product-offer {
  background-color: #f9f9f9;
  padding: 20px;
  border-left: 5px solid #4caf50;
  margin: 24px 0;
}

.product-offer p {
  margin-bottom: 16px;
}

.btn.btn-primary {
  display: inline-block;
  background-color: #4caf50;
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn.btn-primary:hover {
  background-color: #45a049;
}

/* FAQ com <details> */
.faq details {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fefefe;
}

.faq summary {
  font-weight: bold;
  cursor: pointer;
}

.faq p {
  margin-top: 8px;
}

/* Produtos relacionados */
.related-products ul {
  padding-left: 20px;
}
.related-products li {
  margin-bottom: 6px;
}

/* Rodapé do post */
.post-footer {
  margin-top: 40px;
  font-size: 0.85rem;
  color: #888;
  text-align: center;
}

.laa-cta-wrapper {
  text-align: center;
  margin: 2rem 0;
}

.laa-cta-button {
  display: inline-block;
  background-color: #ff5a00;
  color: #fff;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.laa-cta-button:hover {
  background-color: #e04e00;
}

.cta-top {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.cta-bottom {
  margin-top: 2rem;
}


@media (max-width: 600px) {
  .laa-cta-button {
    font-size: 18px;
    padding: 14px 28px;
  }
.meta-info-wrapper {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}

.meta-info-wrapper .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-info-wrapper .meta-item i {
  color: #999;
}

.breadcrumbs {
  font-size: 0.60rem;
  color: #777;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .meta-info-wrapper {
    font-size: 0.6rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .breadcrumbs {
    font-size: 0.60rem;
  }
}

.share-buttons {
  margin-top: 3rem;
  padding: 1.2rem;
  background: var(--wp--preset--color--base-3, #1a1a1a);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.share-buttons h4 {
  width: 100%;
  color: #fff;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.btn-share {
  background-color: #fff;
  border: none;
  padding: 10px;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.btn-share:hover {
  transform: scale(1.1);
  box-shadow: 0 0 6px rgba(255,255,255,0.2);
}

.btn-share svg {
  width: 20px;
  height: 20px;
}

/* Área geral de comentários */
#comments {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  margin-top: 40px;
  border: 1px solid #ddd;
}

/* Lista de comentários */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.comment-body {
  padding: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.comment-author {
  font-weight: bold;
  margin-bottom: 5px;
  color: #0073aa;
}

.comment-meta {
  font-size: 0.85em;
  color: #888;
}

/* Formulário de comentário */
.comment-respond {
  margin-top: 40px;
}

.comment-respond h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

.comment-form textarea {
  min-height: 120px;
}

.comment-form input[type="submit"] {
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.comment-form input[type="submit"]:hover {
  background-color: #005f8d;
}

/* Wrapper geral para alinhar com grid principal */
.search-wrapper {
  position: absolute;
  top: 20px;
  right: 66px; /* Alinha com limite da grid de 3 colunas */
  display: flex;
  align-items: center;
  z-index: 200;
}

@media (max-width: 1199px) {
  .search-wrapper {
    right: 20px; /* Em telas menores, aproxima da borda */
  }
}

/* Botão de lupa */
#toggle-search {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #333;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

#toggle-search:hover {
  color: #0073e6;
}

/* Formulário de busca oculto inicialmente */
.search-form {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  padding: 6px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.2s ease-in-out;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  z-index: 300;
}

/* Input do campo */
.search-field {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 180px;
}

/* Botão OK */
.search-submit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #0073e6;
  padding: 4px;
  transition: color 0.3s ease;
}

.search-submit:hover {
  color: #005bb5;
}

/* Animação */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .search-wrapper {
    position: absolute;
    margin-top: 24px;
    right: 52px; /* Alinha com o menu hamburguer */
  }

  .search-form {
    right: 0;
    flex-direction: row;
  }

  .search-field {
    width: 140px;
  }
}
