/* =============================================================
   ORAH CULTURE — design tokens + base
   ============================================================= */

:root {
  /* brand palette */
  --orah-blue-900: #051538;
  --orah-blue-800: #0A2467;
  --orah-blue-700: #0E3FA8;
  --orah-blue-600: #1853C8;
  --orah-blue-500: #2E6BE6;
  --orah-blue-400: #5C8EF0;
  --orah-blue-200: #B7CEF7;
  --orah-blue-100: #DDE7F9;

  --orah-cream-50: #F6F1E6;
  --orah-cream-100: #EFE7D4;
  --orah-cream-200: #E3D8BF;

  --orah-fire-700: #B33419;
  --orah-fire-500: #E84B1E;
  --orah-fire-400: #F26F2C;
  --orah-fire-200: #F6B339;

  --orah-ink: #0A1430;
  --orah-ink-60: rgba(10,20,48,0.6);
  --orah-ink-30: rgba(10,20,48,0.3);
  --orah-ink-12: rgba(10,20,48,0.12);

  /* applied (default light) */
  --bg: var(--orah-cream-50);
  --bg-alt: var(--orah-cream-100);
  --bg-card: #FBF7EE;
  --ink: var(--orah-ink);
  --ink-soft: var(--orah-ink-60);
  --ink-line: var(--orah-ink-12);
  --brand: var(--orah-blue-700);
  --brand-deep: var(--orah-blue-800);
  --on-brand: var(--orah-cream-50);
  --accent: var(--orah-fire-500);
  --accent-warm: var(--orah-fire-200);

  /* type */
  --f-display: "Anton", "Archivo Black", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-hand: "Caveat", cursive;
  --f-script: "Reenie Beanie", cursive;

  /* density */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --maxw: 1280px;
}

[data-theme="dark"] {
  --bg: #061738;
  --bg-alt: #0A2055;
  --bg-card: #0E2A66;
  --ink: var(--orah-cream-50);
  --ink-soft: rgba(246,241,230,0.66);
  --ink-line: rgba(246,241,230,0.14);
  --brand: var(--orah-blue-200);
  --brand-deep: var(--orah-cream-50);
  --on-brand: var(--orah-blue-900);
  --accent: var(--orah-fire-400);
  --accent-warm: var(--orah-fire-200);
}

[data-density="compact"] {
  --space-5: 16px; --space-6: 24px; --space-7: 36px; --space-8: 48px; --space-9: 72px;
}
[data-density="airy"] {
  --space-5: 32px; --space-6: 48px; --space-7: 72px; --space-8: 96px; --space-9: 140px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100vw; position: relative; }
#root { overflow-x: hidden; max-width: 100vw; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
  line-height: 1.5;
  letter-spacing: -0.005em;
}

/* paper texture overlay (toggleable) */
[data-texture="paper"] body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.04  0 0 0 0 0.08  0 0 0 0 0.19  0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.35;
}
[data-theme="dark"][data-texture="paper"] body::before {
  mix-blend-mode: screen;
  opacity: 0.12;
}

/* utility */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-5); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 24px; } .gap-6 { gap: 32px; } .gap-7 { gap: 48px; }
.fill { flex: 1; }
.muted { color: var(--ink-soft); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.hand { font-family: var(--f-hand); font-weight: 700; }

/* type */
.display, h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.92;
  margin: 0;
  text-transform: uppercase;
}
.t-huge { font-size: clamp(56px, 11cqw, 132px); }
.t-xl { font-size: clamp(40px, 7cqw, 84px); }
.t-lg { font-size: clamp(32px, 4.5cqw, 56px); }
.t-md { font-size: clamp(24px, 3cqw, 40px); }
.t-sm { font-size: 22px; }
.t-eyebrow { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }

/* button */
.btn {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  transition: transform .08s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.brand:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn.fire { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.sm { padding: 8px 14px; font-size: 12px; }
.btn.lg { padding: 18px 28px; font-size: 15px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .35; pointer-events: none; }

/* link */
.link {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  padding-bottom: 1px;
  cursor: pointer;
}
.link:hover { background-size: 100% 2px; }

/* card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

/* paper tape (sticker) */
.tape {
  position: absolute;
  padding: 6px 14px;
  background: rgba(246,179,57,0.78);
  color: var(--orah-ink);
  font-family: var(--f-hand);
  font-size: 20px;
  transform: rotate(-3deg);
  box-shadow: 2px 4px 10px rgba(0,0,0,0.08);
  z-index: 3;
}

/* torn paper edge — for editorial vibe */
.torn {
  position: relative;
  background: var(--bg-card);
  --tear: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='12' preserveAspectRatio='none' viewBox='0 0 40 12'><path d='M0 0 L4 6 L8 2 L12 8 L16 1 L20 6 L24 3 L28 9 L32 2 L36 7 L40 4 L40 12 L0 12 Z' fill='%23ffffff'/></svg>");
}
.torn::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -10px;
  height: 12px;
  background: var(--bg-card);
  mask-image: var(--tear);
  -webkit-mask-image: var(--tear);
  mask-size: 40px 12px;
  -webkit-mask-size: 40px 12px;
  mask-repeat: repeat-x;
  -webkit-mask-repeat: repeat-x;
}

/* pin */
.pin {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--orah-fire-400), var(--orah-fire-700));
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  display: inline-block;
}

/* divider */
.hr {
  height: 1px;
  background: var(--ink-line);
  margin: var(--space-6) 0;
}

/* form */
input, textarea, select {
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color .15s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); }
label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink-line);
  background: var(--bg-card);
}
.badge.fire { background: var(--accent); border-color: var(--accent); color: #fff; }
.badge.brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* product card variants */
.product-card { position: relative; cursor: pointer; }
.product-card .img {
  aspect-ratio: 4/5;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink-line);
}
[data-cardstyle="label"] .product-card .img {
  border-radius: 4px;
  background: var(--orah-blue-700);
  color: var(--orah-cream-50);
}
.product-card .meta { margin-top: 12px; }
.product-card .price { font-weight: 700; }

/* scroll lock for drawers */
body.no-scroll { overflow: hidden; }

/* hostbar (above everything) */
.hostbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: #0A0F1E;
  color: #C7CFE2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hostbar .hb-group { display: flex; gap: 4px; align-items: center; }
.hostbar button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: inherit;
  font: inherit;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.hostbar button.active { background: var(--orah-cream-50); color: var(--orah-blue-900); border-color: var(--orah-cream-50); }
.hostbar .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--orah-fire-400);
  box-shadow: 0 0 12px var(--orah-fire-400);
}

@media (max-width: 767px) {
  /* device real e mobile: hostbar enxuta (so intro + tema), sem moldura, sem padding-top */
  .hostbar {
    padding: 0 12px; gap: 6px; font-size: 11px; justify-content: flex-end;
    max-width: 100vw; overflow: hidden;
  }
  .hostbar .hb-brand-group { display: none; }
  .hostbar .hb-viewport-only { display: none; }
  .hostbar button { padding: 6px 10px; letter-spacing: 0.05em; }
  .viewport-stage { padding-top: 44px; background: var(--bg); overflow-x: hidden; max-width: 100vw; }
  .viewport-frame,
  .viewport-frame[data-vp="mobile"],
  .viewport-frame[data-vp="desktop"] {
    margin: 0;
    max-width: 100vw !important;
    width: 100%;
    height: auto;
    min-height: calc(100vh - 44px);
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: visible;
    container-type: normal;
  }
}

/* viewport sandbox (the "preview" area) */
.viewport-stage {
  padding-top: 44px;
  min-height: 100vh;
  background: var(--bg);
}
.viewport-frame {
  margin: 24px auto;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.05);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  transition: max-width .3s cubic-bezier(.22,1,.36,1);
  container-type: inline-size;
  container-name: frame;
}
.viewport-frame[data-vp="desktop"] {
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: calc(100vh - 44px);
}
.viewport-frame[data-vp="mobile"]  {
  max-width: 390px;
  border-radius: 32px;
  height: min(844px, calc(100vh - 100px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-line) transparent;
}
.viewport-frame[data-vp="mobile"]::-webkit-scrollbar { width: 6px; }
.viewport-frame[data-vp="mobile"]::-webkit-scrollbar-thumb { background: var(--ink-line); border-radius: 999px; }

/* mobile-only / desktop-only inside the frame: based on data-vp on .viewport-frame */
.viewport-frame[data-vp="desktop"] .only-mobile { display: none !important; }
.viewport-frame[data-vp="mobile"] .only-desktop { display: none !important; }

/* container reset because viewport-frame already limits width */
.viewport-frame .wrap { max-width: 100%; padding: 0 var(--space-5); }
.viewport-frame[data-vp="mobile"] .wrap { padding: 0 16px; }

/* HEADER ===================================================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--ink-line);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  gap: 16px;
}
.viewport-frame[data-vp="mobile"] .site-header .inner { height: 56px; }
.site-header .logo {
  font-family: var(--f-display);
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--brand);
  text-decoration: none;
  line-height: 1;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.site-header .logo .ico { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--brand); display: grid; place-items: center; border: 2px solid var(--bg-card); }
.site-header .logo .ico img { width: 100%; height: 100%; object-fit: cover; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
.site-header nav a:hover { color: var(--brand); }
.site-header .actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink);
  position: relative;
}
.icon-btn:hover { background: var(--bg-alt); }
.icon-btn .count {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  display: grid; place-items: center;
  padding: 0 4px;
}

/* desktop accordion mega menu */
.mega {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--bg);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  padding: var(--space-6) 0;
  display: none;
  z-index: 30;
}
.mega.open { display: block; }
.mega-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.mega-grid h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; font-weight: 600; }
.mega-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mega-grid li { font-family: var(--f-display); font-size: 22px; cursor: pointer; text-transform: uppercase; }
.mega-grid li:hover { color: var(--brand); }
.mega-feature {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

/* mobile drawer */
.drawer {
  position: fixed;
  top: 0; bottom: 0; right: 0;
  width: min(420px, 100%);
  background: var(--bg);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--ink-line);
}
.drawer.open { transform: translateX(0); }
.drawer-bg {
  position: fixed; inset: 0;
  background: rgba(5,21,56,0.45);
  backdrop-filter: blur(2px);
  z-index: 150;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ink-line);
}

/* mobile menu */
.mob-menu { padding: 12px 0; overflow-y: auto; flex: 1; }
.mob-menu .item {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--f-display);
  font-size: 28px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.mob-menu .sub {
  background: var(--bg-alt);
  padding: 10px 20px 14px;
  display: none;
}
.mob-menu .item.open + .sub { display: block; }
.mob-menu .sub a {
  display: block; padding: 8px 0;
  font-family: var(--f-body);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

/* FOOTER ===================================================== */
.site-footer {
  background: var(--brand);
  color: var(--on-brand);
  padding: var(--space-8) 0 var(--space-5);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .site-footer { background: var(--orah-blue-900); }
.site-footer .wordmark {
  font-family: var(--f-display);
  font-size: clamp(80px, 17cqw, 200px);
  line-height: 0.85;
  letter-spacing: -0.02em;
  margin: 32px 0 -10px;
  opacity: 0.97;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer .links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.site-footer .links h5 { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 12px; opacity: 0.7; }
.site-footer .links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.site-footer .meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 11px; opacity: 0.7; margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); }

.viewport-frame[data-vp="mobile"] .site-footer .links { grid-template-columns: 1fr 1fr; }

/* INTRO ANIMATION =========================================== */
.intro-screen {
  position: fixed;
  inset: 44px 0 0 0;
  background: var(--orah-blue-700);
  color: var(--orah-cream-50);
  z-index: 95;
  display: grid; place-items: center;
  overflow: hidden;
}
.intro-screen .intro-stack {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(20px, 4vh, 48px);
  z-index: 2;
}
.intro-screen .ring {
  width: clamp(160px, 24vmin, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orah-blue-700);
  border: 3px solid var(--orah-cream-50);
  display: grid; place-items: center;
  position: relative;
  animation: intro-pop 1.2s cubic-bezier(.22,1,.36,1) both;
  overflow: hidden;
}
.intro-screen .ring img { width: 100%; height: 100%; object-fit: cover; }
.intro-screen .tag {
  font-size: clamp(16px, 2.2vmin, 22px); font-weight: 500;
  opacity: 0;
  animation: intro-fade .6s .9s ease both;
  letter-spacing: 0.01em;
  text-align: center;
}
.intro-screen .tag b { font-weight: 800; }
.intro-screen .wordmark-line {
  font-family: var(--f-display);
  font-size: clamp(48px, 11vmin, 132px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  animation: intro-rise .8s 1.5s cubic-bezier(.22,1,.36,1) both;
}
.intro-screen .wordmark-line .culture {
  display: block;
  font-size: 0.22em;
  letter-spacing: 0.42em;
  margin-top: 12px;
  color: var(--orah-cream-50);
  opacity: 0.75;
}
.intro-screen .ripple {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(246,241,230,0.5);
  animation: intro-ripple 2.6s linear infinite;
  z-index: 1;
}
.intro-screen .ripple.r2 { animation-delay: .8s; }
.intro-screen .ripple.r3 { animation-delay: 1.6s; }

@keyframes intro-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes intro-fade { to { opacity: 1; } }
@keyframes intro-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes intro-ripple {
  0% { width: clamp(160px,24vmin,280px); height: clamp(160px,24vmin,280px); opacity: 0.6; }
  100% { width: 180vmax; height: 180vmax; opacity: 0; }
}
.intro-exit { animation: intro-exit .9s .2s cubic-bezier(.7,0,.3,1) forwards; }
@keyframes intro-exit {
  to { opacity: 0; transform: scale(1.08); pointer-events: none; }
}

/* scroll lock while intro is up */
body.intro-active { overflow: hidden; }

/* HOME =================================================== */
.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-7);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-6);
  align-items: end;
}
.viewport-frame[data-vp="mobile"] .hero-grid { grid-template-columns: 1fr; gap: 24px; }
.hero h1 .accent { color: var(--brand); }
.hero .lead { max-width: 460px; margin: 24px 0 32px; font-size: 17px; line-height: 1.55; }
.hero-img {
  aspect-ratio: 3/4;
  background: var(--brand);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  color: var(--on-brand);
}
.hero-img::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 8px, transparent 8px 16px);
}

/* marquee */
.marquee {
  background: var(--ink);
  color: var(--bg);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee 28s linear infinite;
  font-family: var(--f-display);
  font-size: 36px;
  text-transform: uppercase;
}
.marquee-track .star { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* sections */
.section { padding: var(--space-8) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: var(--space-6); }
.section-head .right { display: flex; gap: 8px; }
.viewport-frame[data-vp="mobile"] .section-head { flex-direction: column; align-items: flex-start; }

/* product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.viewport-frame[data-vp="mobile"] .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* manifesto block */
.manifesto-block {
  background: var(--brand);
  color: var(--on-brand);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}
.manifesto-block .quote {
  font-family: var(--f-display);
  font-size: clamp(32px, 5.5cqw, 72px);
  line-height: 0.95;
  max-width: 14ch;
  text-transform: uppercase;
}
.manifesto-block .quote em { font-style: normal; color: var(--accent-warm); }
.manifesto-block .quote .hand { color: var(--accent-warm); }

/* polaroid */
.polaroid {
  background: var(--bg-card);
  padding: 12px 12px 36px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border: 1px solid var(--ink-line);
  position: relative;
  transform: rotate(var(--rot, -2deg));
}
.polaroid img, .polaroid .img-ph { width: 100%; aspect-ratio: 1; background: var(--bg-alt); display: block; }
.polaroid .cap { font-family: var(--f-hand); font-size: 22px; text-align: center; margin-top: 6px; color: var(--ink); }

/* mobile bottom nav */
.mob-bottom {
  position: sticky; bottom: 0; z-index: 30;
  background: var(--bg);
  border-top: 1px solid var(--ink-line);
  padding: 8px 0 12px;
  display: flex; justify-content: space-around;
}
.mob-bottom .b {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); cursor: pointer; padding: 6px 8px;
}
.mob-bottom .b.active { color: var(--brand); }

/* image placeholder utility */
.img-ph {
  background:
    repeating-linear-gradient(45deg, rgba(10,20,48,0.04) 0 8px, transparent 8px 16px),
    var(--bg-alt);
  display: grid; place-items: center;
  color: var(--ink-soft);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  text-align: center;
}
[data-theme="dark"] .img-ph {
  background:
    repeating-linear-gradient(45deg, rgba(246,241,230,0.04) 0 8px, transparent 8px 16px),
    var(--bg-card);
}

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-line); margin-bottom: var(--space-5); flex-wrap: wrap; }
.tabs .t {
  padding: 12px 18px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border: none; background: none;
  cursor: pointer;
  position: relative;
  margin-bottom: -1px;
}
.tabs .t.active { color: var(--ink); border-bottom: 2px solid var(--brand); }

/* admin layout */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 44px); background: var(--bg); }
.viewport-frame[data-vp="mobile"] .admin-shell { grid-template-columns: 1fr; }
.admin-side { background: var(--bg-card); border-right: 1px solid var(--ink-line); padding: 24px 16px; }
.admin-side .brand { font-family: var(--f-display); font-size: 24px; color: var(--brand); margin-bottom: 18px; letter-spacing: 0.02em; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; border-radius: 8px; cursor: pointer; }
.admin-side a.active { background: var(--brand); color: var(--on-brand); }
.admin-side a:hover:not(.active) { background: var(--bg-alt); }
.admin-main { padding: 28px 32px; min-width: 0; }
.viewport-frame[data-vp="mobile"] .admin-main { padding: 20px 16px; }

/* admin mobile topbar — escondido no desktop por padrao */
.admin-topbar { display: none; }
.admin-side-fixed { display: block; }

/* mobile: sidebar fica em <Drawer> compartilhado, topbar fixa aparece */
@media (max-width: 767px) {
  .admin-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .admin-side-fixed { display: none; }
  .admin-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--ink-line);
    position: sticky; top: 44px; z-index: 40;
    height: 56px;
  }
  .admin-side-in-drawer { background: transparent; border: 0; padding: 0; }
  .admin-side-in-drawer .brand { display: none; }
  .admin-topbar-btn {
    appearance: none; cursor: pointer;
    background: transparent; color: var(--ink);
    border: 1px solid var(--ink-line); border-radius: 10px;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    flex-shrink: 0;
  }
  .admin-topbar-title {
    flex: 1 1 auto; min-width: 0;
    font-size: 13px;
    letter-spacing: 0.04em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

/* viewport toggle "mobile" no desktop tambem aplica o mesmo pattern */
.viewport-frame[data-vp="mobile"] .admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bg-card); border-bottom: 1px solid var(--ink-line); position: sticky; top: 0; z-index: 40; }
.viewport-frame[data-vp="mobile"] .admin-side-fixed { display: none; }
.viewport-frame[data-vp="mobile"] .admin-topbar-btn { appearance: none; cursor: pointer; background: transparent; color: var(--ink); border: 1px solid var(--ink-line); border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; }
.viewport-frame[data-vp="mobile"] .admin-topbar-title { flex: 1 1 auto; min-width: 0; font-size: 13px; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewport-frame[data-vp="mobile"] .admin-side-in-drawer { background: transparent; border: 0; padding: 0; }
.viewport-frame[data-vp="mobile"] .admin-side-in-drawer .brand { display: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.viewport-frame[data-vp="mobile"] .kpis { grid-template-columns: 1fr 1fr; }
.kpi { background: var(--bg-card); border: 1px solid var(--ink-line); border-radius: var(--radius-md); padding: 18px; }
.kpi .label { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); }
.kpi .value { font-family: var(--f-display); font-size: 40px; line-height: 1; margin: 8px 0 4px; color: var(--brand); }
.kpi .delta { font-size: 12px; font-weight: 700; color: #1A8754; }
.kpi .delta.down { color: var(--accent); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--f-mono); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); padding: 12px; border-bottom: 1px solid var(--ink-line); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--ink-line); }
.table tr:hover td { background: var(--bg-alt); }

/* tweaks panel position adjustment */
.tweaks-shell { z-index: 110 !important; }

/* ============================================================
   MOBILE RESPONSIVE PATCH (device real <768px + toggle [data-vp=mobile])
   ============================================================ */
@media (max-width: 767px) {
  /* admin: grids 2-col viram 1-col */
  .admin-main .dash-grid,
  .admin-main .admin-2col,
  .admin-main .log-grid,
  .admin-main .set-grid,
  .admin-main .prod-edit { grid-template-columns: 1fr !important; }
  /* marketing 3 cupons em scroll horizontal */
  .admin-main .mk-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  /* KPIs 2 cols */
  .kpis { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 28px; }
  /* tables viram cards verticais no mobile (Produtos, Pedidos, Clientes) */
  .admin-main .card { max-width: 100%; overflow: visible; padding: 12px; background: transparent; border: 0; }
  .admin-main .table { display: block; min-width: 0; font-size: 13px; background: transparent; }
  .admin-main .table thead { display: none; }
  .admin-main .table tbody { display: block; }
  .admin-main .table tr {
    display: block;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--ink-line);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .admin-main .table tr:last-child { margin-bottom: 0; }
  .admin-main .table tr:hover td { background: transparent; }
  .admin-main .table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 8px 0; border: 0;
    white-space: normal; text-align: right;
    border-bottom: 1px dashed var(--ink-line);
  }
  .admin-main .table td:last-child { border-bottom: 0; }
  .admin-main .table td::before {
    content: attr(data-label);
    font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--ink-soft);
    flex-shrink: 0; text-align: left;
  }
  /* td sem data-label (ex: ações, thumb) escondem o ::before vazio */
  .admin-main .table td:not([data-label])::before,
  .admin-main .table td[data-label=""]::before { display: none; }
  /* primeira td (thumb) e ultima (ações) ocupam linha inteira sem label */
  .admin-main .table td.cell-thumb { justify-content: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--ink-line); }
  .admin-main .table td.cell-actions { justify-content: flex-end; padding-top: 12px; border-bottom: 0; }
  .admin-main .table td.cell-main { flex-direction: column; align-items: stretch; text-align: left; }
  .admin-main .table td.cell-main::before { margin-bottom: 4px; }
  /* AdminHead actions wrap */
  .admin-main .row.gap-2 .btn { font-size: 11px; padding: 8px 10px; }
  .admin-main h1.t-lg { font-size: 22px; }
  /* estoque por peca — empilhar tag de tamanhos */
  .admin-main .card .row.gap-3 .mono.muted { display: none; }
  /* home: polaroids 2 col em vez de 4 */
  .polaroid-wall { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
  /* home: commit cards 1 col */
  .commit-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
}

/* mesma logica aplicada ao toggle "mobile" no desktop */
.viewport-frame[data-vp="mobile"] .admin-main .dash-grid,
.viewport-frame[data-vp="mobile"] .admin-main .admin-2col,
.viewport-frame[data-vp="mobile"] .admin-main .log-grid,
.viewport-frame[data-vp="mobile"] .admin-main .set-grid,
.viewport-frame[data-vp="mobile"] .admin-main .prod-edit { grid-template-columns: 1fr !important; }
.viewport-frame[data-vp="mobile"] .admin-main .mk-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
.viewport-frame[data-vp="mobile"] .kpis { grid-template-columns: 1fr 1fr !important; gap: 10px; }
.viewport-frame[data-vp="mobile"] .kpi { padding: 14px; }
.viewport-frame[data-vp="mobile"] .kpi .value { font-size: 28px; }
.viewport-frame[data-vp="mobile"] .admin-main .table { font-size: 12px; min-width: 600px; }
.viewport-frame[data-vp="mobile"] .admin-main .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.viewport-frame[data-vp="mobile"] .admin-main .card .table { margin: 0; }
.viewport-frame[data-vp="mobile"] .admin-main .table th,
.viewport-frame[data-vp="mobile"] .admin-main .table td { padding: 10px 8px; white-space: nowrap; }
.viewport-frame[data-vp="mobile"] .admin-main .row.gap-2 .btn { font-size: 11px; padding: 8px 10px; }
.viewport-frame[data-vp="mobile"] .admin-main h1.t-lg { font-size: 22px; }
.viewport-frame[data-vp="mobile"] .admin-main .card .row.gap-3 .mono.muted { display: none; }
.viewport-frame[data-vp="mobile"] .polaroid-wall { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
.viewport-frame[data-vp="mobile"] .commit-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
