/* Estilos Gerais do Cardápio Digital (TikTok/Shorts Style) */

:root {
  --theme-color: #ff4757;
  --theme-color-rgb: 255, 71, 87;
  --bg-dark: #000000;
  --text-light: #ffffff;
  --font-family: 'Outfit', sans-serif;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: #050409;
  color: var(--text-light);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Simulador Desktop */
.app-simulator {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .app-simulator {
    background: radial-gradient(circle at 50% 50%, #151226 0%, #06050b 100%);
  }
  
  .phone-frame {
    position: relative;
    width: 393px;
    height: 852px; /* iPhone 14 Pro Ratio */
    border-radius: 44px;
    border: 11px solid #1c1c1e;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 3px #2c2c2e;
    overflow: hidden;
    background-color: #000;
  }
  
  /* Notch (Ilha Dinâmica simulada) */
  .phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 28px;
    background-color: #1c1c1e;
    border-radius: 20px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .phone-notch::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: #0c2461;
    border-radius: 50%;
    margin-left: 60px;
    opacity: 0.4;
  }
}

@media (max-width: 767px) {
  .phone-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .phone-notch {
    display: none;
  }
}

/* Container de Slides Verticais */
.shorts-container {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  background-color: #000;
  position: relative;
}

.shorts-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Slide de Vídeo */
.slide {
  position: relative;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background-color: #000;
}

/* Wrapper do Iframe do YouTube */
.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #000;
  overflow: hidden;
}

/* Capa/Thumbnail do Prato antes de carregar o vídeo */
.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 2;
  transition: opacity 0.5s ease;
}

.video-thumbnail.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Sombreamento para Legibilidade (Gradientes) */
.overlay-shadow-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0) 100%);
  z-index: 3;
  pointer-events: none;
}

.overlay-shadow-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 3;
  pointer-events: none;
}

/* Cabeçalho do Restaurante */
.slide-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 35px 20px 20px 70px; /* Recuo para acomodar botão voltar */
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

/* Ajuste do topo caso esteja no simulador */
@media (min-width: 768px) {
  .slide-header {
    padding-top: 45px;
  }
}

.restaurant-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.restaurant-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--theme-color);
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.restaurant-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Overlay de Conteúdo de Texto (Nome, Preço, Descrição) */
.overlay-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 85px 35px 20px; /* Espaço para botões laterais */
  z-index: 4;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.category-tag {
  display: inline-block;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.dish-name {
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.dish-description {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.dish-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Botões de Ações Flutuantes (Direita) */
.side-actions {
  position: absolute;
  right: 15px;
  bottom: 45px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.action-btn {
  background: rgba(28, 28, 30, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.action-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: fill 0.2s;
}

.action-btn:hover {
  transform: scale(1.08);
  background: rgba(28, 28, 30, 0.7);
}

.action-btn:active {
  transform: scale(0.92);
}

.action-label {
  font-size: 10px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Curtidas */
.action-btn.like-btn.liked {
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.4);
  background: rgba(255, 71, 87, 0.15);
  animation: heartBeat 0.3s ease-in-out;
}

/* WhatsApp */
.action-btn.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: none;
  color: #fff;
}

.action-btn.whatsapp-btn:hover {
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  35% { transform: scale(1.3); }
  65% { transform: scale(0.85); }
  100% { transform: scale(1); }
}

/* Controle de Volume Superior */
.volume-control-overlay {
  position: absolute;
  top: 35px;
  right: 20px;
  z-index: 5;
  background: rgba(28, 28, 30, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .volume-control-overlay {
    top: 45px;
  }
}

.volume-control-overlay:hover {
  background: rgba(28, 28, 30, 0.7);
  transform: scale(1.05);
}

.volume-control-overlay svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Overlay de Carregamento Geral */
.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #050409;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 71, 87, 0.1);
  border-radius: 50%;
  border-top-color: var(--theme-color);
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 14px;
  color: #a4b0be;
  font-weight: 500;
}

/* Botão Voltar para Tela Inicial */
.back-to-home-btn {
  position: absolute;
  top: 35px;
  left: 20px;
  z-index: 10;
  background: rgba(28, 28, 30, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
  text-decoration: none;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .back-to-home-btn {
    top: 45px;
  }
}

.back-to-home-btn:hover {
  background: rgba(28, 28, 30, 0.7);
  transform: scale(1.05);
}

.back-to-home-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Tela Inicial de Categorias */
.home-screen {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 10%, #17142b 0%, #06050b 100%);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 10;
  position: relative;
}

.home-screen::-webkit-scrollbar {
  display: none;
}

/* Brand Header */
.home-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: center;
}

.home-logo-small {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--theme-color);
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.home-title-small {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.home-welcome-section {
  text-align: center;
  margin-bottom: 35px;
}

.home-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.categories-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.category-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Botões com cor do tema do restaurante */
.category-card.theme-btn {
  background: rgba(var(--theme-color-rgb), 0.06);
  border: 1.5px solid rgba(var(--theme-color-rgb), 0.25);
}

.category-card.theme-btn:hover {
  transform: translateY(-2px);
  background: rgba(var(--theme-color-rgb), 0.15);
  border-color: var(--theme-color);
  box-shadow: 0 6px 20px rgba(var(--theme-color-rgb), 0.2);
}

.category-card:active {
  transform: translateY(0);
}

.category-card-name {
  font-size: 14px;
  font-weight: 700;
}

.category-card-arrow {
  color: var(--theme-color);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s;
}

.category-card:hover .category-card-arrow {
  transform: translateX(4px);
}

.category-card.all-card {
  background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.12) 0%, rgba(var(--theme-color-rgb), 0.03) 100%);
  border: 1.5px solid rgba(var(--theme-color-rgb), 0.2);
  margin-top: 8px;
}

.category-card.all-card:hover {
  background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.22) 0%, rgba(var(--theme-color-rgb), 0.06) 100%);
  border-color: var(--theme-color);
  box-shadow: 0 6px 20px rgba(var(--theme-color-rgb), 0.25);
}

.category-card.all-card .category-card-arrow {
  color: #fff;
}
