/* ==========================================================================
   MUY BIELA OFICIAL — APP CELULAR STYLESHEET
   Paleta Oficial: Rebranding 2025/2026 (Floresta, Sálvia, Terracota, Nude, Creme)
   ========================================================================== */

:root {
  --mb-forest: #3D4A3E;
  --mb-forest-dark: #2E382F;
  --mb-sage: #9FB7A1;
  --mb-sage-dark: #7F927F;
  --mb-terracotta: #D8917A;
  --mb-terracotta-dark: #C17B65;
  --mb-nude: #E8B8A6;
  --mb-blush: #F5DDE3;
  --mb-orchid: #D896AC;
  --mb-creme: #FAF8F5;
  --mb-graphite: #1C1D1A;
  --mb-muted: #6B7280;
  --mb-border: #E8DFD8;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* RESET E BASE MOBILE */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, textarea, select {
  user-select: auto;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--mb-creme);
  color: var(--mb-graphite);
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ocultar barra de rolagem mantendo a funcionalidade de rolagem nativa */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Container do App com limitação elegante no desktop para preview de celular */
.app-viewport {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--mb-creme);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

/* TOPO FIXO COM SAFE AREA */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: max(8px, var(--app-safe-top));
  border-bottom: 1px solid var(--mb-border);
}

/* CONTEÚDO SCROLLÁVEL */
.app-content {
  flex: 1;
  padding-bottom: calc(75px + var(--app-safe-bottom));
  overflow-y: auto;
}

/* BARRA DE NAVEGAÇÃO INFERIOR (BOTTOM TABS) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--mb-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 8px;
  padding-bottom: max(10px, var(--app-safe-bottom));
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(61, 74, 62, 0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8C8D89;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  padding: 4px 8px;
  border-radius: 12px;
}

.nav-item i {
  font-size: 19px;
  margin-bottom: 3px;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--mb-forest);
  font-weight: 700;
}

.nav-item.active i {
  transform: translateY(-2px);
  color: var(--mb-forest);
}

.nav-item:active {
  transform: scale(0.92);
}

/* BADGE NO ÍCONE DA SACOLA */
.cart-badge {
  position: absolute;
  top: 0;
  right: 6px;
  background-color: var(--mb-terracotta);
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
}

/* FEEDBACK TÁCTIL (TOUCH RIPPLE EFFECT) */
.btn-press {
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-press:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* CHIPS DESLIZANTES */
.chips-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  white-space: nowrap;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: white;
  color: var(--mb-graphite);
  border: 1px solid var(--mb-border);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.chip.active {
  background: var(--mb-forest);
  color: white;
  border-color: var(--mb-forest);
  box-shadow: 0 2px 8px rgba(61, 74, 62, 0.25);
}

/* CARDS DE PRODUTOS */
.product-card {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(232, 223, 216, 0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.product-card:active {
  transform: scale(0.98);
}

.product-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #F8F5F2;
  position: relative;
  overflow: hidden;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* MODAIS E BOTTOM SHEETS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(28, 29, 26, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  background: white;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: max(16px, var(--app-safe-bottom));
}

.modal-overlay.open .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background-color: #D1D5DB;
  border-radius: 9999px;
  margin: 10px auto 6px auto;
}

/* BANNER INSTALAÇÃO PWA */
.pwa-banner {
  background: linear-gradient(135deg, var(--mb-forest-dark), var(--mb-forest));
  color: white;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(61, 74, 62, 0.3);
}

/* CRONÔMETRO LUXO */
.timer-pill {
  background: #2E382F;
  color: white;
  font-family: monospace;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}

/* TIPOGRAFIA E LUXO */
.font-serif-mb {
  font-family: 'Playfair Display', Georgia, serif;
}
