/* Página pública de cada barbería — una sola columna ancha; el tema lo pone cada barbería */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-inline: 16px;
}
body.hascart {
  padding-bottom: 72px;
}

/* barra superior */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
}
.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  font-family: var(--f-display);
  font-style: var(--display-style);
  font-weight: 700;
  font-size: 18px;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mark b {
  font-family: var(--f-display);
  font-style: var(--display-style);
  text-transform: var(--display-case);
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topnav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}
.topnav a {
  text-decoration: none;
  color: var(--muted);
}
.topnav a:hover {
  color: var(--ink);
}
.topbar .btn {
  margin-left: auto;
}
.topnav + .btn {
  margin-left: 0;
}
@media (max-width: 760px) {
  .topnav {
    display: none;
  }
  .topnav + .btn {
    margin-left: auto;
  }
}

/* demo: selector de barberías */
.demobar {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.demobar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding-block: 8px;
}
.demobar a {
  color: var(--ink);
  font-weight: 600;
}
.demobar a[aria-current="true"] {
  color: var(--accent);
}

/* portada */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent), var(--bg) 92%);
}
.hero .cover.tex {
  background:
    repeating-linear-gradient(
      115deg,
      color-mix(in srgb, var(--accent) 10%, transparent) 0 2px,
      transparent 2px 26px
    ),
    radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    var(--surface);
}
.hero .wrap {
  position: relative;
  padding-block: 56px 40px;
  display: grid;
  gap: 18px;
}
.hero h1 {
  font-size: clamp(44px, 9vw, 92px);
  margin: 0;
}
.hero .tag {
  font-size: 18px;
  color: var(--muted);
  max-width: 48ch;
  margin: 0;
}
.hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
  color: var(--muted);
}
.facts span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.facts svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.status.open {
  color: var(--ok);
}
.status.closed {
  color: var(--bad);
}

/* secciones */
section.block {
  padding-block: 44px;
  border-bottom: 1px solid var(--line);
}
.sechead {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 22px;
}
.sechead h2 {
  font-size: clamp(32px, 5vw, 48px);
  margin: 4px 0 0;
}
.sechead p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

/* reservas */
.booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 880px) {
  .booking {
    grid-template-columns: minmax(0, 1fr);
  }
}
.booking > * {
  min-width: 0;
}
.step {
  padding-block: 4px 22px;
}
.step > h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 12px;
}
.step > h3 b {
  font-family: var(--f-mono);
  color: var(--accent);
  font-size: 13px;
}
.cat {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 14px 0 8px;
}
.grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.opt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 13px 15px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  min-width: 0;
  transition: border-color 0.15s;
}
.opt:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}
.opt[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.opt .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.opt strong {
  font-size: 15px;
}
.opt .meta {
  color: var(--muted);
  font-size: 13px;
}
.price {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  white-space: nowrap;
}
.barber {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--f-display);
  font-style: var(--display-style);
  font-size: 20px;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.day {
  flex: 0 0 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  border-radius: var(--r);
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.day span {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.day b {
  font-family: var(--f-mono);
  font-size: 20px;
  line-height: 1.3;
}
.day[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.day[aria-pressed="true"] span {
  color: inherit;
  opacity: 0.8;
}
.day:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.part {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 6px;
}
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}
.slot {
  padding: 9px 0;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font: 500 14px var(--f-mono);
  color: var(--ink);
  cursor: pointer;
}
.slot:hover:not(:disabled) {
  border-color: var(--accent);
}
.slot:disabled {
  background: transparent;
  color: var(--muted);
  text-decoration: line-through;
  opacity: 0.45;
  cursor: not-allowed;
}
.slot[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.arrive {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  align-items: center;
  background: var(--soft);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-top: 14px;
}
.arrive .big {
  font-family: var(--f-mono);
  font-size: 26px;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.arrive p {
  margin: 0;
  font-size: 14px;
}
.arrive .go {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 460px) {
  .arrive {
    grid-template-columns: 1fr;
  }
}

.summary {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 14px;
}
.summary > .card {
  display: grid;
  gap: 14px;
}
@media (max-width: 880px) {
  .summary {
    position: static;
  }
}
.summary .lines {
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.summary .lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.summary .lines span:last-child {
  text-align: right;
}
.summary .total {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  font-weight: 700;
}
.summary h3 {
  margin: 0;
  font-size: 22px;
}
.form {
  display: grid;
  gap: 12px;
}
.done {
  border-color: var(--accent);
}
.done .codebig {
  font-family: var(--f-mono);
  font-size: 30px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.done .actions {
  display: grid;
  gap: 8px;
}

/* tienda */
.shopgrid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.prod {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.prod .img {
  aspect-ratio: 1;
  max-width: 100%;
  background: var(--soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.prod .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prod .img .ph {
  font-family: var(--f-display);
  font-style: var(--display-style);
  font-size: 54px;
  color: var(--accent);
  opacity: 0.7;
}
.prod .body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.prod .body .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.stock {
  font-size: 12px;
  color: var(--muted);
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
}
.qty button {
  background: none;
  border: 0;
  width: 32px;
  height: 32px;
  font-size: 17px;
  cursor: pointer;
  color: var(--ink);
}
.qty span {
  min-width: 22px;
  text-align: center;
  font-family: var(--f-mono);
}
.cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
.cartbar .in {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: flex-end;
}
.panel {
  background: var(--surface);
  width: min(460px, 100%);
  height: 100%;
  overflow: auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.panel h2 {
  margin: 0;
  font-size: 30px;
}
.line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.choices {
  display: grid;
  gap: 8px;
}
.choices label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.choices label:has(input:checked) {
  border-color: var(--accent);
}
.choices input {
  margin-top: 4px;
}
@media (prefers-reduced-motion: no-preference) {
  .panel {
    animation: slide 0.22s ease-out;
  }
  @keyframes slide {
    from {
      transform: translateX(40px);
      opacity: 0.5;
    }
  }
}

/* galería */
.gallery {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gallery figure {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 6px;
  background: var(--soft);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery .art {
  position: absolute;
  inset: 0;
}
.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

/* visítanos */
.visit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.hours td {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.hours td:last-child {
  text-align: right;
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}
.hours tr.today td {
  color: var(--accent);
  font-weight: 700;
}
.visit h3 {
  margin: 0 0 10px;
  font-size: 22px;
}
.visit .stack {
  display: grid;
  gap: 10px;
}
.tel {
  font-family: var(--f-mono);
  font-size: 18px;
  user-select: all;
}
.paylist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

footer.foot {
  padding-block: 28px 100px;
  font-size: 13px;
  color: var(--muted);
}
footer.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* asistente */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--wa);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
}
.fab svg {
  width: 28px;
  height: 28px;
}
body.hascart .fab {
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}
.chat {
  position: fixed;
  right: 16px;
  left: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 46;
  max-width: 370px;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  max-height: min(560px, 72vh);
  overflow: hidden;
}
body.hascart .chat {
  bottom: calc(148px + env(safe-area-inset-bottom, 0px));
}
.chat .hd {
  background: var(--wa);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.chat .hd b {
  display: block;
}
.chat .hd small {
  opacity: 0.85;
}
.chat .hd button {
  background: none;
  border: 0;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.chat .log {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  flex: 1;
}
.bub {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  white-space: pre-wrap;
}
.bub.bot {
  background: var(--soft);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bub.me {
  background: var(--wa);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.bub a {
  color: inherit;
  font-weight: 700;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}
.chips button {
  border: 1.5px solid var(--wa);
  color: var(--ink);
  background: transparent;
  border-radius: 99px;
  padding: 6px 11px;
  font: 600 12px var(--f-body);
  cursor: pointer;
}

/* directorio (sin barbería elegida) */
.directory {
  padding-block: 60px;
  display: grid;
  gap: 18px;
}
.directory h1 {
  font-size: clamp(40px, 8vw, 72px);
  margin: 0;
}
.loading {
  padding: 80px 16px;
  text-align: center;
  color: var(--muted);
}

/* tema ébano: logotipo de texto, portada a sangre y galería tipo feed */
.mark.wordmark b {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  font-style: normal;
}
[data-theme="ebano"] .display {
  font-weight: 800;
  letter-spacing: -0.03em;
}
[data-theme="ebano"] .hero {
  min-height: min(86vh, 760px);
  display: flex;
  align-items: flex-end;
}
[data-theme="ebano"] .hero .wrap {
  width: 100%;
  padding-block: 120px 48px;
}
[data-theme="ebano"] .hero .cover {
  filter: saturate(0.9) contrast(1.05);
}
[data-theme="ebano"] .hero .cover::after {
  background:
    linear-gradient(180deg, rgba(10, 8, 7, 0.25), rgba(10, 8, 7, 0.55) 45%, var(--bg) 96%),
    radial-gradient(80% 60% at 75% 30%, rgba(226, 181, 74, 0.12), transparent 70%);
}
[data-theme="ebano"] .hero h1 {
  font-size: clamp(72px, 16vw, 168px);
  line-height: 0.9;
}
[data-theme="ebano"] .hero .tag {
  color: #d8ccbf;
}
[data-theme="ebano"] .gallery {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
}
[data-theme="ebano"] .gallery figure {
  border-radius: 0;
  aspect-ratio: 3 / 4;
}
[data-theme="ebano"] .gallery img {
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
  filter: brightness(0.82);
}
[data-theme="ebano"] .gallery figure:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}
[data-theme="ebano"] .gallery figcaption {
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  background: none;
  font: 800 clamp(13px, 1.4vw, 17px) var(--f-display);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s;
}
[data-theme="ebano"] .gallery figure:hover figcaption,
[data-theme="ebano"] .gallery figure:nth-child(7n + 1) figcaption {
  opacity: 1;
}
@media (max-width: 760px) {
  [data-theme="ebano"] .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  [data-theme="ebano"] .gallery figcaption {
    opacity: 1;
  }
}
[data-theme="ebano"] .prod .img img {
  filter: brightness(0.9);
}
[data-theme="ebano"] .hero .cover {
  filter: blur(3px) brightness(0.55) saturate(0.85);
  transform: scale(1.04);
}
.reel {
  display: none;
}
@media (min-width: 900px) {
  [data-theme="ebano"] .reel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    position: absolute;
    right: max(16px, calc((100vw - 1040px) / 2));
    top: 34%;
    transform: translateY(-50%);
    width: min(36vw, 400px);
    z-index: 1;
  }
  [data-theme="ebano"] .reel img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  }
  [data-theme="ebano"] .reel img:nth-child(2) {
    transform: translateY(-28px);
  }
  [data-theme="ebano"] .hero .tag {
    max-width: 40ch;
  }
}

/* aviso de uso de datos (js/aviso-datos.js) */
.aviso {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  padding: 22px clamp(16px, 4vw, 28px);
}
.aviso::backdrop {
  background: rgba(0, 0, 0, 0.7);
}
.aviso h2 {
  font-size: 28px;
  margin: 6px 0 12px;
}
.aviso p {
  margin: 0 0 10px;
}
.aviso ul {
  padding-left: 1.1em;
  margin: 0 0 16px;
}
.aviso li {
  margin-bottom: 8px;
}
.aviso-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
