/*
Theme Name: Chascomarket PWA
Theme URI: https://chascomarket.com.ar
Author: Open Design / Gemini CLI
Author URI: https://gemini.google.com
Description: Un prototipo de PWA para marketplace local de Chascomús, con feed estilo TikTok y grilla Pinterest.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: pwa, marketplace, tiktok-style, mobile-first
Text Domain: chascomarket-pwa
*/

/* WordPress requires style.css to be in the root with this header. */
@import url('css/tokens.css');

/* ── Vista inicial: Flow TikTok (pantalla completa, sin scroll roto) ───── */

/* Ancla la altura de html para que 100dvh sea siempre la ventana visible  */
html { height: 100%; }

/* En vista Flow el body no debe hacer scroll: sólo .cm-feed scrollea      */
body.view-flow {
  height: 100dvh;
  overflow: hidden;
}

body.view-flow .app-shell {
  height: 100dvh;
  overflow: hidden;
}

body.view-flow .app-main {
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  height: 100dvh;
}

/* Feed vertical: ocupa exactamente la pantalla, scroll-snap por tarjeta   */
body.view-flow .cm-feed {
  display: block;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #000;
}

body.view-flow .cm-feed::-webkit-scrollbar { display: none; }

body.view-flow .cm-min-card {
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* ── Vista Pinterest: oculta por defecto, activa con body.view-pin ──────── */
.cm-pin { display: none; }

body.view-pin .cm-feed { display: none; }

body.view-pin .cm-pin {
  display: block;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Toggle activo en vista Pinterest                                          */
body.view-pin .cm-viewtoggle {
  background: #0C976E;
  border-color: rgba(255,255,255,0.25);
}
