/* ==========================================================
   ICONICMEN — DESIGN TOKENS
   Paleta: preto + branco/creme + prata (cores da logo)
   Tipografia: Cormorant Garamond (display) + Manrope (corpo)
   ========================================================== */
:root{
  --bg:        #0a0a0b;
  --bg-elev:   #16161a;
  --bg-elev-2: #1e1e23;
  --line:      #2c2c31;
  --cream:     #f5f4f1;
  --muted:     #9a9a9f;
  --gold:      #c8c9cd;
  --gold-dim:  #7d7e84;
  --danger:    #c0533e;
  --success:   #6a9c5f;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.6);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Manrope', sans-serif;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 15% -10%, #201f22 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #17161a 0%, transparent 55%),
    var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
button{ font-family:inherit; cursor:pointer; }
input{ font-family:inherit; }
h1,h2,h3,h4{ font-family: var(--font-display); margin:0; font-weight:600; }
a{ color:inherit; }
:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

/* ============ HEADER ============ */
.header{
  position:sticky; top:0; z-index:40;
  background: rgba(10,10,11,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.header__inner{
  max-width:1240px; margin:0 auto;
  display:flex; align-items:center; gap:24px;
  padding:16px 24px;
}
.logo{ display:flex; align-items:center; gap:12px; flex-shrink:0; }
.logo__mark{
  width:40px; height:40px; border-radius:50%;
  display:grid; place-items:center;
  border:1px solid var(--gold-dim);
  font-family: var(--font-display); font-weight:700; font-size:16px;
  color: var(--gold);
  object-fit: contain;
}
.logo__text{ display:flex; flex-direction:column; line-height:1.1; }
.logo__name{ font-family:var(--font-display); font-size:20px; letter-spacing:.04em; font-weight:600; white-space:nowrap; }
.logo__name em{ font-style:normal; color:var(--gold); }
.logo__tag{ font-size:10.5px; color:var(--muted); letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; }

.searchbar{
  flex:1; display:flex; align-items:center; gap:10px;
  background: var(--bg-elev); border:1px solid var(--line);
  border-radius: 999px; padding:10px 18px; color:var(--muted);
  max-width:520px;
}
.searchbar input{
  background:none; border:none; color:var(--cream); font-size:14px;
  width:100%; min-width:0;
}
.searchbar input:focus{ outline:none; }
.searchbar input::placeholder{ color:var(--muted); }

.header__actions{ display:flex; align-items:center; gap:10px; flex-shrink:0; margin-left:auto; }
.iconbtn{
  display:flex; align-items:center; gap:8px;
  background: var(--bg-elev); border:1px solid var(--line);
  color:var(--cream); border-radius:999px; padding:9px 16px;
  font-size:13px; font-weight:600; position:relative;
  transition: border-color .15s ease, transform .15s ease;
}
.iconbtn:hover{ border-color: var(--gold-dim); transform: translateY(-1px); }
.iconbtn--cart{ padding:9px 12px; }
.cart-count{
  position:absolute; top:-6px; right:-6px;
  background: var(--gold); color:#141215;
  font-size:10.5px; font-weight:800;
  min-width:18px; height:18px; border-radius:999px;
  display:grid; place-items:center; padding:0 4px;
}

.subnav{ border-top:1px solid var(--line); background: rgba(10,10,11,.6); }
.subnav__inner{
  max-width:1240px; margin:0 auto; padding:10px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.segmented{
  display:inline-flex; background: var(--bg-elev); border:1px solid var(--line);
  border-radius:999px; padding:3px;
}
.segmented__btn{
  border:none; background:none; color:var(--muted);
  font-size:12.5px; font-weight:700; letter-spacing:.03em;
  padding:7px 16px; border-radius:999px; transition: all .15s ease;
}
.segmented__btn.is-active{ background: var(--gold); color:#141215; }
.linklike{
  background:none; border:none; color: var(--gold); font-size:12.5px;
  font-weight:600; letter-spacing:.02em; white-space:nowrap;
}
.linklike:hover{ text-decoration:underline; }
.linklike--muted{ color: var(--muted); }

/* ============ PROMO BAR ============ */
.promobar{
  background: linear-gradient(90deg, #1e1e22, #17171a);
  border-bottom:1px solid var(--gold-dim);
  color: var(--cream);
  text-align:center;
  font-size:13px; font-weight:700; letter-spacing:.02em;
  padding:10px 16px;
}
.promobar[hidden]{ display:none; }

/* ============ HERO ============ */
.hero{ padding: 64px 24px 32px; text-align:center; }
.hero__inner{ max-width:760px; margin:0 auto; }
.hero__eyebrow{
  color:var(--gold); font-size:12px; letter-spacing:.14em; text-transform:uppercase;
  font-weight:700; margin:0 0 14px;
}
.hero__title{
  font-size: clamp(28px, 7vw, 52px); line-height:1.12; margin:0 0 16px;
}
.hero__title em{ font-style:normal; color: var(--gold); }
.hero__sub{ color: var(--muted); font-size:16px; line-height:1.6; max-width:600px; margin:0 auto; }

/* ============ FILTERS ============ */
.filters{ padding: 8px 24px 28px; }
.filters__inner{ max-width:1240px; margin:0 auto; }
.filters__label{
  display:block; font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); font-weight:700; margin-bottom:12px;
}
.chips{
  display:flex; flex-wrap:nowrap; gap:9px;
  overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none;
  padding-bottom:2px;
}
.chips::-webkit-scrollbar{ display:none; }
.chip{
  display:inline-flex; align-items:center; gap:8px; flex-shrink:0;
  border:1px solid var(--line); background: var(--bg-elev);
  color: var(--cream); border-radius:999px; padding:8px 15px 8px 10px;
  font-size:13px; font-weight:600; transition: all .15s ease;
}
.chip__dot{ width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.chip:hover{ border-color: var(--gold-dim); }
.chip.is-active{ border-color: var(--gold); background: #1c1c20; color: var(--gold); }

/* ============ CATALOG GRID ============ */
.catalog{ padding: 8px 24px 80px; }
.catalog__inner{
  max-width:1240px; margin:0 auto;
  display:grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap:22px;
}
.catalog__empty{ text-align:center; color:var(--muted); padding:60px 0; }

.card{
  background: var(--bg-elev); border:1px solid var(--line);
  border-radius: var(--radius); overflow:hidden;
  display:flex; flex-direction:column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover{ transform: translateY(-4px); border-color: var(--gold-dim); box-shadow: var(--shadow); }
.card__img{
  aspect-ratio: 200/220; background:#141416; position:relative; overflow:hidden;
}
.card__img img{ width:100%; height:100%; object-fit:cover; }
.card__notes{
  position:absolute; top:10px; left:10px; display:flex; gap:5px;
}
.card__notedot{ width:10px; height:10px; border-radius:50%; border:1.5px solid #0a0a0baa; }
.card__body{ padding:16px 16px 18px; display:flex; flex-direction:column; gap:6px; flex:1; }
.card__name{ font-family: var(--font-display); font-size:21px; font-weight:700; }
.card__insp{ font-size:12px; color:var(--muted); line-height:1.4; }
.card__insp b{ color:#cfcfcf; font-weight:700; }
.card__tags{ display:flex; gap:6px; flex-wrap:wrap; margin-top:2px; }
.card__tag{
  font-size:10px; letter-spacing:.03em; text-transform:uppercase; font-weight:700;
  padding:3px 8px; border-radius:999px; color:#141215;
}
.card__sizes{ display:flex; gap:6px; margin-top:8px; }
.sizebtn{
  flex:1; border:1px solid var(--line); background: var(--bg-elev-2); color:var(--muted);
  border-radius:8px; padding:6px 4px; font-size:11.5px; font-weight:700; transition: all .15s ease;
}
.sizebtn.is-active{ border-color: var(--gold); background:#1c1c20; color: var(--gold); }
.card__foot{
  margin-top:auto; padding-top:12px; display:flex; align-items:center; justify-content:space-between;
}
.card__price{ font-family: var(--font-display); font-size:19px; font-weight:700; color: var(--gold); }
.card__size{ font-size:11px; color:var(--muted); }
.card__add{
  background: var(--gold); color:#141215; border:none; border-radius:999px;
  width:38px; height:38px; font-size:18px; font-weight:800;
  display:grid; place-items:center; transition: transform .15s ease;
}
.card__add:hover{ transform: scale(1.08); }

/* ============ BUTTONS / FORMS ============ */
.btn{
  border:none; border-radius:999px; padding:13px 22px; font-weight:700; font-size:14px;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn--block{ width:100%; }
.btn--primary{ background: var(--gold); color:#141215; }
.btn--secondary{ background: var(--bg-elev-2); color: var(--cream); border:1px solid var(--line); }
.btn--ghost{ background:none; color: var(--danger); border:1px solid transparent; }
.btn--google{
  width:100%; display:flex; align-items:center; justify-content:center; gap:10px;
  background:#fff; color:#1f1f1f; border-radius:999px; padding:12px; font-weight:700; font-size:14px; border:none;
}
.divider{ display:flex; align-items:center; gap:12px; color:var(--muted); font-size:12px; margin:18px 0; }
.divider::before,.divider::after{ content:""; flex:1; height:1px; background: var(--line); }

.tabs{ display:flex; background: var(--bg-elev-2); border-radius:999px; padding:3px; margin-bottom:18px; }
.tabs__btn{ flex:1; background:none; border:none; color:var(--muted); font-weight:700; font-size:13px; padding:9px; border-radius:999px; }
.tabs__btn.is-active{ background: var(--gold); color:#141215; }

.form{ display:flex; flex-direction:column; gap:14px; }
.form label{ display:flex; flex-direction:column; gap:6px; font-size:12.5px; color: var(--muted); font-weight:600; }
.form input{
  background: var(--bg-elev-2); border:1px solid var(--line); border-radius: var(--radius-sm);
  padding:11px 13px; color: var(--cream); font-size:16px; /* 16px evita zoom automático no iOS */
}
.form input:focus{ outline:none; border-color: var(--gold); }
.form__error{ color: var(--danger); font-size:12.5px; margin:-6px 0 0; min-height:1px; }

.profile-card{ display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.profile-card__avatar{
  width:46px; height:46px; border-radius:50%; background: var(--gold); color:#141215;
  display:grid; place-items:center; font-weight:800; font-family:var(--font-display); font-size:18px; flex-shrink:0;
}
.profile-card div strong{ display:block; font-size:15px; }
.profile-card div span{ display:block; font-size:12px; color:var(--muted); }
#authLoggedIn .form{ margin-bottom:14px; }

/* ============ DRAWERS / OVERLAY ============ */
.overlay{
  position:fixed; inset:0; background: rgba(4,4,5,.6); backdrop-filter: blur(2px);
  opacity:0; pointer-events:none; transition: opacity .2s ease; z-index:50;
}
.overlay.is-open{ opacity:1; pointer-events:auto; }

.drawer{
  position:fixed; top:0; right:0; height:100%; width:min(420px, 92vw);
  background: var(--bg-elev); border-left:1px solid var(--line);
  transform: translateX(100%); transition: transform .28s ease;
  z-index:60; display:flex; flex-direction:column;
}
.drawer.is-open{ transform: translateX(0); }
.drawer__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 22px; border-bottom:1px solid var(--line);
}
.drawer__head h3{ font-size:22px; }
.drawer__close{ background:none; border:none; color: var(--muted); font-size:16px; }
.drawer__close:hover{ color: var(--cream); }
.drawer__body{ padding:22px; overflow-y:auto; flex:1; }
.drawer__foot{ padding:20px 22px; border-top:1px solid var(--line); }
.drawer__total{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; font-size:15px; }
.drawer__total strong{ font-family: var(--font-display); font-size:22px; color: var(--gold); }

.cart-item{ display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--line); }
.cart-item img{ width:56px; height:56px; border-radius:10px; object-fit:cover; flex-shrink:0; background:#141416; }
.cart-item__info{ flex:1; min-width:0; }
.cart-item__name{ font-weight:700; font-size:14px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.cart-item__sizepill{
  font-size:10px; font-weight:700; color: var(--gold); border:1px solid var(--gold-dim);
  border-radius:999px; padding:2px 8px;
}
.cart-item__insp{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.cart-item__row{ display:flex; align-items:center; justify-content:space-between; margin-top:8px; flex-wrap:wrap; gap:8px; }
.qty{ display:flex; align-items:center; gap:8px; }
.qty button{
  width:24px; height:24px; border-radius:50%; border:1px solid var(--line); background: var(--bg-elev-2);
  color:var(--cream); font-weight:700; display:grid; place-items:center;
}
.cart-item__remove{ background:none; border:none; color: var(--danger); font-size:11.5px; font-weight:600; }
.cart-empty{ text-align:center; color: var(--muted); padding:40px 0; font-size:14px; }
.cart-gift{
  margin-top:16px; background:#18181b; border:1px solid var(--gold-dim); color: var(--cream);
  border-radius: var(--radius-sm); padding:12px 14px; font-size:12.5px; font-weight:600; line-height:1.5;
}

/* ============ REF TABLE MODAL / CHECKOUT MODAL / ADMIN MODAL ============ */
.refmodal, .checkoutmodal, .adminmodal{
  position:fixed; top:50%; left:50%; transform: translate(-50%,-50%) scale(.97);
  background: var(--bg-elev); border:1px solid var(--line); border-radius: var(--radius);
  width:min(720px, 92vw); max-height:86vh; z-index:70;
  opacity:0; pointer-events:none; transition: opacity .2s ease, transform .2s ease;
}
.refmodal.is-open, .checkoutmodal.is-open, .adminmodal.is-open{ opacity:1; pointer-events:auto; transform: translate(-50%,-50%) scale(1); }
.refmodal__body{ padding:26px; overflow-y:auto; max-height:86vh; }
.refmodal__body h3{ margin:22px 0 12px; }
.refmodal__body h3:first-child{ margin-top:0; }
.refmodal__body img{ border-radius:12px; border:1px solid var(--line); }
.refmodal__close{ position:absolute; top:16px; right:16px; }
.checkoutmodal{ padding:26px; }
.checkoutmodal h3{ margin-bottom:6px; }
.checkoutmodal .drawer__close{ position:absolute; top:16px; right:16px; }
.muted{ color:var(--muted); font-size:13px; margin:0 0 20px; }

/* ============ ADMIN MODAL ============ */
.adminmodal{ padding:28px; width:min(560px, 92vw); overflow-y:auto; }
.adminmodal .drawer__close{ position:absolute; top:16px; right:16px; }
.adminmodal h3{ margin-bottom:6px; }
.admin-hint{ margin-top:16px; font-size:11.5px; }
.admin-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.admin-section{
  border-top:1px solid var(--line); margin-top:20px; padding-top:18px;
}
.admin-section h4{ font-size:16px; margin-bottom:12px; color: var(--gold); }
.admin-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin-bottom:8px; }
.admin-grid label{ display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); font-weight:600; }
.admin-grid input{
  background: var(--bg-elev-2); border:1px solid var(--line); border-radius: var(--radius-sm);
  padding:10px 12px; color: var(--cream); font-size:14px;
}
.admin-check{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--cream); margin-bottom:10px; }
.admin-check input{ width:16px; height:16px; }
.admin-saved{ color: var(--success); font-size:12.5px; text-align:center; margin:10px 0 0; min-height:1px; }
#adminPanel .btn{ margin-top:6px; }

@media (max-width: 560px){
  .admin-grid{ grid-template-columns: 1fr; }
}

/* ============ TOAST ============ */
.toast{
  position:fixed; bottom:26px; left:50%; transform: translateX(-50%) translateY(20px);
  background: var(--gold); color:#141215; font-weight:700; font-size:13.5px;
  padding:12px 20px; border-radius:999px; z-index:80;
  opacity:0; pointer-events:none; transition: all .25s ease;
  max-width:92vw; text-align:center;
}
.toast.is-open{ opacity:1; transform: translateX(-50%) translateY(0); }

.footer{ text-align:center; color: var(--muted); font-size:12px; padding:30px 20px 50px; display:flex; flex-direction:column; gap:8px; align-items:center; }

/* ==========================================================
   RESPONSIVO — TABLET (≤ 780px)
   ========================================================== */
@media (max-width: 780px){
  .header__inner{
    flex-wrap:wrap;
    padding:12px 16px;
    row-gap:12px;
  }
  .logo__tag{ display:none; }
  .searchbar{ order:3; max-width:none; width:100%; }
  .header__actions{ order:2; margin-left:auto; }
  .subnav__inner{ flex-direction:column; align-items:flex-start; gap:10px; }
  .hero{ padding:44px 20px 24px; }
  .catalog__inner{ grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap:14px; }
  .card__name{ font-size:18px; }
  .card__price{ font-size:17px; }
}

/* ==========================================================
   RESPONSIVO — CELULAR (≤ 480px)
   ========================================================== */
@media (max-width: 480px){
  .header__inner{ padding:12px 14px; gap:10px; }
  .logo__mark{ width:32px; height:32px; }
  .logo__name{ font-size:17px; }
  .iconbtn{ padding:8px 12px; font-size:12px; }
  .iconbtn span:not(.cart-count){ display:none; } /* mostra só o ícone em telas bem pequenas */
  .searchbar{ padding:9px 14px; }
  .hero{ padding:34px 16px 20px; }
  .hero__sub{ font-size:14px; }
  .filters{ padding:6px 16px 20px; }
  .catalog{ padding:6px 16px 60px; }
  .catalog__inner{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap:12px; }
  .card__body{ padding:12px 12px 14px; }
  .card__name{ font-size:16.5px; }
  .card__insp{ font-size:11px; }
  .drawer__body{ padding:16px; }
  .drawer__foot{ padding:16px; }
  .refmodal__body, .checkoutmodal, .adminmodal{ padding:18px; }
  .admin-hint{ font-size:11px; }
}