/* Header compartilhado do marketplace (renderizado por site-header.js).
   Classes com prefixo sh- para não colidir com os estilos antigos de cada página. */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap');

.site-header,.site-header *{box-sizing:border-box}
.site-header{position:sticky;top:0;z-index:50;height:68px;padding:0 max(5vw,24px);display:flex;align-items:center;gap:20px;border-bottom:1px solid var(--theme-border,#e3e5dd);background:color-mix(in srgb,var(--theme-panel,#fff) 90%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);color:var(--theme-text,#20231f);font-family:'Nunito',sans-serif;line-height:1.2}
.site-header a{color:inherit;text-decoration:none}
.site-header button{margin:0;font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
.site-header :is(a,button):focus-visible{outline:2px solid var(--theme-focus,#2daeff);outline-offset:3px}

.sh-brand{flex:0 0 auto;display:flex;align-items:center;gap:8px;font-size:21px;font-weight:800;letter-spacing:-.5px}
.sh-mark{width:30px;height:30px;display:grid;place-items:center;border-radius:9px 9px 9px 3px;background:var(--theme-accent,#087cf0);color:var(--theme-accent-ink,#fff);font-size:16px;box-shadow:0 0 18px color-mix(in srgb,var(--theme-neon,#168fff) 40%,transparent)}

.sh-nav{height:100%;min-width:0;margin-left:clamp(12px,4vw,56px);display:flex;align-items:stretch;gap:26px}
.sh-nav a{display:flex;align-items:center;padding-top:2px;border-bottom:2px solid transparent;color:var(--theme-muted,#64758b);font-size:13px;font-weight:700;white-space:nowrap;transition:color .15s,border-color .15s}
.sh-nav a:hover{color:var(--theme-text,#20231f)}
.sh-nav a[aria-current="page"]{border-color:var(--theme-accent,#087cf0);color:var(--theme-text,#20231f)}
.sh-nav .sh-back{color:var(--theme-accent,#087cf0)}

.sh-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.sh-menu{position:relative;display:flex;align-items:center}
.sh-icon,.sh-avatar,.sh-bag{border:1px solid var(--theme-border,#e3e5dd);background:var(--theme-panel,#fff);transition:border-color .18s,box-shadow .18s,color .18s}
.sh-icon:hover,.sh-avatar:hover,.sh-bag:hover{border-color:var(--theme-neon,#168fff);box-shadow:0 0 16px color-mix(in srgb,var(--theme-neon,#168fff) 24%,transparent)}
.sh-icon{position:relative;width:38px;height:38px;flex:0 0 auto;display:grid;place-items:center;padding:0;border-radius:50%;font-size:17px;line-height:1}
.sh-theme{color:var(--theme-neon,#168fff)}
.sh-bag{height:38px;padding:0 12px;display:flex;align-items:center;gap:8px;border-radius:10px;font-size:12px;font-weight:700}
.sh-badge{min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;border-radius:9px;background:var(--theme-accent,#087cf0);color:var(--theme-accent-ink,#fff);font-size:10px;font-weight:800;line-height:1}
.sh-icon .sh-badge{position:absolute;top:-4px;right:-4px}
.sh-avatar{width:38px;height:38px;flex:0 0 auto;display:grid;place-items:center;overflow:hidden;padding:0;border-radius:50%;background:var(--theme-accent-soft,#e4f2ff);font-size:15px;font-weight:800}
.sh-avatar img{width:100%;height:100%;object-fit:cover}
.sh-avatar svg{width:18px;height:18px}

/* Menus suspensos (conta e favoritos) */
.sh-dropdown{position:absolute;z-index:60;top:calc(100% + 10px);right:0;display:none;border:1px solid var(--theme-border,#e3e5dd);background:var(--theme-panel,#fff);color:var(--theme-text,#20231f);box-shadow:0 20px 50px #0004}
.sh-dropdown:before{position:absolute;right:0;bottom:100%;left:0;height:11px;content:""}
.sh-menu.is-open>.sh-dropdown{display:block;animation:sh-pop .16s ease-out}
@media(hover:hover){.sh-menu:hover>.sh-dropdown{display:block}}
.account-dropdown{width:200px;padding:7px;border-radius:12px}
.account-dropdown a,.account-dropdown button{width:100%;display:block;padding:11px 12px;border:0;border-radius:8px;background:transparent;font-size:13px;font-weight:700;text-align:left}
.account-dropdown a:hover,.account-dropdown button:hover{background:var(--theme-accent-soft,#e4f2ff)}
.account-dropdown [hidden]{display:none}
.favorites-dropdown{right:-20px;width:min(360px,calc(100vw - 24px));max-height:min(70vh,520px);overflow:auto;padding:10px;border-radius:16px}
.favorites-heading{display:flex;justify-content:space-between;align-items:center;padding:9px 10px 13px;font-size:14px}
.favorites-heading span{min-width:24px;padding:3px 7px;border-radius:20px;background:var(--theme-accent-soft,#e4f2ff);color:var(--theme-accent,#087cf0);font-size:11px;text-align:center}
.favorites-list{display:grid;gap:4px}
.favorite-row{display:flex;align-items:center;gap:6px;padding:5px;border-radius:11px;transition:background .15s}
.favorite-row:hover{background:var(--theme-panel-soft,#f6faff)}
.favorite-product{min-width:0;flex:1;display:flex;align-items:center;gap:11px;padding:4px}
.favorite-product img{width:48px;height:48px;flex:0 0 48px;object-fit:cover;border-radius:9px;background:var(--theme-panel-soft,#f6faff)}
.favorite-details{min-width:0;display:grid;gap:4px}
.favorite-details strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.favorite-details small{color:var(--theme-muted,#64758b);font-size:11px}
.favorite-remove{width:32px;height:32px;flex:0 0 32px;border:0;border-radius:9px;background:transparent;color:var(--theme-muted,#64758b);font-size:20px}
.favorite-remove:hover{background:var(--theme-accent-soft,#e4f2ff);color:var(--theme-accent,#087cf0)}
.favorites-empty{margin:4px;padding:22px 10px;border-radius:11px;background:var(--theme-panel-soft,#f6faff);color:var(--theme-muted,#64758b);font-size:12px;text-align:center}
.favorites-checkout{width:100%;min-height:42px;margin-top:10px;padding:0 12px;border:0;border-radius:10px;background:var(--theme-accent,#087cf0);color:var(--theme-accent-ink,#fff);font-size:12px;font-weight:800;transition:filter .15s,transform .15s}
.favorites-checkout:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-1px)}
.favorites-checkout:disabled{opacity:.55;cursor:not-allowed}
@keyframes sh-pop{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}

.sh-toast{position:fixed;z-index:200;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));max-width:min(360px,calc(100vw - 32px));padding:12px 15px;border:1px solid color-mix(in srgb,var(--theme-neon,#168fff) 60%,var(--theme-border,#e3e5dd));border-radius:12px;background:var(--theme-panel,#fff);color:var(--theme-text,#20231f);box-shadow:0 8px 28px #0004;font:600 13px/1.4 'Nunito',sans-serif;opacity:0;transform:translateY(7px);pointer-events:none;transition:.2s}
.sh-toast.show{opacity:1;transform:none}

@media(max-width:720px){
  .site-header{height:auto;padding:10px 16px 0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "nav nav";row-gap:7px}
  .sh-brand{grid-area:brand;font-size:20px}
  .sh-actions{grid-area:actions;gap:7px}
  .sh-nav{grid-area:nav;height:42px;margin:0;gap:22px;overflow-x:auto;scrollbar-width:none;border-top:1px solid var(--theme-border,#e3e5dd)}
  .sh-nav::-webkit-scrollbar{display:none}
  .sh-nav a{flex:0 0 auto;font-size:12px}
  .sh-icon,.sh-avatar,.sh-bag{width:40px;height:40px}
  .sh-bag{position:relative;justify-content:center;padding:0;border-radius:50%}
  .sh-bag-label{display:none}
  .sh-bag .sh-badge{position:absolute;top:-4px;right:-4px}
  /* Menus abrem na largura da tela, ancorados no header. */
  .sh-actions,.sh-menu{position:static}
  .sh-dropdown{top:calc(100% + 6px);right:12px}
  .favorites-dropdown{left:12px;width:auto;max-height:min(70dvh,520px)}
}
@media(max-width:380px){
  .site-header{padding-inline:12px}
  .sh-actions{gap:4px}
  .sh-icon,.sh-avatar,.sh-bag{width:36px;height:36px}
}
@media(prefers-reduced-motion:reduce){.site-header *,.sh-toast{animation:none!important;transition:none!important}}
