:root{
  --red:#cc0000;
  --white:#fff;
  --ink:#111;
  --muted:#6b7280;
  --card:#f8f8f8;
}

*{box-sizing:border-box}
html,body{ margin:0; padding:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial,sans-serif; color:var(--ink); background:#fff; height:100% }
body{ display:flex; flex-direction:column; min-height:100vh }

/* ===== Topbar ===== */
.topbar{ background:var(--red); color:var(--white); position:sticky; top:0; z-index:20 }

.topbar-inner{
  display:grid; grid-template-columns:44px 1fr auto;
  align-items:center; gap:12px; padding:10px 12px;
}
.hamburger{ display:inline-grid; place-items:center; width:44px; height:44px; border:0; background:transparent; color:#D4AF37; border-radius:10px; cursor:pointer }
.brand-wrap{ display:flex; align-items:center; justify-content:center; gap:12px; min-width:0; text-decoration:none; justify-self:center }
.topbar .logo{ height:44px; width:auto; object-fit:contain; background:transparent }
.brand{ margin:0; font-size:34px; letter-spacing:2px; color:#D4AF37; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }

.header-cart{ position:static; transform:none; display:inline-flex; align-items:center; gap:8px; text-decoration:none; color:#D4AF37; font-weight:700; justify-self:end }
.header-cart .icon{ width:36px;height:36px;border-radius:999px;display:grid;place-items:center;background:rgba(0,0,0,.15);color:#D4AF37 }
.header-cart .badge{ min-width:20px;height:20px;padding:0 6px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#fff;color:#000;font-size:12px;font-weight:900;border:1px solid rgba(0,0,0,.06) }

@media (max-width:900px){
  .header-cart .label{ display:none }
}

@media (min-width:901px){
  .topbar-inner{
    position: relative;
    display: block;
    padding: 10px 16px;
    min-height: 64px;
  }
  .hamburger{ display:none; }
  .brand-wrap{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    justify-self: center;
  }
  .header-cart{
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    justify-self: end;
  }
}

@media (max-width:480px){
  .topbar .logo{ height:32px }
  .brand{ font-size:26px }
}

/* ===== Menu desktop ===== */
.menu{ background:var(--red); padding:6px 10px; border-top:1px solid rgba(255,255,255,.15) }
.menu-linha{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:4px 0 }
.menu-item{ display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:rgba(255,255,255,.1); color:#D4AF37; text-decoration:none; font-weight:700 }
.menu-item:hover{ background:rgba(255,255,255,.2) }
.menu-item.active{ background:rgba(255,255,255,.18) }
.menu-item i, .menu-item span{ font-size:14px }

@media (max-width:900px){ .menu{ display:none } }

/* ===== Drawer ===== */
.mnav{ position:fixed; inset:0; z-index:9999; display:none }
.mnav.show{ display:block }
.mnav-overlay{ position:absolute; inset:0; background:rgba(0,0,0,.45); backdrop-filter:blur(1px) }
.mnav-panel{ position:absolute; top:0; left:0; height:100%; width:min(88vw,380px); background:#fff; border-right:1px solid #eee; display:flex; flex-direction:column; overflow-y:auto }
.mnav-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #eee }
.mnav-section{ padding:10px 12px 18px }
.mnav-list{ list-style:none; margin:0; padding:0 }
.mnav-list li a{ display:flex; align-items:center; gap:12px; padding:12px 10px; border-radius:10px; color:#111; text-decoration:none }
.mnav-list li.exclu a{ background:#000; color:#D4AF37; font-weight:800 }

/* ===== Conteúdo ===== */
.page{ flex:1 0 auto; padding:18px }
.breadcrumbs{ font-size:14px; color:var(--muted); margin:6px 0 14px }
.breadcrumbs a{ color:inherit; text-decoration:none }
.grid{ display:grid; gap:14px }
.grid-folders{ grid-template-columns:repeat(auto-fill,minmax(160px,1fr)) }
.grid-images{ grid-template-columns:repeat(auto-fill,minmax(180px,1fr)) }
.card{ background:var(--card); border-radius:14px; overflow:hidden; border:1px solid #eee; box-shadow:0 1px 2px rgba(0,0,0,.04) }

/* ===== Footer ===== */
.site-footer{ margin-top:32px; border-top:1px solid rgba(255,255,255,.2); padding:20px 16px; color:var(--white); background:var(--red) }
.footer-inner{ max-width:1100px; margin:0 auto; text-align:center }

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: none; /* Controlado pelo JS */
    place-items: center;
    background: rgba(0, 0, 0, .8);
    color: #D4AF37;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
    z-index: 10001;
    transition: 0.3s;
}
.back-to-top i { font-size: 18px; }
.back-to-top:hover { transform: translateY(-3px); background: #000; }