/* Empyre - Casca nova: cabecalho (inc/header-nova.php), menu, gaveta mobile, rodape (inc/footer-nova.php) e aviso de cookies.
   Depende dos tokens e do .i/.h-btn de ds.css. Escopo .h-ui; classes h-hd*, h-nav*, h-drawer*, h-ft*, h-cookie. */

/* ================= CABECALHO ================= */
.h-ui .h-hd { position: relative; z-index: 100; background: var(--h-n-900); color: var(--h-n-0); }
.h-ui .h-hd a { color: inherit; text-decoration: none; }
.h-ui .h-hd :focus-visible { outline-color: var(--h-n-0); }
.h-ui .h-hd button { margin: 0; font: inherit; color: inherit; }

/* Barra de beneficios (fina) */
.h-ui .h-hd__bar { background: var(--h-n-100); color: var(--h-n-900); border-bottom: 1px solid var(--h-n-200); font-size: var(--h-fs-sm); }
.h-ui .h-hd__bar :focus-visible { outline-color: var(--h-n-900); }
.h-ui .h-hd__perks { display: none; align-items: center; justify-content: center; gap: var(--h-s-6); margin: 0; padding: 0; list-style: none; }
.h-ui .h-hd__perks li { display: inline-flex; align-items: center; gap: var(--h-s-2); }
.h-ui .h-hd__perks .i { color: var(--h-accent-ink); }
.h-ui .h-hd__perk-sub { display: none; color: var(--h-n-700); }
.h-ui .h-hd__perks-compact { margin: 0; padding: var(--h-s-2) 0; text-align: center; font-weight: 700; line-height: 1.4; }
@media (min-width: 768px) {
  .h-ui .h-hd__perks { display: flex; }
  .h-ui .h-hd__perks-compact { display: none; }
}
@media (min-width: 1200px) { .h-ui .h-hd__perk-sub { display: inline; } }

/* Linha principal (mobile: menu | logo | acoes; busca embaixo) */
.h-ui .h-hd__main { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "burger logo tools" "search search search"; align-items: center; gap: var(--h-s-2) var(--h-s-2); padding-block: var(--h-s-3); }
.h-ui .h-hd__burger { grid-area: burger; }
.h-ui .h-hd__logo { grid-area: logo; justify-self: center; display: inline-flex; align-items: center; min-height: 44px; }
.h-ui .h-hd__logo img { display: block; width: auto; height: 28px; }
.h-ui .h-hd__search { grid-area: search; position: relative; margin: 0; }
.h-ui .h-hd__tools { grid-area: tools; display: flex; align-items: center; margin-right: -10px; }

.h-ui .h-hd__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: var(--h-r-sm); color: inherit; cursor: pointer; }
.h-ui .h-hd__btn:hover, .h-ui .h-hd__tool:hover { color: var(--h-accent); }

/* Busca (vence input {padding:10px; width:100%} do legado) */
.h-ui .h-hd .h-hd__search input[type="search"] { display: block; width: 100%; height: 44px; margin: 0; padding: 0 52px 0 var(--h-s-4); font: 400 var(--h-fs-base)/1.5 var(--h-font-body); color: var(--h-n-900); background: var(--h-n-0);
  border: 1.5px solid transparent; border-radius: var(--h-r-sm); box-shadow: none; -webkit-appearance: none; appearance: none; }
.h-ui .h-hd .h-hd__search input[type="search"]::placeholder { color: var(--h-n-500); opacity: 1; }
.h-ui .h-hd .h-hd__search input[type="search"]:focus-visible { border-color: var(--h-accent); outline: 2px solid var(--h-n-0); outline-offset: 2px; }
.h-ui .h-hd__search input[type="search"]::-webkit-search-cancel-button { margin-right: 4px; }
.h-ui .h-hd__search > button { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--h-n-900); background: none; border: 0; border-radius: var(--h-r-sm); cursor: pointer; }
.h-ui .h-hd__search > button:hover { color: var(--h-accent-ink); }
.h-ui .h-hd__search > button:focus-visible { outline-color: var(--h-n-900); }

/* Resultados da busca em tempo real (HTML devolvido pelo control.ajax.php; o legado liga/desliga o display) */
.h-ui .h-hd .realtime_search { top: 100%; left: 0; right: 0; width: auto; margin-top: 6px; padding: var(--h-s-2); color: var(--h-n-900); background: var(--h-n-0); border-radius: var(--h-r-lg); box-shadow: var(--h-sh-2); z-index: 300; }
.h-ui .h-hd .realtime_search ul { max-height: min(60vh, 420px); margin: 0; padding: 0; overflow-y: auto; }
.h-ui .h-hd .realtime_search li a { display: flex; align-items: center; gap: var(--h-s-3); min-height: 56px; padding: var(--h-s-2); color: var(--h-n-900); border-radius: var(--h-r-sm); }
.h-ui .h-hd .realtime_search li a:hover { background: var(--h-n-100); color: var(--h-n-900); }
.h-ui .h-hd .realtime_search li a img { flex: none; width: 48px; height: 48px; margin: 0; object-fit: contain; }
.h-ui .h-hd .realtime_search li a p { margin: 0; font-size: var(--h-fs-base); font-weight: 400; line-height: 1.35; color: var(--h-n-900); }
.h-ui .h-hd .realtime_search li a p .old_price { font-size: var(--h-fs-sm); color: var(--h-n-500); }
.h-ui .h-hd .realtime_search li a p .new_price { color: var(--h-n-900); font-weight: 700; }

/* Acoes: conta, favoritos, carrinho (alvo 44x44; rotulo so em telas largas) */
.h-ui .h-hd__tool { display: inline-flex; align-items: center; justify-content: center; gap: var(--h-s-2); min-width: 44px; min-height: 44px; padding: 0 2px; color: inherit; border-radius: var(--h-r-sm); }
.h-ui .h-hd__tool[aria-current="page"] .h-hd__ico { color: var(--h-accent); }
.h-ui .h-hd__ico { position: relative; display: inline-flex; }
.h-ui .h-hd__lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; font-size: var(--h-fs-sm); font-weight: 700; }
.h-ui .h-hd__count { position: absolute; top: -6px; right: -9px; display: none; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; font-size: var(--h-fs-xs); font-weight: 700; line-height: 1; color: var(--h-n-900); background: var(--h-accent); border-radius: 999px; }
.h-ui .h-hd__count.active { display: inline-flex; }
.h-ui .h-hd__dot { position: absolute; top: -2px; right: -3px; width: 10px; height: 10px; background: var(--h-accent); border: 2px solid var(--h-n-900); border-radius: 50%; box-sizing: content-box; }

/* Navegacao desktop */
.h-ui .h-nav { display: none; background: var(--h-n-900); border-top: 1px solid #262626; }
.h-ui .h-nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 0 auto; padding-block: 0; list-style: none; }
.h-ui .h-nav__item { position: relative; display: flex; align-items: center; }
.h-ui .h-nav__link { display: flex; align-items: center; min-height: 48px; padding: 0 var(--h-s-2); font-size: var(--h-fs-base); font-weight: 700; letter-spacing: 0; border-bottom: 2px solid transparent; }
.h-ui .h-nav__item.has-sub > .h-nav__link { padding-right: 0; }
.h-ui .h-nav__link:hover, .h-ui .h-nav__item.is-open > .h-nav__link, .h-ui .h-nav__link[aria-current="page"] { border-bottom-color: var(--h-accent); }
.h-ui .h-nav__toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 48px; padding: 0; background: none; border: 0; border-radius: var(--h-r-sm); color: inherit; cursor: pointer; }
.h-ui .h-nav__toggle .i { transition: transform var(--h-t); }
.h-ui .h-nav__toggle[aria-expanded="true"] .i { transform: rotate(180deg); }
.h-ui .h-nav__toggle:hover { color: var(--h-accent); }

.h-ui .h-nav__panel { position: absolute; top: 100%; left: 0; z-index: 250; display: none; width: max-content; min-width: 280px; max-width: min(760px, 92vw); padding: var(--h-s-4) var(--h-s-5) var(--h-s-5); color: var(--h-n-900); background: var(--h-n-0); border-radius: 0 0 var(--h-r-lg) var(--h-r-lg); box-shadow: var(--h-sh-2); }
.h-ui .h-nav__panel :focus-visible { outline-color: var(--h-n-900); }
.h-ui .h-nav__item:nth-last-child(-n+3) > .h-nav__panel { left: auto; right: 0; }
.h-ui .h-nav__item.is-open > .h-nav__panel { display: block; }
/* sem JS (html sem .h-js): abre por hover/foco */
html:not(.h-js) .h-ui .h-nav__item:hover > .h-nav__panel, html:not(.h-js) .h-ui .h-nav__item:focus-within > .h-nav__panel { display: block; }
.h-ui .h-nav__all { display: inline-flex; align-items: center; gap: var(--h-s-2); min-height: 36px; font-weight: 700; color: var(--h-n-900); border-bottom: 2px solid var(--h-accent); }
.h-ui .h-nav__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--h-s-3) var(--h-s-5); margin-top: var(--h-s-3); }
.h-ui .h-nav__head { display: block; padding: 6px 0; font-weight: 700; color: var(--h-n-900); }
.h-ui .h-nav__panel ul { margin: 0; padding: 0; list-style: none; }
.h-ui .h-nav__panel li a { display: block; padding: 6px 0; color: var(--h-n-700); }
.h-ui .h-nav__head:hover, .h-ui .h-nav__panel li a:hover { color: var(--h-n-900); text-decoration: underline; text-decoration-color: var(--h-accent); text-underline-offset: 3px; }

@media (min-width: 992px) {
  .h-ui .h-hd { position: sticky; top: -36px; }
  .h-ui .h-hd.h-hd--nobar { top: 0; }
  .h-ui .h-hd__bar { height: 36px; }
  .h-ui .h-hd__bar .h-wrap { height: 100%; }
  .h-ui .h-hd__perks { height: 100%; }
  .h-ui .h-hd__main { grid-template-columns: auto minmax(280px, 1fr) auto; grid-template-areas: "logo search tools"; gap: var(--h-s-6); padding-block: var(--h-s-4); }
  .h-ui .h-hd__burger { display: none; }
  .h-ui .h-hd__logo { justify-self: start; }
  .h-ui .h-hd__logo img { height: 36px; }
  .h-ui .h-hd__tools { gap: var(--h-s-2); margin-right: 0; }
  .h-ui .h-nav { display: block; }
  .h-ui .h-drawer, .h-ui .h-drawer__overlay { display: none; }
}
@media (min-width: 1200px) {
  .h-ui .h-nav__link { padding: 0 var(--h-s-3); letter-spacing: .02em; }
  .h-ui .h-nav__item.has-sub > .h-nav__link { padding-right: 0; }
  .h-ui .h-hd__tool { padding: 0 var(--h-s-2); }
  .h-ui .h-hd__lbl { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: nowrap; }
}

/* ================= GAVETA MOBILE ================= */
html.h-lock { overflow: hidden; }
.h-ui .h-drawer__overlay { position: fixed; inset: 0; z-index: 2100; background: rgba(11, 11, 11, .55); opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s linear 200ms; }
.h-ui .h-drawer__overlay.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.h-ui .h-drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 2200; display: flex; flex-direction: column; width: min(88vw, 380px); overflow-y: auto; overscroll-behavior: contain; color: var(--h-n-900); background: var(--h-n-0);
  transform: translateX(-100%); visibility: hidden; transition: transform 240ms cubic-bezier(.2, .7, .2, 1), visibility 0s linear 240ms; }
.h-ui .h-drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.h-ui .h-drawer :focus-visible { outline-color: var(--h-n-900); }
.h-ui .h-drawer a { color: inherit; text-decoration: none; }
.h-ui .h-drawer__top { display: flex; align-items: center; justify-content: space-between; gap: var(--h-s-3); padding: var(--h-s-2) var(--h-s-2) var(--h-s-2) var(--h-s-4); border-bottom: 1px solid var(--h-n-200); }
.h-ui .h-drawer__hello { margin: 0; font-family: var(--h-font-display); font-size: var(--h-fs-lg); font-weight: 600; }
.h-ui .h-drawer__close { color: var(--h-n-900); }
.h-ui .h-drawer__list, .h-ui .h-drawer__aux { margin: 0; padding: 0; list-style: none; }
.h-ui .h-drawer__row { display: flex; align-items: stretch; border-bottom: 1px solid var(--h-n-200); }
.h-ui .h-drawer__row > a { flex: 1; display: flex; align-items: center; min-height: 52px; padding: 0 var(--h-s-4); font-size: var(--h-fs-lg); font-weight: 700; }
.h-ui .h-drawer__acc { display: inline-flex; align-items: center; justify-content: center; width: 52px; padding: 0; color: var(--h-n-900); background: none; border: 0; border-left: 1px solid var(--h-n-200); cursor: pointer; }
.h-ui .h-drawer__acc .i { transition: transform var(--h-t); }
.h-ui .h-drawer__acc[aria-expanded="true"] .i { transform: rotate(180deg); }
.h-ui .h-drawer__sub { padding: var(--h-s-2) 0; background: var(--h-n-100); border-bottom: 1px solid var(--h-n-200); }
.h-ui .h-drawer__sub[hidden] { display: none; }
.h-ui .h-drawer__sub a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--h-s-4) 0 var(--h-s-5); color: var(--h-n-700); }
.h-ui .h-drawer__sub .h-drawer__all { font-weight: 700; color: var(--h-n-900); }
.h-ui .h-drawer__sub .h-drawer__head { font-weight: 700; color: var(--h-n-900); }
.h-ui .h-drawer__sub .h-drawer__leaf { padding-left: var(--h-s-7); }
.h-ui .h-drawer__aux { margin-top: auto; padding: var(--h-s-3) 0 var(--h-s-5); }
.h-ui .h-drawer__aux a { display: flex; align-items: center; gap: var(--h-s-3); min-height: 48px; padding: 0 var(--h-s-4); font-size: var(--h-fs-base); color: var(--h-n-700); }
.h-ui .h-drawer__aux a:hover, .h-ui .h-drawer__row > a:hover { background: var(--h-n-100); }

/* ================= RODAPE ================= */
.h-ui .h-ft { color: #d9d5cd; background: var(--h-n-900); font-size: var(--h-fs-base); }
.h-ui .h-ft a { color: inherit; text-decoration: none; }
.h-ui .h-ft :focus-visible { outline-color: var(--h-n-0); }
.h-ui .h-ft h2, .h-ui .h-ft h3 { margin: 0; }

/* Newsletter (uma so; na home nova ela e a da propria home) */
.h-ui .h-ft__news { background: var(--h-n-700); border-bottom: 1px solid #3a3a3a; }
.h-ui .h-ft__news-in { display: grid; gap: var(--h-s-4); align-items: center; padding-block: var(--h-s-6); }
.h-ui .h-ft__news h2 { font: 600 var(--h-fs-h3)/1.25 var(--h-font-display); color: var(--h-n-0); }
.h-ui .h-ft__news p { margin: var(--h-s-1) 0 0; color: #e6e2db; }
.h-ui .h-ft__form { display: flex; flex-wrap: wrap; gap: var(--h-s-2); margin: 0; }
.h-ui .h-ft .h-ft__form input[type="email"] { flex: 1 1 220px; width: auto; min-height: 44px; margin: 0; padding: 0 var(--h-s-4); font: 400 var(--h-fs-base)/1.5 var(--h-font-body); color: var(--h-n-900); background: var(--h-n-0); border: 1.5px solid var(--h-n-0); border-radius: var(--h-r-sm); -webkit-appearance: none; appearance: none; }
.h-ui .h-ft .h-ft__form input[type="email"]::placeholder { color: var(--h-n-500); opacity: 1; }
.h-ui .h-ft__form .h-btn { margin: 0; }
.h-ui .h-ft__form .h-ft__note, .h-ui .h-ft__form .h-ft__msg { flex: 1 0 100%; margin: 0; font-size: var(--h-fs-sm); color: #d9d5cd; }
.h-ui .h-ft__form .h-ft__msg { min-height: 1.4em; font-weight: 700; color: var(--h-n-0); }
@media (min-width: 768px) { .h-ui .h-ft__news-in { grid-template-columns: 1fr 1fr; gap: var(--h-s-7); } }

/* Colunas */
.h-ui .h-ft__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--h-s-6) var(--h-s-5); padding-block: var(--h-s-7) var(--h-s-6); }
.h-ui .h-ft__brand { grid-column: 1 / -1; }
.h-ui .h-ft__brand img { display: block; width: auto; height: 32px; margin-bottom: var(--h-s-3); }
.h-ui .h-ft__brand p { margin: 0 0 var(--h-s-4); max-width: 42ch; }
.h-ui .h-ft__contact { grid-column: 1 / -1; }
.h-ui .h-ft__title { margin-bottom: var(--h-s-3); font: 700 var(--h-fs-sm)/1.2 var(--h-font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--h-accent); }
.h-ui .h-ft ul { margin: 0; padding: 0; list-style: none; }
.h-ui .h-ft__links a { display: inline-flex; align-items: center; min-height: 44px; }
.h-ui .h-ft__links a:hover, .h-ui .h-ft__contact a:hover { color: var(--h-n-0); text-decoration: underline; text-decoration-color: var(--h-accent); text-underline-offset: 3px; }
.h-ui .h-ft__contact li { display: flex; align-items: flex-start; gap: var(--h-s-3); padding-block: var(--h-s-2); }
.h-ui .h-ft__contact .i { margin-top: 2px; color: var(--h-accent); }
.h-ui .h-ft__contact small { display: block; font-size: var(--h-fs-sm); color: #b8b4ac; }
.h-ui .h-ft__social { display: flex; gap: var(--h-s-2); }
.h-ui .h-ft__social a { display: grid; place-items: center; width: 44px; height: 44px; color: var(--h-n-0); border: 1px solid #4a4a4a; border-radius: 999px; }
.h-ui .h-ft__social a:hover { color: var(--h-accent); border-color: var(--h-accent); }
@media (min-width: 768px) { .h-ui .h-ft__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .h-ui .h-ft__contact { grid-column: auto; } .h-ui .h-ft__links a { min-height: 36px; } }
@media (min-width: 1100px) { .h-ui .h-ft__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.4fr; gap: var(--h-s-6); } .h-ui .h-ft__brand { grid-column: auto; } .h-ui .h-ft__links a { min-height: 32px; } }

/* Pagamento e seguranca */
.h-ui .h-ft__pay { display: grid; gap: var(--h-s-4); align-items: center; padding-block: var(--h-s-5); border-top: 1px solid #2f2f2f; }
.h-ui .h-ft__pay-list { display: flex; flex-wrap: wrap; gap: var(--h-s-2) var(--h-s-5); }
.h-ui .h-ft__pay-list li { display: inline-flex; align-items: center; gap: var(--h-s-2); }
.h-ui .h-ft__pay-list .i { color: var(--h-accent); }
.h-ui .h-ft__brandsbox { width: 100%; max-width: 340px; padding: var(--h-s-2) var(--h-s-3); background: var(--h-n-0); border-radius: var(--h-r-lg); }
.h-ui .h-ft__brands { display: block; width: 100%; height: auto; aspect-ratio: 866 / 150; filter: grayscale(1); }
.h-ui .h-ft__secure { display: inline-flex; align-items: center; gap: var(--h-s-2); margin: 0; font-size: var(--h-fs-sm); }
.h-ui .h-ft__secure .i { color: var(--h-accent); }
@media (min-width: 992px) { .h-ui .h-ft__pay { grid-template-columns: auto 1fr auto; gap: var(--h-s-6); } }

/* Base legal */
.h-ui .h-ft__legal { padding-block: var(--h-s-5) var(--h-s-6); border-top: 1px solid #2f2f2f; font-size: var(--h-fs-sm); line-height: 1.6; color: #b8b4ac; }
.h-ui .h-ft__legal p { margin: 0 0 var(--h-s-2); }

/* ================= AVISO DE COOKIES (#cookiePolicy: o index.php e o scripts.js fazem fadeIn/fadeOut; botao [data-cookie]) ================= */
.h-ui .h-cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900; padding: var(--h-s-4) 0; color: var(--h-n-0); background: var(--h-n-900); border-top: 2px solid var(--h-accent); box-shadow: 0 -8px 24px rgba(11, 11, 11, .25); }
.h-ui .h-cookie__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--h-s-3) var(--h-s-5); }
.h-ui .h-cookie p { flex: 1 1 320px; margin: 0; font-size: var(--h-fs-base); line-height: 1.5; }
.h-ui .h-cookie p a { color: var(--h-n-0); font-weight: 700; text-decoration: underline; text-decoration-color: var(--h-accent); text-underline-offset: 3px; }
.h-ui .h-cookie :focus-visible { outline-color: var(--h-n-0); }

/* Pulso do contador do carrinho ao adicionar item */
.h-pulse { animation: h-pulse .5s ease; }
@keyframes h-pulse { 30% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .h-pulse { animation: none; } }
