/* Arquivo CSS customizado para identidade visual do projeto Django fullstack com Tailwind */

/* Importa Tailwind base, components e utilities */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Cores customizadas conforme identidade visual */
:root {
  --cor-fundo: #FFF6E8;
  --cor-destaque: #F4C6D9;
  --cor-texto-principal: #4E342E;
  --cor-acento-verde: #C1E1C1;
  --cor-acento-lilas: #EADCF4;
}

/* Sobrescreve cores do Tailwind para usar as cores customizadas */
.bg-custom-fundo {
  background-color: var(--cor-fundo);
}

.text-custom-destaque {
  color: var(--cor-destaque);
}

.text-custom-principal {
  color: var(--cor-texto-principal);
}

.bg-custom-verde {
  background-color: var(--cor-acento-verde);
}

.bg-custom-lilas {
  background-color: var(--cor-acento-lilas);
}

/* Estilos para componentes arredondados e leves */
.rounded-2xl {
  border-radius: 1rem;
}

.shadow-md {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.transition-all {
  transition-property: all;
  transition-duration: 300ms;
  transition-timing-function: ease-in-out;
}

.hover\\:scale-105:hover {
  transform: scale(1.05);
}

/* Tipografia arredondada e amigável */
body, button, input, select, textarea {
  font-family: 'Poppins', 'Inter', sans-serif;
}

/* Estilos específicos para o catálogo de produtos */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animações suaves para os cards */
.group:hover .group-hover\\:shadow-lg {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos para botões de ação */
.add-to-list-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Gradientes personalizados */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-blue-50 {
  --tw-gradient-from: #eff6ff;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.to-indigo-50 {
  --tw-gradient-to: #eef2ff;
}

/* ===== ESTILOS RESPONSIVOS PARA MOBILE ===== */

/* Ajustes gerais para mobile */
@media (max-width: 768px) {
  /* Aumentar tamanho de fonte base */
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Aumentar padding e margens para melhor toque */
  .container, .container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  /* Ajustar espaçamentos */
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .mb-5 {
    margin-bottom: 2rem !important;
  }
  
  /* Aumentar tamanho dos botões para mobile */
  .btn {
    padding: 12px 20px !important;
    font-size: 16px !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .btn-lg {
    padding: 16px 24px !important;
    font-size: 18px !important;
    min-height: 56px !important;
  }
  
  /* Ajustar cards para mobile */
  .card {
    margin-bottom: 1rem !important;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  /* Ajustar imagens de produtos */
  .image-container {
    width: 100% !important;
    height: 200px !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: #f8f9fa !important;
  }
  
  .product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    max-width: 100% !important;
    max-height: 100% !important;
  }
  
  /* Ajustar grid para mobile */
  .col-lg-3, .col-lg-4, .col-md-6 {
    margin-bottom: 1rem !important;
  }
  
  /* Ajustar títulos para mobile */
  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  
  h3 {
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
  }
  
  /* Ajustar texto de lead */
  .lead {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
  }
  
  /* Ajustar ícones */
  .fas {
    font-size: 1.2em !important;
  }
  
  /* Ajustar progress bars */
  .progress {
    height: 12px !important;
  }
  
  /* Ajustar inputs e forms */
  input, select, textarea {
    font-size: 16px !important;
    padding: 12px !important;
    min-height: 48px !important;
  }
  
  /* Ajustar navbar para mobile */
  .navbar {
    padding: 1rem !important;
  }
  
  .navbar img {
    height: 60px !important;
    width: auto !important;
  }
  
  /* Ajustar menu mobile */
  #mobile-menu {
    padding: 1rem !important;
  }
  
  #mobile-menu a {
    padding: 12px 16px !important;
    font-size: 16px !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* Ajustar grid de estatísticas */
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  /* Ajustar flex containers */
  .flex-col {
    flex-direction: column !important;
  }
  
  .flex-row {
    flex-direction: row !important;
  }
  
  /* Ajustar espaçamentos de texto */
  .text-center {
    text-align: center !important;
  }
  
  /* Ajustar margens e paddings específicos */
  .p-8 {
    padding: 1.5rem !important;
  }
  
  .px-8 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  .py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  
  .mb-8 {
    margin-bottom: 2rem !important;
  }
  
  .mb-6 {
    margin-bottom: 1.5rem !important;
  }
  
  .mb-4 {
    margin-bottom: 1rem !important;
  }
  
  /* Ajustar tamanhos de fonte específicos */
  .text-3xl {
    font-size: 1.875rem !important;
  }
  
  .text-2xl {
    font-size: 1.5rem !important;
  }
  
  .text-xl {
    font-size: 1.25rem !important;
  }
  
  .text-lg {
    font-size: 1.125rem !important;
  }
  
  /* Ajustar botões específicos */
  .btn-primary, .btn-outline-primary {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* Ajustar flex containers para mobile */
  .d-flex {
    display: flex !important;
  }
  
  .flex-column {
    flex-direction: column !important;
  }
  
  .flex-row {
    flex-direction: row !important;
  }
  
  .justify-content-center {
    justify-content: center !important;
  }
  
  .align-items-center {
    align-items: center !important;
  }
  
  /* Ajustar gaps */
  .gap-3 {
    gap: 0.75rem !important;
  }
  
  .gap-4 {
    gap: 1rem !important;
  }
  
  /* Ajustar rounded corners */
  .rounded-xl {
    border-radius: 0.75rem !important;
  }
  
  .rounded-lg {
    border-radius: 0.5rem !important;
  }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 480px) {
  .container, .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  .btn {
    padding: 14px 16px !important;
    font-size: 16px !important;
  }
  
  .card-body {
    padding: 1rem !important;
  }
  
  .p-8 {
    padding: 1rem !important;
  }
  
  .grid-cols-2, .grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  /* Ajustar imagens para telas muito pequenas */
  .image-container {
    height: 180px !important;
  }
  
  .product-image {
    object-fit: contain !important;
  }
}

/* Melhorar acessibilidade de toque */
@media (hover: none) and (pointer: coarse) {
  /* Aumentar área de toque para botões */
  .btn, a, button {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  /* Aumentar espaçamento entre elementos clicáveis */
  .btn + .btn, a + a, button + button {
    margin-left: 0.5rem !important;
  }
  
  /* Melhorar feedback visual */
  .btn:active, a:active, button:active {
    transform: scale(0.98) !important;
  }
}

/* Otimizações para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .container, .container-fluid {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  
  .btn {
    padding: 10px 18px !important;
    font-size: 15px !important;
  }
  
  .card-body {
    padding: 1.25rem !important;
  }
  
  /* Ajustar imagens para tablets */
  .image-container {
    height: 220px !important;
  }
}

/* Regras específicas para garantir responsividade do menu */
@media (max-width: 767px) {
  /* Menu desktop deve estar oculto em mobile */
  .hidden.md\\:flex {
    display: none !important;
  }
  
  /* Botão mobile deve estar visível */
  .block.md\\:hidden {
    display: block !important;
  }
}

@media (min-width: 768px) {
  /* Menu desktop deve estar visível em desktop */
  .hidden.md\\:flex {
    display: flex !important;
  }
  
  /* Botão mobile deve estar oculto em desktop */
  .block.md\\:hidden {
    display: none !important;
  }
  
  /* Menu mobile deve estar sempre oculto em desktop */
  #mobile-menu {
    display: none !important;
  }
}
