/* ===== Util ===== */
[hidden]{ display:none !important; }


/* ===== Header base ===== */
.tnz-header{
  position: sticky;
  top: 0;
  inset-inline: 0;
  z-index: 999;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans';
}
.tnz-container{
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ===== Topbar ===== */
.tnz-topbar{
  background:#0f172a;
  color:#e5e7eb;
  font-size:14px;
  line-height:1;
}
.tnz-topbar .tnz-container{ min-height:40px; }
.tnz-topbar-menu{ display:flex; gap:16px; list-style:none; margin:0; padding:0; }
.tnz-topbar-menu a{ color:#e5e7eb; text-decoration:none; opacity:.9; }
.tnz-topbar-menu a:hover{ opacity:1; text-decoration:underline; }
.tnz-topbar-right{ display:flex; align-items:center; gap:12px; margin-left:auto; }
.tnz-cart-link{ display:inline-flex; align-items:center; gap:6px; color:#e5e7eb; text-decoration:none; font-weight:600; }
.tnz-cart-count{
  display:inline-block; min-width:20px; padding:2px 6px; border-radius:999px;
  background:#22c55e; color:#0b1220; text-align:center; font-size:12px;
}

/* ===== Linha Logo + Pesquisa ===== */
.tnz-brand-search{ background:#fed700; border-bottom:none; }
.tnz-brand-search .tnz-container{ min-height:90px; }
.tnz-brand{ flex:0 0 auto; }
.tnz-brand .site-title{ font-weight:800; font-size:24px; color:#0f172a; text-decoration:none; }
.tnz-brand img{ height:60px; width:auto; }

/* Pesquisa arredondada + lupa */
.tnz-search{ flex:1 1 auto; display:flex; justify-content:flex-end; }
form.woocommerce-product-search, form.search-form{
  width:100%; max-width:600px; display:flex; align-items:center; background:#fff;
  border-radius:999px; overflow:hidden;
}
.woocommerce-product-search input[type="search"], .search-form input[type="search"]{
  flex:1 1 auto; border:none; padding:14px 18px; font-size:16px; outline:none; background:transparent;
}
.woocommerce-product-search button, .search-form button, .woocommerce-product-search input[type="submit"]{
  border:none; background:#fff; color:#000; width:48px; height:48px; display:flex;
  align-items:center; justify-content:center; cursor:pointer; border-radius:50%; margin-right:4px;
}
.woocommerce-product-search button svg{ width:20px; height:20px; display:block; }

/* ===== Linha Categorias + Menu ===== */
.tnz-nav-row{ background:#fed700; border-bottom:none; }
.tnz-nav-row .tnz-container{
  min-height:56px; padding-top:8px; padding-bottom:0; align-items:flex-end; gap:20px;
}

/* Botão Produtos */
.tnz-cats-button{
  appearance:none; border:none; background:#fff; color:#000;
  padding:12px 18px; font-weight:600; font-size:15px;
  display:inline-flex; align-items:center; gap:8px; line-height:1; margin:0;
  border-radius:10px 10px 0 0;
}
.tnz-cats-button svg{ width:18px; height:18px; flex-shrink:0; }

/* ===== Menu principal ===== */
.tnz-primary-nav{ flex:1 1 auto; }
.tnz-primary-menu{
  display:flex; gap:28px; list-style:none; margin:0; padding:0 0 0px 0;
}
.tnz-primary-menu > li{ position:relative; }
.tnz-primary-menu > li > a{
  display:flex; align-items:center;
  padding:10px 0; font-weight:700; color:#0f172a; text-decoration:none; line-height:1.2;
  position:relative; padding-right:26px;
}


/* ===== Dropdown (submenus) ===== */
.tnz-primary-menu li ul.sub-menu{
  position:absolute; top:100%; left:0; min-width:260px; background:#fff; border-radius:4px;
  box-shadow:0 8px 24px rgba(0,0,0,.18); padding:8px 0; margin-top:0px; list-style:none;
  opacity:0; transform:translateY(8px); pointer-events:none; transition:opacity .15s ease, transform .15s ease;
  z-index:1000;
}
.tnz-primary-menu li:hover > ul.sub-menu{ opacity:1; transform:translateY(0); pointer-events:auto; }
.tnz-primary-menu li ul.sub-menu a{
  display:block; padding:10px 14px; color:#111; text-decoration:none; line-height:1.3; white-space:normal;
}
.tnz-primary-menu li ul.sub-menu a:hover{ background:#f5f5f5; }
.tnz-primary-menu li ul.sub-menu li.menu-item-has-children > ul.sub-menu{ top:0; left:100%; margin-left:8px; }

/* ===== Drawer / Offcanvas de Categorias ===== */
.tnz-overlay{
  position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
  z-index: 10000;
}
.tnz-drawer{
  position: fixed; top: 0; bottom: 0; left: 0;
  width: min(95vw, 1024px);
  background: #ffffff; border-right: 1px solid #e5e7eb;
  transform: translateX(-100%); transition: transform .25s ease;
  display: grid; grid-template-rows: auto 1fr; z-index: 10001;
}
.tnz-drawer.is-open,
.tnz-drawer[aria-hidden="false"]{ transform: translateX(0); }

.tnz-drawer-header{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:16px; border-bottom:1px solid #e5e7eb; background-color:#fed700;
}
.tnz-close{ appearance:none; border:0; background:transparent; font-size:20px; cursor:pointer; }

.tnz-drawer-content{ overflow:auto; padding:0; }
.tnz-drawer-content li{ list-style:none; }



/* ===== Responsivo base ===== */
@media (max-width:900px){
  .tnz-primary-menu{ display:none; }
  .tnz-brand-search .tnz-container{ flex-wrap:wrap; row-gap:12px; }
  .tnz-brand{ width:100%; }
  .tnz-search{ width:100%; justify-content:stretch; }
  .tnz-drawer{ width:100vw; left:0; }
}

/* ===== Drawer Categorias (3 níveis) ===== */
.tnz-cats-grid{
  display:grid;
  grid-template-columns: 300px minmax(0,1fr);
  gap:0;
  min-height:60vh;
}
.cats-col{
  overflow:auto;
  max-height:calc(100vh - 140px);
  min-width:0;
}

/* -------- Coluna esquerda (Nível 1) — estilo Worten -------- */
.cats-level1{
  background:#fff;
  border-inline-end:1px solid #e5e7eb;
}
.tnz-level1{ list-style:none; margin:0; padding:0; }
.tnz-level1 .lvl1-item{ margin:0; }
.tnz-level1 .lvl1-link{
  display:flex; align-items:center; gap:8px;
  padding:14px 16px;
  text-decoration:none;
  color:#111;
  font-weight:600;
  background:#fff;
  border-bottom:1px solid #eee;
  cursor:pointer;
}
/* hover não muda cor */
.tnz-level1 .lvl1-item:hover .lvl1-link{ background:#fff; }
/* activo = cinzento */
.tnz-level1 .lvl1-item.is-active .lvl1-link{ background:#f5f5f5; color:#111; }
/* chevron */
.tnz-level1 .lvl1-link::after{
  content:""; margin-left:auto; width:16px; height:16px; background:#b3b3b3; opacity:1;
  -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M9 6l6 6-6 6"/></svg>') no-repeat center/contain;
  mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M9 6l6 6-6 6"/></svg>') no-repeat center/contain;
}
.tnz-level1 .lvl1-item.is-active .lvl1-link::after{ background:#8f8f8f; }

/* -------- Painel da direita (N2 + N3) -------- */
.cats-panel{
  background:#fff;
  padding:18px 22px 24px;
}
.tnz-panel-empty{ color:#64748b; padding:8px 2px; }

/* Cabeçalho do painel */
.panel-head{ padding:6px 2px 14px; position:relative; }
.panel-title{
  margin:0 0 8px 0; font-weight:800; letter-spacing:.2px;
  font-size:clamp(18px,2.2vw,26px); color:#0f172a;
}
.panel-sep{ height:1px; background:#e5e7eb; }

/* Botão Voltar (mobile) */
@media (max-width:900px){
  .panel-head{ padding-left:44px; }
  .panel-head .panel-back{
    position:absolute; left:8px; top:50%; transform:translateY(-50%);
    width:28px; height:28px; border:0; background:transparent; cursor:pointer;
  }
  .panel-head .panel-back::before{
    content:""; display:block; width:20px; height:20px; background:#111827;
    -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M15.5 19l-7-7 7-7"/></svg>') no-repeat center/contain;
    mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M15.5 19l-7-7 7-7"/></svg>') no-repeat center/contain;
  }
}

/* Título do grupo (N2) */
.subgroup{ margin-block:18px 20px; }
.subgroup .subcat-title{
  margin:14px 0 12px 0; font-size:17px; font-weight:700; color:#111827;
}

/* Grelha de “cards” (N3) */
.icon-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(120px, 1fr));
  gap:18px 16px;
  list-style:none; margin:0; padding:0;
}
.cat-card a{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  text-decoration:none; color:#111827;
}
.cat-circle{
  width:108px;height:108px;border-radius:999px;
  background:#fff;box-shadow:inset 0 0 0 1px #e5e7eb;
  background-size:80%;background-repeat:no-repeat!important;background-position:center;
}
.cat-card a:hover .cat-circle{
  background-color:#fff; transform:translateY(-1px);
  box-shadow: inset 0 0 0 1px #d1d5db, 0 6px 20px rgba(2,6,23,.08);
}
.cat-label{
  margin-top:10px; font-size:13px; line-height:1.25; max-width:120px; color:#1f2937;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  text-wrap:pretty;
}

/* ===== Mobile: 2.º painel em slide ===== */
@media (max-width:900px){
  .tnz-cats-grid{ grid-template-columns:1fr; position:relative; }
  .cats-level1{ position:relative; z-index:1; }
  .cats-panel{
    position:absolute; inset:0; background:#fff;
    transform:translateX(100%); transition:transform .25s ease;
    z-index:2; padding:0;
  }
  .tnz-drawer.panel-open .cats-panel{ transform:translateX(0); }
}

/* ===== Opção A (desktop): começa estreito e EXPANDE ao abrir 2.º painel ===== */
@media (min-width:901px){
  .tnz-drawer{
    width:360px; transition:width .28s ease; background:#fff;
  }
  .tnz-cats-grid{ grid-template-columns:300px 0; }
  .tnz-drawer.panel-open{ width:min(95vw, 1024px); }
  .tnz-drawer.panel-open .tnz-cats-grid{ grid-template-columns:300px minmax(0,1fr); }

  .cats-panel{
    opacity:0; transform:translateX(12px);
    transition:opacity .2s ease, transform .28s ease;
  }
  .tnz-drawer.panel-open .cats-panel{
    opacity:1; transform:translateX(0);
  }

  /* L1 ocupa 100% da largura quando o 2.º painel está fechado */
  .tnz-drawer:not(.panel-open) .tnz-cats-grid{ grid-template-columns:1fr 0 !important; }
  .tnz-drawer:not(.panel-open) .cats-level1{ border-inline-end:none !important; }
  .tnz-drawer:not(.panel-open) .tnz-level1 .lvl1-link{ width:100%; padding-right:16px; }
}
/* N2: só título (sem link clicável) e separadores entre grupos */
.subgroup + .subgroup{
  border-top: 1px solid #e5e7eb;
  margin-top: 14px;
  padding-top: 14px;
}

/* Caso ainda venham <a> do template, neutraliza o clique e o visual de link */
.subgroup .subcat-title a{
  pointer-events: none;
  cursor: default;
  color: inherit;
  text-decoration: none;
}

/* Se usarmos <span> em vez de <a>, mantém o mesmo aspecto */
.subgroup .subcat-title .subcat-title-text{
  font: inherit;
  color: inherit;
}


.menu-brand-link{
  background-color: #666!important;
}
.menu-brand-link span{
  color: #fff;
}

/* === Tenazinha header layout adjustments (NON-DESTRUCTIVE PATCH) === */
/* Keep menus intact; only style the brand-search row + account/cart icons */

/* 1) Make cart/account dark on yellow band (original .tnz-cart-link was styled for dark topbar) */
.tnz-brand-search .tnz-cart-link{ color:#0f172a; }
.tnz-account-link{ text-decoration:none; color:#0f172a; display:inline-flex; align-items:center; gap:10px; }
.tnz-account-text{ font-weight:600; line-height:1.1; font-size:13px; white-space:nowrap; }
.tnz-user-cart{ display:flex; align-items:center; gap:18px; white-space:nowrap; }

/* 2) Worten-like stroke icons, inherit currentColor */
.tnz-account-icon, .tnz-cart-icon{ display:inline-block; vertical-align:middle; width:28px; height:28px; }

/* 3) Search form width (keeps rounded style from original) */
.tnz-brand-search .tnz-search{ width:100%; display:flex; justify-content:center; }
.tnz-brand-search form.woocommerce-product-search,
.tnz-brand-search form.search-form{ width:100%; max-width:740px; }

/* 4) Desktop/Grid layout: logo left, search centered, user-cart right */
@media (min-width: 840px){
  .tnz-brand-search .tnz-container{
    display:grid;                    /* override original flex for this row only */
    grid-template-columns:auto 1fr auto;
    align-items:center;
    column-gap:24px;
  }
  .tnz-brand{ justify-self:start; }
  .tnz-brand img{ height:60px; width:auto; }
  .tnz-brand-search .tnz-search{ justify-self:center; }
  .tnz-user-cart{ justify-self:end; }
  .tnz-account-link{ max-width:220px; overflow:hidden; text-overflow:ellipsis; }
}

/* 5) Mobile: logo never hides; search on second row full width (Worten-like) */
@media (max-width: 839.98px){
  .tnz-brand-search .tnz-container{
    display:grid;
    grid-template-columns:auto 1fr auto;
    grid-template-rows:auto auto;
    grid-template-areas:
    "brand . usercart"
    "search search search";
    row-gap:12px; column-gap:16px;
  }
  .tnz-brand{ grid-area:brand; display:block; }
  .tnz-user-cart{ grid-area:usercart; justify-self:end; }
  .tnz-brand-search .tnz-search{ grid-area:search; justify-content:stretch; }
  .tnz-brand-search form.woocommerce-product-search,
  .tnz-brand-search form.search-form{ max-width:unset; width:100%; }
}

/* 6) Small tweak: ensure header sits above nav row but under mega menus if any */
.tnz-brand-search{ position:relative; z-index:30; }
.tnz-categories, .tnz-primary-nav, .tnz-primary-menu{ position:relative; z-index:20; }
/* === Logo responsivo (proporções corretas em mobile e tablet) === */
/* Usa altura automática e limita a altura com clamp; mantém largura proporcional */
.tnz-brand img,
.tnz-brand .custom-logo,
.site-logo img{
  height:auto !important;
  width:auto !important;
  max-height:clamp(40px, 8vw, 60px) !important; /* 40px em telemóvel, até 60px no desktop */
  max-width: 100% !important;
  display:block;
}

/* Se o header ficar muito compacto em ecrãs muito pequenos, baixa um pouco a altura */
@media (max-width: 360px){
  .tnz-brand img,
  .tnz-brand .custom-logo,
  .site-logo img{
    max-height: 36px !important;
  }
}

/* === Bloco de Suporte (header) === */
.tnz-support{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#000;                 /* sobre fundo #fed700 fica perfeito */
  line-height:1.1;
}
.tnz-support-icon svg{
  display:block;
}
.tnz-support-text{
  display:flex;
  flex-direction:column;
}
.tnz-support-title{
  font-size:14px;
  font-weight:700;            /* deixa o "Suporte" a bold como no exemplo */
}
.tnz-support-sub{
  font-size:11.5px;
  opacity:.8;
}

/* hover discreto */
.tnz-support:hover{ opacity:.9; }



/* responsivo: em ecrãs pequenos mostra só o título (ou até só o ícone) */
@media (max-width: 640px){
  .tnz-support-text{ display:none!important;}
  .tnz-support-sub{ display:none!important; }
  .tnz-support-title{ font-size:13px; }
  .tnz-brand-search .tnz-container {padding-top: 5px!important; }
  .tnz-support-text, .tnz-account-text{ display:none!important;}   /* fica apenas o ícone */
}
@media (max-width: 420px){
  .tnz-support-text{ display:none!important;}   /* fica apenas o ícone */

  .tnz-brand-search .tnz-container {
    padding-top: 5px!important;
  }
}

.box-bottom-shadow{
  box-shadow: 0 8px 12px -8px rgba(0,0,0,.25);
}

/* média */
.box-bottom-shadow-md{
  box-shadow: 0 12px 24px -12px rgba(0,0,0,.28);
}

/* forte */
.box-bottom-shadow-lg{
  box-shadow: 0 18px 28px -16px rgba(0,0,0,.35);
}