/*
* astra-overrides.css - A&C Celulares v6
 * Tema CLARO — sobrescreve Astra sem !important em excesso
 */

/* 1. Fundo e cor de texto global */
body { background-color: var(--bg) !important; color: var(--text) !important; }
#page, #content, #primary { background: transparent !important; }

/* 2. Esconder header e footer nativos do Astra */
#masthead,
.main-header-bar-wrap,
.ast-site-header-wrap { display: none !important; }

.site-footer:not(.ac-footer),
#colophon:not(.ac-footer) { display: none !important; }

/* 3. Cards de post — fundo branco */
article.post,
article.page,
.ast-article-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.entry-title a { color: var(--text); }
.entry-title a:hover { color: var(--gold-light); }
.entry-meta, .entry-meta a { color: var(--text-4); }
.entry-summary p { color: var(--text-3); }

/* 4. Esconder busca global do Astra */
.woocommerce-product-search,
form.woocommerce-product-search { display: none; }

/* Mas mostrar DENTRO do nosso painel */
.ac-search-panel .woocommerce-product-search,
.ac-search-panel form.woocommerce-product-search,
.ac-search-panel form { display: flex; gap: 0.65rem; }

/* 5. Botão submit */
.search-submit,
input[type="submit"],
button[type="submit"] {
  background: var(--gold) !important;
  color: var(--cover-text) !important;
  border: none !important;
}

/* 6. Preços WooCommerce */
.woocommerce-Price-amount { color: var(--gold-light) !important; font-weight: 600 !important; }
del .woocommerce-Price-amount { color: var(--text-4) !important; }

/* 7. Botões WooCommerce */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce .single_add_to_cart_button,
.woocommerce .add_to_cart_button {
  background: var(--gold) !important;
  color: var(--cover-text) !important;
  border: 1px solid var(--gold-dark) !important;
  font-weight: 600 !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .single_add_to_cart_button:hover {
  background: var(--gold-light) !important;
  color: var(--cover-text) !important;
}

/* 8. Inputs WooCommerce */
.woocommerce input,
.woocommerce select,
.woocommerce textarea {
  background: var(--bg-input) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

/* 9. Select2 */
.select2-container--default .select2-selection--single {
  background: var(--bg-input) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.select2-container--default .select2-results__option--highlighted {
  background: var(--gold) !important;
  color: var(--cover-text) !important;
}
.select2-dropdown {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* 10. Toasts */
.ac-toast-stack { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 99999; display: grid; gap: 0.6rem; }
.ac-toast {
  padding: 0.88rem 1.1rem;
  background: var(--surface); color: var(--text);
  border-left: 3px solid var(--gold);
  border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: 5px; box-shadow: var(--shadow-lg);
  animation: acToastIn 0.3s ease;
}
.ac-toast--success { border-left-color: #2e7d52; }
.ac-toast--error   { border-left-color: #b83232; }
@keyframes acToastIn { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:none; } }

/* 11. Woocommerce notices */
.woocommerce-message,
.woocommerce-info {
  background: rgba(var(--brand-rgb),0.10) !important;
  border-color: rgba(var(--brand-rgb),0.25) !important;
  color: var(--text-2) !important;
}
.woocommerce-error {
  background: rgba(231,76,60,0.1) !important;
  border-color: rgba(231,76,60,0.25) !important;
  color: var(--text-2) !important;
}

/* ── Fix ícones header — header ESCURO, ícones claros ── */
.ac-header__icon { color: var(--cover-text) !important; }
.ac-header__icon svg { fill: currentColor !important; }
.ac-header__icon:hover { color: var(--gold-pale) !important; }
.ac-header__icon:hover svg { fill: currentColor !important; }
.ac-header svg path { fill: currentColor !important; }

/* ═══════════════════════════════════════
   FIX DEFINITIVO — SVGs visíveis no header claro
   wp_kses_post removia fill="currentColor"
   Agora corrigido via allowlist + CSS explícito
═══════════════════════════════════════ */

/* Todos os SVGs dentro dos botões de ação do header */
.ac-header__actions .ac-header__icon svg,
.ac-header__actions button svg,
.ac-header__actions a svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
  color: currentColor !important;
  flex-shrink: 0;
}
.ac-header__actions .ac-header__icon svg path,
.ac-header__actions button svg path,
.ac-header__actions a svg path {
  fill: currentColor !important;
}

/* Hover: dourado claro */
.ac-header__actions .ac-header__icon:hover svg,
.ac-header__actions .ac-header__icon:hover svg path {
  fill: currentColor !important;
}

/* Menu toggle mobile */
.ac-header__menu-toggle svg,
.ac-header__menu-toggle svg path { fill: currentColor !important; }

/* Garante tamanho mínimo dos botões de ícone */
.ac-header__icon {
  min-width: 40px !important;
  min-height: 40px !important;
}

/* ══════════════════════════════════════
   HAMBURGUER — sempre visível em todos os dispositivos
══════════════════════════════════════ */
.ac-header__menu-toggle,
.ac-header__menu-toggle--always {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 42px !important;
  height: 42px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
}
/* 3 barrinhas brancas — forçar visibilidade */
.ac-header__menu-toggle svg {
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  fill: currentColor !important;
  color: var(--cover-text) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.ac-header__menu-toggle svg path {
  fill: currentColor !important;
  opacity: 1 !important;
}
/* Nav desktop: escondida — tudo via drawer */
.ac-header__nav { display: none !important; }

/* ══════════════════════════════════════
   CARDS — 1 COLUNA NO MOBILE/TABLET
══════════════════════════════════════ */
@media (max-width: 1023px) {
  /* Grid da loja — 2 colunas no tablet */
  .ac-shop-grid,
  .ac-shop-grid[data-grid-columns] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 767px) {
  /* Grid da loja — 1 coluna no mobile */
  .ac-shop-grid,
  .ac-shop-grid[data-grid-columns],
  .ac-shop-grid[data-grid-columns="2"],
  .ac-shop-grid[data-grid-columns="3"],
  .ac-shop-grid[data-grid-columns="4"] {
    grid-template-columns: 1fr !important;
    display: grid !important;
    width: 100% !important;
  }
  /* Card de produto — largura total garantida */
  .ac-product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  /* Container da loja sem overflow oculto */
  .ac-shop-grid-wrap,
  .ac-shop-content {
    width: 100% !important;
    overflow: visible !important;
    min-width: 0 !important;
  }
}
