/* Adicione ao final de static/style.css */

/* --- Paleta de Cores e Tema Global --- */
:root {
    --bs-primary: #2D3A8C; /* Azul escuro do fundo */
    --bs-secondary: #F29F05; /* Amarelo/Laranja da logo */
    --bs-light: #F5F5F5; /* Um cinza bem claro para fundos */
    --bs-dark: #1E2749; /* Um tom mais escuro do azul */
    --bs-success: #28a745;
    --bs-danger: #E53935; /* Vermelho da logo */
    --bs-info: #5C6BC0; /* Um azul mais claro para informações */
    --bs-warning: #FDD835; /* Amarelo para avisos */

    /* Sobrescrevendo as cores do Bootstrap */
    --bs-body-color: #333;
    --bs-body-bg: var(--bs-light);
    --bs-link-color: var(--bs-secondary);
    --bs-link-hover-color: #FBC02D; /* Amarelo mais claro no hover */
    --bs-border-color: #dee2e6;
    --bs-border-radius: 0.75rem;
    --bs-box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.05);
}

/* Aplicando a fonte globalmente, se desejar */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Ajustes em botões para usar a nova paleta */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: var(--bs-dark);
    border-color: var(--bs-dark);
}

.btn-secondary {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--bs-link-hover-color);
    border-color: var(--bs-link-hover-color);
}

/* --- Fim do Tema Global --- */


/* New Interactive Modal Styles */
#productDetailModal .modal-content {
    border-radius: 15px;
}

#modal-product-image {
    max-height: 200px;
    width: auto;
    object-fit: cover;
}

#size-options .size-btn {
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
}

#extra-options .form-check {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 10px 15px;
}

.quantity-selector .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.quantity-selector #quantity-display {
    font-size: 1.2rem;
    font-weight: bold;
}

#modalAddToCartBtn {
    padding: 10px 25px;
    font-weight: bold;
}

.dropdown-item .text-muted {
    white-space: normal;
    word-wrap: break-word;
}

#second-flavor-btn {
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
}

#modal-product-name {
    background-color: var(--bs-primary);
    border-radius: 10px;
    font-weight: bold;
    color: white;
    padding: 5px 10px;
    margin-bottom: 15px;
    display: inline-block;
}

.marquee-container {
    font-weight: bold;
    color: white;
}

/* General Body & Layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-bottom: 80px; /* Espaço para o banner de status flutuante */
    background-color: var(--bs-body-bg);
}

.main-content {
    min-height: calc(100vh - 80px); /* Adjust for header only */
}

.banner-container {
    position: sticky;
    top: 70px; /* Position below header */
    width: 100%;
    z-index: 1029; /* Below header, above content */
}

/* Header */
.header-main {
    border-bottom: 1px solid var(--bs-border-color);
}

#store-status-display .status-open {
    color: var(--bs-success);
    font-weight: bold;
}
#store-status-display .status-closed {
    color: var(--bs-danger);
    font-weight: bold;
}
#store-status-display .status-warning {
    color: var(--bs-warning);
    font-weight: bold;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* Hidden by default */
    width: 280px;
    height: 100%;
    background-color: #fff;
    z-index: 1050;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.sidebar-header {
    border-bottom: 1px solid #eee;
}

.sidebar-content .list-group-item {
    border: none;
    padding: 1rem 1.5rem;
}

.sidebar-content .list-group-item:hover {
    background-color: #f8f9fa;
}

.sidebar-content .social-network a {
    color: #6c757d;
}

/* Category Navigation */
.category-nav-sticky {
    position: sticky;
    top: 0; /* Stick to the very top now */
    background-color: var(--bs-light);
    z-index: 1020;
    padding: 0.5rem 0;
}

.category-nav-sticky .nav-pills .nav-link {
    color: #6c757d;
    font-weight: 500;
}

.category-nav-sticky .nav-pills .nav-link.active {
    background-color: var(--bs-primary);
    color: white;
}

/* Product Card */
.product-card {
    border-radius: var(--bs-border-radius);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.product-card .card-img-top {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-card .price-tag {
    color: var(--bs-success);
    font-weight: bold;
}

/* Scrollbar for category nav */
.overflow-auto::-webkit-scrollbar {
    height: 4px;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background-color: var(--bs-primary);
    border-radius: 2px;
}

.overflow-auto::-webkit-scrollbar-track {
    background: #e9ecef;
}

/* Delivery Address Selector */
.delivery-address-selector {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    color: #343a40;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delivery-address-selector:hover {
    background-color: #dee2e6;
}

/* Modal Header with Back Button */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.modal-header .btn-close {
    margin-left: 0.5rem;
}

.modal-header .modal-title {
    flex-grow: 1;
    text-align: center;
}

/* Address Modal Specifics */
#addressModal .modal-dialog {
    max-width: 500px;
}

#addressModal .modal-content {
    border-radius: 15px;
}

#addressModal .modal-body .btn-outline-primary {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

#addressModal .modal-body .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: white;
}

#addressModal .input-group .form-control {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

#addressModal .input-group .btn-primary {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

#addressModal .modal-body hr {
    margin: 1.5rem 0;
}

#addressModal .modal-body .fw-bold {
    color: var(--bs-primary);
}

/* --- NOVO HEADER --- */
.main-header-container {
    position: relative;
    color: white;
    padding: 0; /* Remove padding para colar no topo */
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/background.png');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); 
    z-index: -1;
}

.header-content {
    position: relative;
    z-index: 1;
    padding: 10px 1.5rem; /* Ajustado para corresponder ao container-fluid */
    display: flex;
    align-items: center; /* Centraliza verticalmente o conteúdo */
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Alinha os itens da barra (logo e botão) */
    width: 100%;
}

.store-info {
    display: flex;
    align-items: center;
    flex-grow: 1; /* Permite que o container cresça e ocupe o espaço */
    min-width: 0; /* Essencial para que o text-overflow funcione em flex containers */
}

.logo {
    width: 60px; /* Ajustado para 90px */
    height: 60px; /* Ajustado para 90px */
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid white;
}

.store-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle-btn {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 80%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-status-new {
    font-size: 1.0rem; /* Aumentado */
    display: flex;
    align-items: center;
}

.store-status-new .bi-circle-fill {
    font-size: 0.6rem;
    margin-right: 8px;
}

.store-status-new.status-open {
    color: #32CD32; /* Verde limão */
}

.store-status-new.status-open .bi-circle-fill {
    color: #32CD32;
}

.store-status-new.status-closed {
    color: #FF6347; /* Tomate */
}

.store-status-new.status-closed .bi-circle-fill {
    color: #FF6347;
}

/* --- NOVO SELETOR DE ENDEREÇO --- */
.address-selector-container {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.address-selector-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.address-selector-container i {
    font-size: 1.5rem;
    color: #555;
    margin-right: 15px;
}

.address-selector-container .bi-chevron-right {
    margin-left: auto;
    margin-right: 0;
}

.address-text {
    display: flex;
    flex-direction: column;
}

.address-text .title {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.address-text .subtitle {
    font-size: 0.9rem;
    color: #777;
}

.address-text .free-delivery {
    color: var(--bs-success);
    font-weight: normal;
}

/* --- BANNER DE STATUS DO PEDIDO FLUTUANTE --- */
#customer-order-status-banner {
    position: fixed;
    bottom: 15px; /* Distância da base */
    left: 50%;
    transform: translateX(-50%);
    width: auto; /* Largura se ajusta ao conteúdo */
    max-width: 90%; /* Prevenir que seja muito largo em telas grandes */
    border-radius: 25px; /* Cantos arredondados */
    padding: 10px 20px;
    z-index: 1035;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: bottom 0.5s ease;
}

#customer-order-status-banner:not([style*="display: none"]) {
    display: block !important; /* Garante que seja visível quando não escondido */
}

/* --- BOTÃO FLUTUANTE DO CARRINHO (FAB) E BOTÕES DE AÇÃO --- */
@keyframes gentle-wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* Estilo base para botões de ação com sombra */
#notification-bell-btn,
#install-app-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.cart-fab {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem; /* Tamanho do ícone */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* Sombra mais forte */
    z-index: 1036; /* Acima do banner de status */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* Transição suave */
}

/* Animações */
.cart-fab {
    animation: gentle-wobble 2.5s ease-in-out 1s infinite;
}
#notification-bell-btn {
    animation: gentle-wobble 2.5s ease-in-out 1.5s infinite;
}

/* Efeitos Hover */
.cart-fab:hover,
#notification-bell-btn:hover,
#install-app-btn:hover {
    transform: translateY(-3px);
    animation-play-state: paused; /* Pausa a animação de balanço durante o hover */
}

.cart-fab:hover {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3); /* Sombra mais intensa no hover */
}

#notification-bell-btn:hover,
#install-app-btn:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22); /* Sombra mais intensa no hover */
}

.cart-fab .badge {
    font-size: 0.75rem;
    padding: 0.3em 0.5em;
}

/* --- Page Header for Secondary Pages --- */
.page-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: #fff;
    border-bottom: 1px solid var(--bs-border-color);
}

.page-header-simple .page-title-simple {
    font-size: 1.1rem;
    font-weight: 600;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

body.has-page-header {
    padding-top: 56px; /* Adjust to header height */
}

/* --- NOVOS BOTÕES DE AÇÃO EM MODAIS --- */
.modal-header-content-back {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    color: var(--bs-dark);
    font-weight: bold;
    padding: 0;
}

.modal-header-content-back .icon {
    font-size: 2rem;
}

/* --- ESTILOS DO CARRINHO (cart.html) --- */
.cart-container {
    max-width: 800px;
    margin: auto;
}
.cart-item-card {
    background-color: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--bs-box-shadow);
    display: flex;
    align-items: center;
}
.product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 1rem;
}
.product-details {
    flex-grow: 1;
}
.product-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.product-price {
    font-weight: bold;
    color: var(--bs-success);
    font-size: 1.1rem;
}
.quantity-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}
.quantity-display {
    font-weight: 500;
}
.remove-btn {
    color: var(--bs-danger);
    font-size: 0.9rem;
    text-decoration: none;
}
.total-section {
    background-color: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--bs-box-shadow);
    margin-top: 2rem;
}
.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}
.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #fff;
    border-radius: 15px;
}

.driver-controls {
    display: block !important;
}

/* --- ESTILOS DO CHECKOUT (checkout.html) --- */
.summary-card { 
    background-color: #fff; 
    border: 1px solid var(--bs-border-color); 
    border-radius: var(--bs-border-radius); 
    padding: 1.5rem; 
    box-shadow: var(--bs-box-shadow); 
}
.sticky-top { 
    top: 2rem; 
}

/* Estilo Moderno para Botão Voltar */
.modern-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    color: #333;
    text-decoration: none; /* Remove o sublinhado da tag <a> */
    transition: background-color 0.2s ease-in-out;
}

.modern-back-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
}

.modern-back-button .icon {
    font-size: 2rem; /* Ajuste o tamanho do ícone se necessário */
}


.step-card {
    background-color: #fff;
    border-radius: var(--bs-border-radius);
    border: 1px solid var(--bs-border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--bs-box-shadow);
}

.step-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.form-check-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 100%;
}

.form-check-input:checked + .form-check-label {
    background-color: #e7f1ff;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(45, 58, 140, 0.25);
}

.form-check-label i {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
    color: var(--bs-dark);
}

.form-check-input:checked + .form-check-label i {
    color: var(--bs-primary);
}

#address-validation-message, #schedule-validation-message { 
    margin-top: 0.5rem; 
    font-weight: 500; 
    min-height: 24px; 
}

#change-input-group { 
    display: none; 
}

.delivery-fee-free { 
    color: var(--bs-success); 
    font-weight: bold; 
    text-transform: uppercase; 
}

/* Loading Overlay Styles */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Fundo branco semi-transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Garante que fique acima de tudo */
}

#loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Estilos para o contêiner de mensagens flash global */
#flash-message-container {
    position: fixed;
    top: 20px; /* Distância do topo */
    left: 50%;
    transform: translateX(-50%);
    width: auto; /* Largura se ajusta ao conteúdo */
    max-width: 90%; /* Prevenir que seja muito largo em telas grandes */
    padding: 15px 25px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10000; /* Garante que fique acima de outros elementos, incluindo overlays */
    display: none; /* Escondido por padrão */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#flash-message-container.show {
    opacity: 1;
}

#flash-message-container.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

#flash-message-container.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

#flash-message-container.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

#flash-message-container.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Estilos para o card-header e accordion-button na página admin.html */
.card-header, .accordion-button {
    color: white !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Estilos para os botões do Accordion (customer.html) */
.accordion-button {
    background-color: var(--bs-dark) !important; /* Cor escura da paleta global */
    color: #fff !important; /* Cor do texto clara */
    border-color: var(--bs-dark) !important;
}

.accordion-button:focus {
    background-color: var(--bs-dark) !important;
    color: #fff !important;
    border-color: var(--bs-dark) !important;
    box-shadow: 0 0 0 0.25rem rgba(30, 39, 73, 0.25) !important; /* Sombra com base na cor escura */
}

.accordion-button.collapsed {
    background-color: var(--bs-dark) !important;
    color: #fff !important;
    border-color: var(--bs-dark) !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bs-dark) !important;
    color: #fff !important;
    border-color: var(--bs-dark) !important;
}