/*
Theme Name: PortalBR Storefront Child (v6 • 1600px • 5 colunas • responsivo corrigido)
Template: storefront
Version: 1.6.0
Author: PortalBR.online
Description: Child theme profissional com largura total 1600px, grade 5 colunas, Hero, topbar e correções completas de responsividade (tablet e mobile).
Text Domain: portalbr
*/

:root{
  --portalbr-teal:#12c8bf; 
  --portalbr-blue:#1553a2; 
  --portalbr-blue-700:#0e3f7c;
  --portalbr-dark:#0a2743; 
  --portalbr-light:#f5faf9;
  --radius-lg:18px;
  --shadow-soft:0 10px 24px rgba(0,0,0,.08);
}

/* ====== Container geral 1600px ====== */
.col-full, .storefront-full-width-content .col-full{max-width:1600px;margin:0 auto;padding:0 24px}
.site-content{padding-top:0}
.site-header{box-shadow:0 10px 24px rgba(0,0,0,.06)}
.site-branding .site-title a{color:var(--portalbr-blue)!important}
a{color:var(--portalbr-blue)}
a:hover{color:var(--portalbr-teal)}

/* Remover título padrão quando usar Elementor */
.elementor-page .entry-header, .elementor-page .entry-title{display:none}

/* ====== Topbar ====== */
.portalbr-topbar{background:linear-gradient(90deg,var(--portalbr-dark),var(--portalbr-blue));color:#fff;font-size:14px;padding:.45rem .75rem}
.portalbr-topbar .wrap{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.portalbr-topbar a{color:#eafffb;text-decoration:none}

/* ====== Hero (home) ====== */
.portalbr-hero{background:radial-gradient(1200px 600px at 10% 10%, rgba(18,200,191,.18), transparent 60%), radial-gradient(1000px 500px at 90% 0, rgba(21,83,162,.12), transparent 60%);padding:56px 0 40px;border-bottom:1px solid #eef3f2;margin-bottom:20px}
.portalbr-hero .wrap{display:flex;align-items:center;justify-content:space-between;gap:32px;flex-wrap:wrap}
.portalbr-hero h1{margin:0 0 8px;color:var(--portalbr-dark);font-weight:800}
.portalbr-hero p{max-width:840px;color:#334155;font-size:18px;margin:0 0 16px}
.portalbr-btn{background:linear-gradient(180deg,var(--portalbr-teal),#0c9c95);color:#001b22;border:0;border-radius:14px;padding:.8rem 1.2rem;font-weight:700}
.portalbr-btn.secondary{background:transparent;border:2px solid var(--portalbr-blue);color:var(--portalbr-blue)}

/* ====== Loja sem sidebar ====== */
.archive.woocommerce #secondary,.woocommerce-page #secondary{display:none}
.archive.woocommerce .content-area, .woocommerce-shop .content-area{width:100%}

/* ====== Grade 5 colunas (desktop) com fallback responsivo ====== */
.woocommerce ul.products{
  display:grid;
  gap:18px;
}
@media (min-width: 1280px){
  .woocommerce ul.products{grid-template-columns:repeat(5, minmax(0, 1fr))}
}
@media (min-width: 640px) and (max-width:1279px){
  .woocommerce ul.products{grid-template-columns:repeat(3, minmax(0, 1fr))}
}
@media (max-width:639px){
  .woocommerce ul.products{grid-template-columns:repeat(2, minmax(0, 1fr))}
}
@media (max-width:480px){
  .woocommerce ul.products{grid-template-columns:1fr}
}
.woocommerce ul.products li.product{width:auto!important; float:none!important; margin:0!important;
  background:#fff;border:1px solid #e9f2f1;border-radius:var(--radius-lg);padding:16px;box-shadow:var(--shadow-soft)
}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-weight:700;color:#0f172a;font-size:1.08rem;min-height:48px}
.woocommerce ul.products li.product .price{color:var(--portalbr-blue);font-weight:700}
.woocommerce ul.products li.product a.button{background:var(--portalbr-teal);border-radius:12px;border:0;padding:.6rem .9rem;color:#012}
.woocommerce ul.products li.product a.button:hover{background:var(--portalbr-blue);color:#fff}
.woocommerce span.onsale{background:linear-gradient(180deg,var(--portalbr-blue),var(--portalbr-blue-700));color:#fff;border-radius:10px;min-height:auto;min-width:auto;padding:.35rem .5rem;top:12px;left:12px}

/* ====== Produto individual ====== */
.woocommerce div.product .product_title{color:var(--portalbr-dark)}
.woocommerce div.product .summary .price{color:var(--portalbr-blue);font-weight:800}
.woocommerce .quantity .qty{border-radius:10px}

/* ====== Footer ====== */
.site-footer{background:#071b2f;color:#cde7e3}
.site-footer a{color:#e3fffb}
.site-info{border-top:1px solid rgba(255,255,255,.12)}

/* ====== CORREÇÕES RESPONSIVAS ====== */
/* Imagens sempre responsivas */
img, video{max-width:100%;height:auto}

/* >=1280px: mantém 5 colunas; limita largura do logo */
@media (min-width:1280px){
  .site-branding img{max-height:70px;height:auto}
}

/* 1024px–1279px: reduz tipografia e espaçamentos do header e hero */
@media (max-width:1279px){
  .portalbr-hero .wrap{gap:24px}
  .portalbr-hero h1{font-size:34px;line-height:1.15}
  .site-header .col-full{gap:14px}
}

/* 768px–1023px: grade 3 colunas; header em duas linhas controladas */
@media (max-width:1023px){
  .site-header .col-full{display:flex;flex-wrap:wrap;gap:12px}
  .site-branding{flex:1 1 100%;text-align:center;margin-bottom:6px}
  .storefront-primary-navigation{flex:1 1 100%;display:flex;justify-content:center}
  .portalbr-hero .wrap{flex-direction:column;align-items:flex-start}
  .portalbr-hero .art{width:100%}
}

/* <=767px (mobile): 2 colunas; botões 100%; ajustes de espaçamento */
@media (max-width:767px){
  .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .woocommerce ul.products li.product{padding:12px}
  .woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:1rem;min-height:auto}
  .site-header{padding:8px 0}
  .site-branding img{max-height:56px;height:auto}
  .portalbr-hero{padding:28px 0 16px}
  .portalbr-hero p{font-size:16px;margin-bottom:12px}
  .portalbr-btn{display:block;width:100%;text-align:center;margin-bottom:8px}
  .site-footer .col-full{text-align:center}
}

/* <=480px: 1 coluna (páginas muito apertadas) */
@media (max-width:480px){
  .woocommerce ul.products{grid-template-columns:1fr;gap:12px}
}

/* Tabelas do carrinho/checkout com scroll horizontal suave */
@media (max-width:767px){
  table.shop_table, .woocommerce table.shop_table{display:block;overflow:auto;-webkit-overflow-scrolling:touch}
}

/* Side Cart/Offcanvas: garante overlay correto */
@media (max-width:1023px){
  .xoo-wsc-modal, .side-cart-open .xoo-wsc-modal{inset:0!important}
}

/* Max Mega Menu: evita quebra e garante toque amigável */
@media (max-width:1023px){
  #mega-menu-wrap-primary{width:100%}
  #mega-menu-primary > li.mega-menu-item{display:block;width:100%}
}

/* Search/carrinho no topo: alinhar à direita sem quebrar */
@media (max-width:1023px){
  .site-header-cart{margin-left:auto}
}

/* Corrige margens de widgets em Elementor para telas pequenas */
@media (max-width:767px){
  .elementor-section{padding-left:12px!important;padding-right:12px!important}
  .elementor-widget:not(.elementor-widget-spacer){margin-bottom:12px}
}
