/* =========================
   RESET GLOBAL
   ========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", Helvetica, sans-serif;
  background-color: #FFF2DE;
  color: #000;
}

/* =========================
   HEADER - Logo, Back e Carrinho
   ========================= */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px 20px;
  position: relative;
  z-index: 10;
}

/* Botão Voltar (Geral) */
.back-button {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 38px; /* AUMENTADO: de 16px para 18px */
  font-weight: 500;
  color: #780000;
  position: absolute;
  left: 20px; 
  top: 50%;
  transform: translateY(-50%);
  transition: color 0.3s;
}

.back-button:hover {
    color: #ff0000;
}

.back-button-arrow {
  font-size: 32px; /* AUMENTADO: de 20px para 24px */
  color: #780000;
}

.back-button:hover .back-button-arrow {
    color: #ff0000;
}

/* Logo centralizada com link */
.logo-button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 20px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-button img {
  width: 325px;
  max-width: 80vw;
  height: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-button img:hover {
  transform: scale(1.05);
  filter: brightness(0.7);
}


/* Carrinho - Posicionado à direita */
.cart-icon {
  width: 40px;
  height: auto;
  cursor: pointer;
  z-index: 2;
  position: absolute;
  right: 20px; 
}

/* =========================
   Título Cardápio
   ========================= */
.title-cardapio {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin: 5px 0 40px 0;
  color: #780000;
}

/* =========================
   LAYOUT DA PÁGINA HOME (Horizontal Scroll / Carrossel)
   ========================= */

.category-section {
    padding: 0 20px;
}

.category-title-home {
  font-size: 28px;
  font-weight: 600;
  color: #780000;
  text-align: left;
  width: 100%;
  padding: 10px 0 10px 0;
  margin-top: 20px;
  border-bottom: 2px solid #780000;
  cursor: pointer;
}

/* Configuração do Carrossel Horizontal */
.product-grid {
    display: flex; /* Altera de grid para flex para rolagem horizontal */
    overflow-x: auto; /* Habilita a rolagem lateral quando o conteúdo for maior */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; 
    /* AJUSTE AQUI: Espaçamento de 15px (um dedo) */
    gap: 15px; 
    padding: 20px 0;
    margin-bottom: 40px;
    /* Opcional: remover a barra de rolagem padrão para uma aparência mais limpa */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    
    /* --- Adicionado para Arrastar com o Mouse --- */
    cursor: grab; /* Indica que o elemento é arrastável */
    user-select: none; /* Previne seleção de texto ao arrastar */
    /* ------------------------------------------- */
}

/* Adicionado para dar feedback visual ao arrastar */
.product-grid.active-dragging {
    cursor: grabbing;
}

/* Oculta a barra de rolagem no Chrome/Safari/Opera */
.product-grid::-webkit-scrollbar {
    display: none; 
}

.product-item {
    display: flex;
    flex-direction: column;
    align-items: center; 
    cursor: pointer;
    transition: transform 0.2s ease;
    text-align: center;
    width: 200px; 
    /* Essencial: Impede que o item diminua no flexbox */
    flex-shrink: 0; 
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item img {
    width: 200px; 
    height: 200px; 
    object-fit: cover; 
    border-radius: 8px;
    margin-bottom: 10px;
    transition: box-shadow 0.3s;
    border: 3px solid #780000; 
}

.product-item:hover img {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.product-name {
    margin-top: 5px;
    font-weight: 600;
    color: #780000;
    text-align: center;
    width: 100%;
    font-size: 16px;
}

.product-price {
    margin-top: 2px;
    font-size: 14px;
    color: #000;
    text-align: center;
    width: 100%;
}


/* =========================
   PÁGINA DE DETALHE DO PRODUTO
   ========================= */
.product-detail-page {
    padding-bottom: 80px;
}

.product-detail-content {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    padding: 50px 80px;
}

.product-image-container {
    flex-shrink: 0;
}

.detail-image {
    /* Imagem de detalhe grande e quadrada */
    width: 450px;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.product-info-container {
    flex-grow: 1;
}

.detail-name {
    font-size: 48px;
    font-weight: 700;
    color: #780000;
    margin-bottom: 10px;
}

.detail-price {
    font-size: 28px;
    font-weight: 600;
    color: #000;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #780000;
}

.detail-description {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 40px;
}

.add-to-cart-button {
    background: #780000;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart-button:hover {
    background: #ff0000;
}

/* =========================
   PÁGINA DE CATEGORIA (Lista Vertical)
   ========================= */
.category-products-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.category-product-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border-bottom: 1px dashed #78000050;
    cursor: pointer;
}

.category-product-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #780000;
    flex-shrink: 0;
}

.category-product-info {
    font-size: 18px;
}

.category-product-info strong {
    color: #780000;
    font-weight: 600;
}

/* =========================
   RESPONSIVIDADE
   ========================= */
@media (max-width: 1200px) {
    /* Mantemos as configurações do carrossel no mobile/tablet, pois ele já é responsivo */
    .product-grid {
        gap: 15px; 
        padding: 20px;
    }
    .product-detail-content {
        flex-direction: column;
        align-items: center;
        padding: 40px;
    }
    .detail-image {
        width: 100%;
        max-width: 400px;
        height: 400px;
    }
    .detail-name {
        font-size: 36px;
        text-align: center;
        margin-top: 20px;
    }
    .detail-price {
        font-size: 24px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .product-item {
        width: 150px; /* Reduz um pouco o item no mobile para caber mais */
    }
    .product-item img {
        width: 150px;
        height: 150px;
    }
    .logo-button img { width: 200px; }
    .cart-icon { width: 30px; }
    .detail-description {
        font-size: 16px;
    }
}