/* assets/css/estilo.css */

/* Import Google Font - Zrnic */
@import url('https://fonts.googleapis.com/css2?family=Zrnic&display=swap');

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #343a40; /* Cor de texto padrão mais escura */
}

/* Global style for the brand name */
.app-brand-name {
    font-family: 'Zrnic', sans-serif;
    text-transform: lowercase; /* Garante que o texto seja exibido em minúsculas */
    /* Base size - será sobrescrito em contextos específicos */
    font-size: 1.5rem; /* Um bom tamanho base para navegação */
}

/* Tamanho específico para a página de login (200% maior que o padrão de texto, ou seja, bem grande) */
.login-image-section .app-brand-name {
    font-size: 4.5rem; /* Exemplo: 3x o tamanho base, ajuste conforme necessário */
    line-height: 1; /* Para evitar espaçamento excessivo */
}

/* Tamanho específico para as páginas internas do admin (80% maior que o padrão na navbar) */
.navbar-brand .app-brand-name {
    font-size: 2.25rem; /* 1.5rem * 1.8 = 2.7rem, ajustado para 2.25rem para visual melhor */
}

.menu-header-logo-circle{
  border: 5 !important;
  padding: 2 !important; /* remove o “aro” criado pelo padding + border */
  position: absolute;
  top: 40px;                   /* ajuste fino */
  left: 50%;
  transform: translateX(-50%);
  margin: 0 !important;
  z-index: 3;
}
/* Sidebar admin */
.sidebar-admin .btn,
.sidebar-admin .nav-link {
  font-size: 0.9rem !important;
}

.sidebar-admin nav > p.text-uppercase.text-muted.small {
  margin-top: 0.35rem !important;
  margin-bottom: 0.15rem !important;
}

.sidebar-admin nav .mb-3 {
  margin-bottom: 0.35rem !important;
}

.sidebar-admin nav ul.nav.nav-pills.flex-column.mb-3 {
  margin-bottom: 0.25rem !important;
}

.sidebar-admin .btn.btn-sm.w-100 {
  padding-top: 0.30rem !important;
  padding-bottom: 0.30rem !important;
}

.sidebar-admin .nav > .nav-item > .nav-link {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

.sidebar-admin .nav-link.text-white-50:hover,
.sidebar-admin .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
}

.sidebar-admin .btn-outline-light:hover,
.sidebar-admin .btn-outline-light:focus {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-admin .nav-link.active {
  background: linear-gradient(135deg, #0d6efd, #6610f2);
  color: #ffffff !important;
}

.sidebar-admin a {
  text-decoration: none;
}

.sidebar-admin .btn .fa-chevron-down {
  color: inherit;
}

/* Header index.php */
.cardapio-header {
  position: relative;
  width: 100%;
  height: 300px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.cardapio-header-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardapio-header-logo img {
  max-height: 120px;
  max-width: 80%;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.preview-header {
  border-radius: 0 0 0.75rem 0.75rem;
  overflow: hidden;
}

.text-shadow {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .cardapio-header {
    height: 200px;
  }
  .cardapio-header-logo img {
    max-height: 110px;
  }
}

/* ==================================================================== */
/* NOVOS ESTILOS PARA index.php (MENU DO CLIENTE) */
/* ==================================================================== */

/* Layout principal Full Screen */
.customer-menu-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden; /* Evita barra de rolagem horizontal */
}

/* Seção do Formulário de Pedidos (esquerda - 30% / mobile full) */
.menu-left-section{
    flex: 1 1 auto;              /* deixa de ser 30% e passa a ocupar o espaço */
    background-color: #f8f9fa;
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: none;            /* opcional: remove a “divisão” com a direita */
    z-index: 1020;
}

/* NOVO: Wrapper para centralizar o conteúdo do menu esquerdo */
.menu-content-wrapper{
    max-width: 1530px;           /* 900 * 1.7 = 1530 (70% maior) */
    width: 100%;
    margin: 0 auto;              /* garante centralização */
}

/* Seção da Imagem de Fundo (direita - 70% / mobile escondida) */
.menu-right-section {
    flex: 1; /* Ocupa o restante do espaço */
    /* CLAREADO: Opacidade do gradiente reduzida para deixar o fundo mais claro */
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('assets/img/restaurant_background.jpg') center center no-repeat;
    background-size: cover;
    background-color: #f8f9fa; /* Cor de fundo mais clara para preencher qualquer micro-vazamento */
    display:none;
    flex-direction: column;
    justify-content: flex-start; /* Alinha conteúdo ao topo */
    align-items: center;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Header com Logo e Info do Restaurante */
.menu-restaurante-header{
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  padding-top: 170px;          /* reserva espaço p/ o logo sobreposto (ajuste fino) */
  min-height: 270px; /* 180px * 1.5 */
}

.menu-restaurante-header-overlay{
  position: absolute;
  inset: 0;                          /* ocupa 100% do header */
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.35);/* mais transparente (ajuste fino) */
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
}

.menu-header-logo-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%; /* Torna a imagem circular */
    object-fit: cover; /* Garante que a imagem preencha o círculo */
    border: 5px solid #ffffff; /* Borda colorida */
    padding: 0px; /* Espaçamento interno */
    margin-bottom: 1rem;
    box-shadow: 0 0.40rem 0.5rem rgba(0,0,0,0.1);
}

.menu-header-info {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Carrossel de Categorias */
.category-carousel {
    width: 100%;
    margin-bottom: 2rem;
    overflow-x: auto; /* Permite scroll horizontal */
    white-space: nowrap; /* Impede que os itens quebrem linha */
    -webkit-overflow-scrolling: touch; /* Melhor scroll em iOS */
    scrollbar-width: none; /* Esconde a barra de rolagem no Firefox */
}
.category-carousel::-webkit-scrollbar {
    display: none; /* Esconde a barra de rolagem no Webkit */
}

.category-carousel-item {
    display: inline-block; /* Permite que os itens fiquem na mesma linha */
    text-align: center;
    margin-right: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
.category-carousel-item:last-child {
    margin-right: 0;
}
.category-carousel-item:hover {
    transform: translateY(-5px); /* Efeito de "levantar" ao passar o mouse */
}

.category-carousel-item img {
    width: 120px;          /* 80 * 1.5 = 120 */
    height: 120px;         /* 80 * 1.5 = 120 */
    border-radius: 50%;
    object-fit: cover;
    border: none !important;      /* sem borda */
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.1);
}

.category-carousel-item .category-name {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #343a40;
    white-space: normal; /* Permite que o nome da categoria quebre linha se for longo */
    max-width: 140px;
}

/* Grid de Produtos */
.product-grid-section {
    width: 100%;
    padding-top: 1rem;
}

.product-card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    border-radius: 0.75rem;
    transition: transform 0.2s ease-in-out;
}
.product-card:hover {
    transform: translateY(-3px);
}

.product-card img {
    height: 250px; /* 90px * 1.7 = 153px */
    width: 100%;
    object-fit: cover;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.product-card-body {
    padding: 1rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    height: 3.2rem; /* Limita a descrição a 2 linhas */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Propriedade WebKit */
    line-clamp: 2; /* Propriedade padrão para compatibilidade */
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.68rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 1rem;
}

/* Offcanvas (Sacola de Pedidos) */
.offcanvas-header {
    background-color: #0d6efd;
    color: white;
}
.offcanvas-header .offcanvas-title {
    color: white;
}
.offcanvas-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* Ícone branco */
}

.offcanvas-cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px dashed #dee2e6;
    padding-bottom: 1rem;
}
.offcanvas-cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.offcanvas-cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-right: 0.75rem;
}
.offcanvas-cart-item-details {
    flex-grow: 1;
}
.offcanvas-cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.offcanvas-cart-item-price {
    font-size: 0.8rem;
    color: #6c757d;
}
.offcanvas-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.offcanvas-cart-total {
    border-top: 2px solid #0d6efd;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Botão flutuante da sacola */
.floating-cart-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
    z-index: 1030; /* Acima do offcanvas e outros elementos */
    transition: background-color 0.2s ease-in-out;
}
.floating-cart-btn:hover {
    background-color: #0b5ed7; /* Tom mais escuro no hover */
}

/* Badge de contagem de itens na sacola */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545; /* Cor vermelha para destaque */
    color: white;
    border-radius: 50%;
    padding: 0.2em 0.5em;
    font-size: 0.7rem;
    line-height: 1;
    min-width: 1.5em; /* Garante que o círculo seja visível mesmo com 1 dígito */
    text-align: center;
    box-shadow: 0 0 0 2px white; /* Borda branca para destacar do fundo */
}


/* Responsividade para o layout principal do menu */
@media (max-width: 991.98px) { /* breakpoint md do Bootstrap */
    html, body{
        height: 100%;
    }
    .customer-menu-wrapper{
        overflow-y: auto;     /* permite scroll vertical */
        overflow-x: hidden;
        min-height: 100vh;
        height: 100vh;        /* garante que o wrapper tenha altura fixa p/ scroll */
    }
    .menu-left-section{
        overflow-y: auto;     /* scroll do conteúdo */
        -webkit-overflow-scrolling: touch;
        height: 100vh;        /* garante área rolável */
    }
    /* Título "Categorias" (h2 usado antes do carrossel) */
    h2.h5.fw-bold.mb-3{
        font-size: 2.5rem; /* 1.666rem (h5) * 1.5 ≈ 2.5rem */
        line-height: 1.15;
    }

    /* Nomes das categorias (texto abaixo do ícone no carrossel) */
    .category-carousel-item .category-name{
        font-size: 1.575rem; /* 1.05rem * 1.5 */
        line-height: 1.15;
    }
    .menu-left-section {
        flex: 1 1 100%; /* Ocupa 100% da largura em telas menores */
        box-shadow: none; /* Remove sombra */
        padding: 1rem;
    }
    .menu-right-section {
        display: none; /* Esconde a imagem de fundo em telas menores */
    }
    .menu-restaurante-header {
        text-align: left; /* Alinha o header à esquerda em mobile */
        display: flex;
        align-items: center;
        gap: 1rem;
        padding-top: 170px;        /* ajuste fino mobile */
        min-height: 240px; /* 160px * 1.5 */
    }
    .menu-restaurante-header .text-center {
        text-align: left !important;
    }
    .menu-restaurante-header .menu-header-logo-circle {
        margin-bottom: 0;
        width: 200px;
        height: 200px;
    }
    .menu-header-logo-circle{
        top: 18px;
    }
    .menu-restaurante-header-overlay{
        background: rgba(255,255,255,0.42);
        gap: 14px;
        padding: 14px;
    }
    .product-grid-section .row > * {
        width: 50%; /* 2 produtos por linha em mobile */
    }
    .floating-cart-btn {
        width: 150px;       /* 50px * 3 */
        height: 150px;      /* 50px * 3 */
        font-size: 4.5rem;  /* 1.5rem * 3 */
        bottom: 15px;
        right: 15px;
    }
    .cart-badge{
        width: 50px;              /* ajuste fino: aumente/diminua aqui */
        height: 50px;
        padding: 0;               /* remove padding que “ovala” */
        border-radius: 50%;
        display: grid;
        place-items: center;      /* centraliza o número */
        font-size: 1.8rem; /* 1.2rem * 1.5 = 50% maior */
        line-height: 1;
        min-width: 0;             /* anula o min-width antigo */
        top: -9px;
        right: -9px;
    }
    .add-to-cart-btn i {
        font-size: 3em; /* ~300% */
        line-height: 1;
    }
    .product-price{
        font-size: 3.75rem; /* 1.25rem * 3 = 3.75rem (300%) */
        line-height: 1.05;
    }
    .product-name{
        font-size: 2.475rem; /* 1.65rem * 1.5 */
        line-height: 1.15;
    }

    .product-description{
        font-size: 1.275rem; /* 0.85rem * 1.5 = 1.275rem (150%) */
        line-height: 1.25;
        height: auto;                 /* deixa a descrição crescer no mobile */
        -webkit-line-clamp: unset;    /* remove limite de linhas no mobile */
        line-clamp: unset;
    }
        .category-carousel{
        overflow-x: auto;              /* garante scroll horizontal */
        overflow-y: hidden;
        flex-wrap: nowrap;             /* impede quebra de linha */
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;         /* Firefox */
    }
    .category-carousel::-webkit-scrollbar{ display:none; } /* Chrome/Safari */

    .category-carousel-item{
        display: inline-flex;          /* mantém em linha e centraliza conteúdo */
        flex-direction: column;
        align-items: center;
        margin-right: 1.5rem;
    }

    .category-carousel-item img{
        width: 180px;                  /* 120px * 1.5 = 180px (50% maior no mobile) */
        height: 180px;
        border: none !important;
    }
    .category-carousel-item .category-name{
        font-size: 1.8rem; /* 1.575rem * 1.35 */
        line-height: 1.15;
    }
    /* largura do painel (padrão bootstrap é ~400px). Aqui fica ~50% maior */
  .offcanvas.offcanvas-end{
        --bs-offcanvas-width: min(90vw, 690px); /* 600px * 1.15 = 690px */
  }
    /* cabeçalho */
    .offcanvas-header{
        padding: 1.5rem 1.5rem;
    }
    .offcanvas-title{
        font-size: 1.8rem;
        line-height: 1.1;
    }
    .offcanvas-header .btn-close{
        transform: scale(1.6);
    }

    /* corpo */
    .offcanvas-body{
        padding: 1.5rem 1.5rem;
    }

    /* itens */
    .offcanvas-cart-item{
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }
    .offcanvas-cart-item-img{
        width: 90px;
        height: 90px;
        border-radius: 0.75rem;
    }
    .offcanvas-cart-item-name{
        font-size: 1.875rem; /* 1.25rem * 1.5 */
        line-height: 1.15;
    }

    .offcanvas-cart-item-price{
        font-size: 1.65rem; /* 1.1rem * 1.5 */
        line-height: 1.15;
    }
    /* botões e controles */
    .offcanvas-cart-item-actions .btn{
        font-size: 1.1rem;
        padding: 0.6rem 0.85rem;
    }
    .offcanvas-cart-item-actions .input-group{
        width: 150px !important;
    }
    .offcanvas-cart-item-actions .input-group .btn,
    .offcanvas-cart-item-actions .input-group .form-control{
        font-size: 1.1rem;
        padding: 0.6rem 0.75rem;
    }
    /* Subtotal: maior que o restante */
    .offcanvas-cart-total{
        font-size: 3rem; /* 2rem * 1.5 */
        font-weight: 800;
    }
    /* botões do rodapé (finalizar/continuar) */
    .offcanvas-cart-footer .btn{
        font-size: 2rem;          /* 1.25rem * 2 */
        padding: 1.3rem 1.43rem;    /* 1rem/1.1rem * 1.3 (altura ~30% maior) */
    }
    .offcanvas-cart-footer .btn i{
        font-size: 1.3em; /* 2em * 0.65 = 35% menor */
    }
    /* aumenta o espaçamento entre os botões */
    .offcanvas-cart-footer .d-grid.gap-2{
        gap: 1.25rem !important;
    }
}

@media (min-width: 992px) {
    /* 5 produtos por linha em desktop */
    .product-grid-section .row > * {
        width: 20%;
        flex: 0 0 auto;
    }
}

.loja-card{ border: 1px solid #e9ecef; border-radius: 12px; overflow: hidden; }
.loja-card:hover{ border-color:#0d6efd; }

.loja-context-bar{
  flex-wrap: wrap;
}

@media (max-width: 991.98px){
  .loja-context-bar{
    justify-content: flex-start !important; /* em mobile fica melhor à esquerda */
  }
  .loja-whatsapp-btn i{
    font-size: 1.3em;
  }
}

.loja-distancia{
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.loja-card-best{
  border: 3px solid #0d6efd !important;
  box-shadow: 0 0.75rem 2rem rgba(13,110,253,0.25) !important;
  transform: translateY(-2px);
}

.loja-card-best .loja-distancia{
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(13,110,253,0.12);
  color: #0d6efd;
}

.loja-card-best::after{
  content: "Mais próxima";
  position: absolute;
  top: 12px;
  left: 12px;
  background: #0d6efd;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

/* garante posicionamento do selo */
.loja-card{
  position: relative;
}

/* Mobile: aumentar modal de lojas (texto/botões/cards) + barra de contexto da loja */

@media (max-width: 991.98px){

  /* ===== MODAL ESCOLHER LOJA ===== */
  #modalEscolherLoja .modal-dialog{
    max-width: 96vw;
    margin: 0.75rem auto;
  }

  #modalEscolherLoja .modal-content{
    border-radius: 16px;
  }

  #modalEscolherLoja .modal-header{
    padding: 1.25rem 1.25rem;
  }
  #modalEscolherLoja .modal-title{
    font-size: 2rem;
    line-height: 1.1;
  }
  #modalEscolherLoja .modal-header .btn-close{
    transform: scale(1.4);
  }

  #modalEscolherLoja .modal-body{
    padding: 1.25rem 1.25rem 1.5rem;
  }

  /* texto “Para sugerir...” */
  #modalEscolherLoja .modal-body .text-muted.small{
    font-size: 1.15rem !important;
    line-height: 1.2;
  }

  /* botão “Usar minha localização” */
  #btnUsarLocalizacao{
    font-size: 1.35rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
  }

  /* bloco de status (coords/endereço detectado) */
  #geoStatus{
    font-size: 1.15rem;
    border-radius: 14px;
  }

  /* cards das lojas */
  #modalEscolherLoja .loja-card .card-body{
    padding: 1.1rem;
  }
  #modalEscolherLoja .loja-card .fw-bold{
    font-size: 1.5rem;
    line-height: 1.15;
  }
  #modalEscolherLoja .loja-card .text-muted.small{
    font-size: 1.15rem !important;
    line-height: 1.2;
  }
  #modalEscolherLoja .loja-card img.card-img-top{
    height: 220px !important;
  }
  #modalEscolherLoja .loja-distancia{
    font-size: 1.25rem;
    font-weight: 800;
  }

  /* ===== BARRA "Você está navegando..." + botões ===== */
  .loja-context-bar .text-muted.small{
    font-size: 1.35rem !important;
    line-height: 1.2;
  }

  .loja-context-bar .btn{
    font-size: 1.35rem;
    padding: 0.85rem 1.05rem;
    border-radius: 12px;
  }

  .loja-whatsapp-btn i{
    font-size: 1.4em; /* ícone maior dentro do botão */
  }
}

/* Badges nos cards de produto */
.product-media{ position: relative; }

.product-badges-top-left{
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.product-badges-right{
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.product-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.product-badge-icon{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* Mobile: ícones maiores para legibilidade */
@media (max-width: 991.98px){
  .product-badge{ font-size: 1.1rem; padding: 8px 12px; }
  .product-badge-icon{ width: 48px; height: 48px; font-size: 1.2rem; }
}
