/* Estilos personalizados para o sistema de delivery */

:root {
    --primary-color: #ff6b35;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #8B4513;
    --light-color: #f8f9fa;
    --brand-orange: #ff6b35;
    --brand-red: #dc2626;
    --brand-brown: #8B4513;
}

/* Estilos para campos obrigatórios */
.sabor-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
}

.sabor-item:hover {
    border-color: var(--brand-orange);
    background-color: #fff5f0;
}

.sabor-item .form-check-input:checked + .form-check-label {
    color: var(--brand-orange);
    font-weight: 600;
}

.sabor-item .form-check-input:checked {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.sabor-item .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

/* Indicador de campo obrigatório */
.text-danger {
    font-weight: bold;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 0;
    margin: 0;
}

/* Navbar */
.navbar {
    margin-bottom: 0;
}

.navbar + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-red) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.hero-image {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Cards de Produtos */
.produto-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    z-index: 50;
}

.produto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.produto-card .card-img-top {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 0;
}

.produto-card .card-body {
    padding: 1.5rem;
}

/* Botões */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

.btn-primary {
    background: linear-gradient(45deg, var(--brand-orange), var(--brand-red));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--brand-red), var(--brand-orange));
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, var(--brand-orange));
    border: none;
    color: #000;
    font-weight: 600;
}

.btn-warning:hover {
    background: linear-gradient(45deg, var(--brand-orange), #ffc107);
    transform: translateY(-2px);
    color: #000;
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #20c997);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(45deg, #20c997, var(--success-color));
    transform: translateY(-2px);
}

/* Filtros de Categoria */
.categoria-filter {
    margin: 0.25rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.categoria-filter.active {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
}

.categoria-filter:hover {
    transform: translateY(-2px);
}

/* Carrinho */
#carrinho-count {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.75rem;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.carrinho-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.carrinho-item:last-child {
    border-bottom: none;
}

.carrinho-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #eee;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #eee;
    border-radius: 0 0 15px 15px;
}

/* Adicionais */
.adicional-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.adicional-item:hover {
    border-color: var(--brand-orange);
    background-color: #fff5f0;
}

.adicional-item.selected {
    border-color: var(--brand-orange);
    background-color: #ffe4d6;
}

/* Sabores Fracionados */
.sabor-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sabor-item:hover {
    border-color: var(--brand-orange);
    background-color: #fff5f0;
}

.sabor-item.selected {
    border-color: var(--brand-red);
    background-color: #fef2f2;
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .produto-card {
        margin-bottom: 1rem;
    }
    
    .categoria-section {
        padding-top: 1rem;
    }
    
    .categoria-section h3 {
        font-size: 1.5rem;
    }
    
    .categoria-indicator {
        padding: 0.5rem 0;
    }
    
    .categoria-indicator span {
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .categorias-section {
        top: 60px;
        padding: 0.75rem 0;
    }
    
    .categoria-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .categorias-container {
        gap: 0.3rem;
    }
    
    .categoria-section {
        scroll-margin-top: 140px;
    }
    
    #destaques {
        scroll-margin-top: 140px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 60px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Correções específicas para telas muito pequenas */
    .mobile-cart-whatsapp-action {
        min-width: 100px;
        flex-shrink: 0;
    }
    
    .mobile-cart-order-btn {
        min-width: 100px;
        font-size: 0.7rem;
        padding: 8px 10px;
    }
    
    .mobile-cart-whatsapp-info {
        flex: 1;
        min-width: 0;
    }
    
    .mobile-cart-text {
        font-size: 0.8rem;
    }
    
    .mobile-cart-label {
        font-size: 0.8rem;
    }
    
    .mobile-cart-price {
        font-size: 0.7rem;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    color: #856404;
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    color: rgba(255,255,255,0.9) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

/* Seção de Categorias - Estilo Landing Page */
.categorias-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 76px;
    z-index: 998;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.categorias-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

.categorias-container::-webkit-scrollbar {
    height: 4px;
}

.categorias-container::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.categorias-container::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

.categorias-container::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.categoria-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    color: #6c757d;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: fit-content;
}

.categoria-btn:hover {
    background: var(--brand-orange);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.categoria-btn.active {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.categoria-btn span {
    font-size: inherit;
    font-weight: inherit;
}

/* Seções de Categoria */
.categoria-section {
    scroll-margin-top: 150px;
    padding-top: 2rem;
}

#destaques {
    scroll-margin-top: 150px;
}

.categoria-section h3 {
    color: var(--brand-orange);
    position: relative;
    padding-bottom: 1rem;
}

.categoria-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--brand-orange), var(--brand-red));
    border-radius: 2px;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Utilitários */
.text-gradient {
    background: linear-gradient(45deg, var(--brand-orange), var(--brand-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.border-radius-custom {
    border-radius: 15px;
}

/* Ilustração da Calota */
.calota-illustration {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    animation: float 3s ease-in-out infinite;
}

.calota-bun-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 60px;
    background: linear-gradient(45deg, #D2691E, #CD853F);
    border-radius: 100px 100px 20px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 3;
}

.calota-bun-top::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    height: 8px;
    background: #8B4513;
    border-radius: 10px;
}

.calota-bun-top::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 30px;
    right: 30px;
    height: 6px;
    background: #8B4513;
    border-radius: 8px;
}

.calota-filling {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 120px;
    background: linear-gradient(45deg, #8B4513, #A0522D);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2;
}

.calota-filling::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 20px;
    background: #228B22;
    border-radius: 10px;
}

.calota-filling::after {
    content: '';
    position: absolute;
    top: 50px;
    left: 30px;
    right: 30px;
    height: 15px;
    background: #FF6347;
    border-radius: 8px;
}

.calota-bun-bottom {
    position: absolute;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 80px;
    background: linear-gradient(45deg, #D2691E, #CD853F);
    border-radius: 20px 20px 100px 100px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1;
}

.calota-bun-bottom::before {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 20px;
    right: 20px;
    height: 8px;
    background: #8B4513;
    border-radius: 10px;
}

.calota-bun-bottom::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 30px;
    right: 30px;
    height: 6px;
    background: #8B4513;
    border-radius: 8px;
}

/* Barra de Carrinhos Mobile */
.mobile-cart-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2) !important;
    z-index: 9999 !important;
    border-top: 1px solid rgba(255,255,255,0.2) !important;
    min-height: 60px !important;
    max-height: 80px !important;
    display: flex !important;
    align-items: stretch !important;
}

.mobile-cart-btn {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: white;
    border: none;
    background: none;
    width: 100%;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.mobile-cart-btn:last-child {
    border-right: none;
}

.mobile-cart-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.mobile-cart-btn:focus {
    outline: none;
    box-shadow: none;
}

.mobile-cart-icon {
    position: relative;
    margin-right: 12px;
    font-size: 1.5rem;
}

.mobile-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

.mobile-cart-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-cart-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.mobile-cart-price {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
}

.mobile-cart-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.mobile-cart-conventional {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.mobile-cart-whatsapp {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.mobile-cart-closed {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    opacity: 0.8;
}

.mobile-cart-whatsapp-container {
    display: flex !important;
    flex-direction: row !important;
    height: 100% !important;
    min-height: 60px !important;
    max-height: 80px !important;
    width: 100% !important;
    align-items: stretch !important;
    z-index: 10000 !important;
    position: relative !important;
}

.mobile-cart-whatsapp-info {
    flex: 2;
    display: flex;
    min-width: 0;
}

.mobile-cart-whatsapp-action {
    flex: 1 !important;
    display: flex !important;
    padding: 4px !important;
    min-width: 90px !important;
    max-width: 120px !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10001 !important;
    position: relative !important;
}

.mobile-cart-order-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 16px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 90px !important;
    max-width: 120px !important;
    height: calc(100% - 8px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    z-index: 10002 !important;
    position: relative !important;
}

.mobile-cart-order-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    color: white;
    transform: translateY(-1px);
}

.mobile-cart-order-btn:focus {
    outline: none;
    box-shadow: none;
}

.mobile-cart-order-btn i {
    font-size: 0.9rem;
}

/* Ajustar padding do body para não sobrepor a barra mobile */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 80px;
    }
    
    /* Garantir que botões de adicionar funcionem em mobile mas não sobreponham a barra */
    .adicionar-carrinho, .pedir-whatsapp {
        position: relative;
        z-index: 100 !important;
        pointer-events: auto;
        touch-action: manipulation;
    }
    
    /* Melhorar área de toque em mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Correções específicas para a barra mobile */
    .mobile-cart-bar {
        min-height: 60px;
        max-height: 80px;
    }
    
    .mobile-cart-whatsapp-container {
        min-height: 60px;
        max-height: 80px;
    }
    
    .mobile-cart-whatsapp-action {
        min-width: 90px;
        flex-shrink: 0;
    }
    
    .mobile-cart-order-btn {
        min-width: 90px;
        font-size: 0.75rem;
        padding: 10px 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Garantir que o texto não quebre */
    .mobile-cart-text {
        min-width: 0;
        flex: 1;
    }
    
    .mobile-cart-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Responsividade para a calota */
@media (max-width: 768px) {
    .calota-illustration {
        width: 250px;
        height: 250px;
    }
    
    .calota-bun-top {
        width: 160px;
        height: 50px;
    }
    
    .calota-filling {
        width: 140px;
        height: 100px;
    }
    
    .calota-bun-bottom {
        width: 180px;
        height: 70px;
    }
}

