/* Doobara demo: shared tokens, layout and components */
:root {
  --paper: #F1ECE2;
  --paper-2: #E8E1D3;
  --ink: #151413;
  --ink-2: #0C0B0A;
  --cobalt: #2B46E5;
  --muted: #6A645B;
  --line: rgba(21, 20, 19, .14);
  --line-light: rgba(241, 236, 226, .16);
  /* shoe-brand type: a heavy condensed grotesk for headings (shoebox-label energy), the same family for body */
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --sans: "Archivo", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --wordmark: "Jost", var(--sans);
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* film grain (stands in for React Bits "noise"); kept still so it costs nothing while scrolling */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* type */
.label {
  font: 400 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.label .num { color: var(--cobalt); }
.display {
  font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: -.01em; line-height: .9; margin: 0;
}
.display em { font-style: italic; font-weight: 800; color: var(--cobalt); }
.on-dark .display em { color: #8FA0FF; }
.lede { font-size: clamp(16px, 1.25vw, 19px); color: var(--muted); max-width: 46ch; }
.on-dark .lede { color: rgba(241, 236, 226, .72); }
.wordmark { font: 700 26px/1 var(--wordmark); letter-spacing: -.045em; text-transform: lowercase; }

/* buttons */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
  background: var(--bg); color: var(--fg); border-radius: 999px;
  font: 500 15px/1 var(--sans); letter-spacing: -.01em;
  transition: background .25s, color .25s, transform .3s var(--ease);
  will-change: transform;
}
.btn:hover { --bg: var(--cobalt); --fg: #fff; }
.btn.ghost { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.btn.ghost:hover { --bg: currentColor; }
.on-dark .btn { --bg: var(--paper); --fg: var(--ink); }
.on-dark .btn:hover { --bg: var(--cobalt); --fg: #fff; }
.on-dark .btn.ghost { --bg: transparent; --fg: var(--paper); }
.on-dark .btn.ghost:hover { --bg: var(--paper); --fg: var(--ink); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 68px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
  color: var(--ink); transition: background .35s, color .35s, box-shadow .35s;
}
.nav.dark { color: var(--paper); background: linear-gradient(rgba(12, 11, 10, .55), transparent); }
.nav.solid { background: rgba(241, 236, 226, .9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; opacity: .85; }
.nav-links a:hover { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.bag-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; }
.bag-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
  background: var(--cobalt); color: #fff; font: 700 11px/1 var(--mono);
}
@media (max-width: 760px) { .nav-links { display: none; } }

/* bag drawer */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(12, 11, 10, .45); opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(420px, 100vw);
  background: var(--paper); transform: translateX(100%); transition: transform .5s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow: auto; padding: 8px 24px; }
.drawer-foot { padding: 20px 24px 28px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.line-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item img { width: 84px; height: 60px; object-fit: contain; background: #fff; border-radius: 10px; }
.line-item h4 { margin: 0; font: 800 condensed 20px/1 var(--display); letter-spacing: -.005em; text-transform: uppercase; }
.line-item p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.line-item button { font-size: 12px; color: var(--muted); text-decoration: underline; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.total { display: flex; justify-content: space-between; font-weight: 500; }

/* demo modal + toast */
.modal { position: fixed; inset: 0; z-index: 95; display: none; place-items: center; padding: 16px; background: rgba(12, 11, 10, .6); }
.modal.open { display: grid; }
.modal-card { background: var(--paper); border-radius: 18px; padding: 32px; max-width: 420px; text-align: center; }
.modal-card h3 { margin: 0 0 8px; font: 800 condensed 34px/1 var(--display); letter-spacing: -.005em; text-transform: uppercase; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 96; transform: translate(-50%, calc(100% + 60px));
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 99px; font-size: 14px;
  transition: transform .45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }

/* whatsapp */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; background: #1FA855; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.wa svg { width: 26px; height: 26px; }

/* split flap (stands in for React Bits "split-flap-text") */
.flap { display: inline-flex; gap: 2px; font: 700 13px/1 var(--mono); }
.flap .c {
  position: relative; display: inline-grid; place-items: center; width: 1.25em; height: 1.8em;
  background: #1E1C1A; color: #F4EFE6; border-radius: 3px; overflow: hidden;
}
.flap .c::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .55); }
.flap .c.sp { background: transparent; }
.flap .c.flip { animation: flip .09s linear; }
@keyframes flip { 0% { transform: scaleY(1); } 50% { transform: scaleY(.15); } 100% { transform: scaleY(1); } }

/* sticker (stands in for React Bits "sticker-peel") */
.sticker {
  position: absolute; z-index: 3; top: 14px; left: 14px; padding: 7px 10px 7px 11px;
  background: var(--cobalt); color: #fff; font: 700 11px/1 var(--mono); letter-spacing: .12em;
  border-radius: 4px; transform: rotate(-6deg); box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 78% 100%, 0 100%);
  transition: transform .4s var(--ease), clip-path .4s var(--ease);
}
.sticker::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 22%; height: 38%;
  background: linear-gradient(135deg, #8A9BFF 0 50%, transparent 50%); transition: all .4s var(--ease);
}
.card:hover .sticker { transform: rotate(-2deg) translateY(-2px); clip-path: polygon(0 0, 100% 0, 100% 30%, 55% 100%, 0 100%); }
.card:hover .sticker::after { width: 45%; height: 70%; }

/* product card */
.card { position: relative; display: block; }
.card .tile {
  position: relative; aspect-ratio: 4 / 3; background: #FBF9F5; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center; transition: background .3s;
}
.card .tile img { width: 86%; transition: transform .6s var(--ease), opacity .3s; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, .14)); }
.card:hover .tile img { transform: translateY(-6px) rotate(-3deg) scale(1.03); }
.card .meta { display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px 0; }
.card h3 { margin: 0; font: 800 condensed 26px/1 var(--display); letter-spacing: -.005em; text-transform: uppercase; }
.card .sku { color: var(--muted); }
.card .price { font: 500 15px/1 var(--sans); white-space: nowrap; }
.dots { display: flex; gap: 6px; padding: 10px 4px 0; }
.dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); position: relative; }
.dot.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
button.dot { min-width: 16px; }
.dot::before { content: ""; position: absolute; inset: -8px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 16px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; transition: background .25s, color .25s, box-shadow .25s;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.on-dark .chip { box-shadow: inset 0 0 0 1px var(--line-light); color: var(--paper); }
.on-dark .chip.on { background: var(--paper); color: var(--ink); }

/* placeholder marker for facts the client must confirm */
.ask { display: inline-block; padding: 2px 7px; border: 1px dashed currentColor; border-radius: 5px; font: 400 11px/1.4 var(--mono); letter-spacing: .06em; opacity: .75; }

/* footer */
.footer { background: var(--ink); color: var(--paper); padding: 72px var(--gutter) 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h5 { margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; opacity: .8; }
.footer .big { font: 700 clamp(72px, 16vw, 240px)/.8 var(--wordmark); letter-spacing: -.06em; margin: 64px 0 24px; opacity: .95; }
.footer .fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-light); font-size: 12px; opacity: .6; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* reveal helper */
.rv { opacity: 0; transform: translateY(28px); }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
}
