/* Tencha — estilo zen: carbón cálido, crema y verde matcha (inspirado en el Instagram de Tencha) */
:root {
  --bg: #1f1d1a;
  --bg-2: #282521;
  --card: rgba(255, 248, 235, .04);
  --border: rgba(255, 248, 235, .09);
  --text: #f4eee3;
  --muted: #b5ab9c;
  --faint: #7d7469;
  --matcha: #a9c47c;
  --wood: #c9a77c;
  --radius: 30px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overscroll-behavior-y: none; overflow-x: clip; }
body { overflow-x: clip; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image: radial-gradient(70rem 40rem at 50% -15%, rgba(201, 167, 124, .10), transparent 65%);
  -webkit-font-smoothing: antialiased;
}
.jp { font-family: 'Noto Sans JP', sans-serif; font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }

/* Bloque de texto estilo post: Español grande / subtítulo / kanji */
.name-es { font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.name-sub { color: var(--muted); font-weight: 300; font-size: .78em; margin-top: 2px; }
.name-jp { color: var(--faint); font-size: .72em; margin-top: 3px; letter-spacing: .08em; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: center; align-items: center; padding: 11px 14px;
  background: rgba(31, 29, 26, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { text-decoration: none; color: var(--text); display: flex; align-items: center; justify-content: center; line-height: 1; }
.brand-logo { height: 36px; max-height: 36px; width: auto; display: block; pointer-events: none; }

.glass {
  background: var(--card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.title { font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 600; text-align: center; letter-spacing: -.01em; }
.title-jp { display: block; text-align: center; color: var(--faint); font-size: .85rem; letter-spacing: .3em; margin-top: 6px; }
.subtitle { text-align: center; color: var(--muted); font-weight: 300; margin: 14px 0 28px; }
.section { max-width: 820px; margin: 0 auto; padding: 48px 16px; }

/* Placeholder sin foto */
.ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #2e2a25, #3a3a2a 60%, #5c6b3f);
}
.ph span { font-family: 'Noto Sans JP'; font-size: 3rem; color: rgba(244, 238, 227, .12); }
.media-fill {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
body, .slide, .cat-card, .item-card, .popup-card {
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Texto sobre la foto, arriba a la izquierda (como el post Kabocha Latte) */
.overlay-top {
  position: absolute; inset: 0 0 auto 0; padding: 16px 16px 40px;
  background: linear-gradient(rgba(20, 18, 16, .65), transparent);
}
.overlay-price {
  position: absolute; left: 16px; bottom: 14px;
  font-weight: 600; color: var(--text);
  padding: 4px 12px; border-radius: 99px;
  background: rgba(20, 18, 16, .55); backdrop-filter: blur(6px);
}

/* Carrusel */
.hero { max-width: 820px; margin: 18px auto 0; padding: 0 16px; }
.carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: var(--radius); scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; scroll-snap-align: center; position: relative;
  aspect-ratio: 4 / 5; cursor: pointer; overflow: hidden;
}
.slide .overlay-top { padding: 28px 26px 80px; font-size: 1.9rem; }
.slide .overlay-price { left: 26px; bottom: 24px; font-size: 1rem; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.dot { width: 6px; height: 6px; border-radius: 99px; background: #4a453e; transition: all .3s; }
.dot.active { width: 22px; background: var(--matcha); }

/* Categorías: tiritas apiladas verticalmente con texto a la izquierda e imagen a la derecha con degradado */
.cat-grid { display: flex; flex-direction: column; gap: 12px; }
.cat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  padding: 15px 22px; font-size: 1.3rem;
  background: var(--bg-2);
  transition: transform .3s, border-color .3s;
}
.cat-card:hover { transform: scale(1.015); border-color: rgba(169, 196, 124, .45); }
.cat-info {
  position: relative; z-index: 2;
  max-width: 62%;
}
.cat-card .name-sub { font-size: .66em; margin-top: 5px; }
.cat-media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 72%;
  overflow: hidden; pointer-events: none;
}
.cat-media .media-fill {
  object-position: right center;
}
.cat-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-2) 10%, rgba(53, 47, 40, .75) 38%, rgba(53, 47, 40, .08) 100%);
}

/* Barra sticky de categorías: se extiende de borde a borde de la pantalla */
.cat-bar {
  position: sticky; top: 58px; z-index: 20;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px max(16px, calc((100vw - 788px) / 2));
  margin-bottom: 6px;
  background: rgba(42, 37, 31, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; padding: 7px 15px; border-radius: 99px;
  border: 1px solid var(--border); color: var(--muted); font-size: .88rem; transition: all .25s;
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }

/* Lista de ítems: siempre 2 columnas */
.menu-cat { scroll-margin-top: 124px; padding-top: 30px; }
.menu-cat-head { font-size: 1.7rem; margin-bottom: 4px; }
.menu-cat .intro { color: var(--muted); font-weight: 300; font-size: .9rem; margin-top: 10px; line-height: 1.5; }
.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.item-card {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: var(--radius); border: 1px solid var(--border);
  font-size: 1.02rem;
  opacity: 0; transform: translateY(20px);
}
.item-card.visible { opacity: 1; transform: none; transition: opacity .6s, transform .6s, border-color .3s; }
.item-card.visible:hover { transform: scale(1.02); border-color: rgba(169, 196, 124, .4); }
.item-card .overlay-price { font-size: .85rem; left: 12px; bottom: 12px; }
.item-card .overlay-top { padding: 14px 14px 36px; }

/* Popup: misma proporción 4:5 que la tarjeta */
/* Tamaño fijo: no cambia entre productos (las flechas no se mueven) */
.popup {
  --pw: min(92vw, 420px, calc((94vh - 250px) * .8));
  margin: auto; width: var(--pw); height: calc(var(--pw) * 1.25 + 250px);
  max-height: none; overflow: hidden;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 0;
}
.popup[open] { animation: pop .35s cubic-bezier(.2, .9, .3, 1.1); }
.popup::backdrop { background: rgba(15, 13, 11, .7); backdrop-filter: blur(4px); }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(16px); } }
.popup-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 99px; text-align: center;
  background: rgba(20, 18, 16, .55); backdrop-filter: blur(6px);
}
.popup-media { aspect-ratio: 4 / 5; overflow: hidden; }
.popup-body { padding: 22px 24px 6px; }
.popup-head { font-size: 1.7rem; }
.popup-tags { display: flex; gap: 6px; margin-top: 14px; }
.tag { font-size: .72rem; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.popup-desc { color: var(--muted); font-weight: 300; margin-top: 14px; line-height: 1.55; }
.popup-variants { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.popup-price { font-size: 1.4rem; font-weight: 600; color: var(--matcha); margin-top: 14px; }
.popup-nav { display: flex; justify-content: space-between; padding: 8px 16px 18px; }
.popup-nav button {
  width: 44px; height: 44px; border-radius: 99px; border: 1px solid var(--border);
  font-size: 1.4rem; text-align: center; transition: transform .2s, background .2s;
}
.popup-nav button:hover { transform: scale(1.08); background: rgba(255, 248, 235, .05); }

.footer { text-align: center; color: var(--faint); padding: 40px 0 60px; font-size: .8rem; letter-spacing: .1em; display: flex; flex-direction: column; align-items: center; }
.footer a { color: var(--faint); text-decoration: none; }
.footer a span { color: var(--text); font-weight: 600; }
.footer a.ig-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.footer a.ig-pill span { color: inherit; font-weight: 400; }
.footer a.ig-pill:hover,
.footer a.ig-pill:active {
  color: var(--text);
  border-color: rgba(169, 196, 124, 0.35);
  background: rgba(255, 248, 235, 0.07);
  transform: translateY(-1px);
}
.ig-icon {
  width: 15px;
  height: 15px;
  color: var(--matcha);
  flex-shrink: 0;
}
.stealth-dots {
  display: inline-block;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  letter-spacing: 0.4em;
  text-decoration: none;
  cursor: pointer;
  padding: 10px 24px;
  user-select: none;
  transition: color 0.3s ease;
}
.stealth-dots:hover { color: rgba(255, 255, 255, 0.28); }

@media (min-width: 720px) {
  .slide { aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Popup: cuerpo de altura fija, descripción en 3 líneas + "Leer más" */
.popup-media { flex: 0 0 auto; }
.popup-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 18px 22px 4px; scrollbar-width: none; }
.popup-body::-webkit-scrollbar { display: none; }
.popup-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.popup-head { font-size: 1.45rem; min-width: 0; }
.popup-head .name-es { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popup-row .popup-price { margin-top: 0; font-size: 1.15rem; white-space: nowrap; }
.popup-tags { margin-top: 10px; min-height: 22px; }
.popup-desc { margin-top: 10px; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popup-desc.open { -webkit-line-clamp: unset; display: block; }
.popup-more { color: var(--matcha); font-size: .8rem; margin-top: 4px; letter-spacing: .04em; }
.popup-nav { flex: 0 0 auto; padding: 6px 16px 16px; }
.popup[open] { display: flex; }

/* Ajustes v3: texto más pegado, flechas sin círculo, bloqueo de scroll */
html.lock { overflow: hidden; overscroll-behavior: none; }
.popup-body { padding: 14px 22px 0; }
.popup-head .name-jp { margin-top: 1px; }
.popup-tags { margin: 0 0 6px; min-height: 0; }
.popup-tags:empty { display: none; }
.popup-desc { margin-top: 8px; -webkit-line-clamp: 4; line-height: 1.45; white-space: pre-line; }
.popup-more { margin-top: 2px; }
.popup-nav { padding: 0 10px 8px; }
.popup-nav button, .popup-nav button:hover {
  width: 48px; height: 40px; border: 0; background: none; transform: none;
  font-size: 2rem; line-height: 1; color: var(--muted);
  -webkit-tap-highlight-color: transparent; outline: none;
}
.popup-nav button.flash { animation: flash .35s ease-out; }
@keyframes flash { 0% { color: var(--matcha); text-shadow: 0 0 12px var(--matcha); } 100% { color: var(--muted); text-shadow: none; } }
.rec-title { font-size: 1.35rem; font-weight: 600; margin: 4px 4px 12px; letter-spacing: -.01em; }

/* Ajustes v4: tonos madera/beige más claros, etiqueta flotante, precios múltiples */
:root {
  --bg: #2a251f;
  --bg-2: #352f28;
  --card: rgba(255, 240, 215, .05);
  --border: rgba(255, 240, 215, .11);
}
body { background-image: radial-gradient(70rem 45rem at 50% -15%, rgba(214, 180, 135, .16), transparent 65%); }
.topbar { background: rgba(42, 37, 31, .85); }
.cat-bar { background: rgba(42, 37, 31, .9); }
.ph { background: linear-gradient(160deg, #4d4237, #7d6a54 55%, #b59d7c); }
.ph span { color: rgba(255, 245, 228, .18); }
/* Ajustes v5: globitos sobre la parte inferior de la imagen, línea divisoria un poco más abajo y kanji más pequeño */
.popup-media-wrap {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 4 / 5.25;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.popup-media { width: 100%; height: 100%; aspect-ratio: auto; }
.popup-media-wrap .popup-tags {
  position: absolute; left: 16px; bottom: 12px; z-index: 2;
  margin: 0; display: flex; gap: 6px;
}
.popup-media-wrap .popup-tags:empty { display: none; }
.popup-media-wrap .tag {
  font-size: .72rem; padding: 4px 11px; border-radius: 99px;
  background: rgba(25, 22, 18, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 240, 215, .18); color: var(--text);
}
.popup-body { padding: 12px 22px 0; }
.popup-head .name-jp, .name-jp { font-size: .62em; margin-top: 2px; }
.overlay-icons {
  position: absolute; right: 12px; bottom: 12px;
  font-size: .85rem; line-height: 1.3;
  padding: 4px 10px; border-radius: 99px;
  background: rgba(20, 18, 16, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  letter-spacing: 2px;
}

/* Transición: se intercambia un globo completo por otro al deslizar */
.popup {
  background: transparent;
  border: 0;
  overflow: visible;
  position: fixed;
  inset: 0;
  scrollbar-width: none;
}
.popup::-webkit-scrollbar { display: none; }
.popup-card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .32s cubic-bezier(.22, .9, .3, 1), opacity .32s cubic-bezier(.22, .9, .3, 1);
  will-change: transform, opacity;
}
.popup-card.enter-from-right { transform: translateX(calc(100% + 24px)) scale(.96); opacity: 0; }
.popup-card.enter-from-left  { transform: translateX(calc(-100% - 24px)) scale(.96); opacity: 0; }
.popup-card.exit-to-left     { transform: translateX(calc(-100% - 24px)) scale(.96); opacity: 0; pointer-events: none; }
.popup-card.exit-to-right    { transform: translateX(calc(100% + 24px)) scale(.96); opacity: 0; pointer-events: none; }

.popup-media { position: relative; overflow: hidden; }
.popup-slide { position: absolute; inset: 0; width: 100%; height: 100%; }

/* En la lista de productos, subtítulo y kanji del mismo color cremita que el nombre */
.item-card .name-sub,
.item-card .name-jp {
  color: var(--text);
}
.popup-row .popup-price { text-align: right; line-height: 1.25; }
.popup-price small { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); }
.popup-price small b { color: var(--matcha); font-weight: 600; }
