
/* CSS personalizado para página do carrinho - Restaurante 3 (Farofa Churrascaria) */

:root {
    /* Paleta de cores Farofa Churrascaria */
    --farofa-primary: #072B1C; /* Verde escuro principal */
    --farofa-secondary: #E85C0D; /* Laranja vibrante */
    --farofa-accent: #EEAC1F; /* Amarelo dourado */
    --farofa-dark: #1a1a1a; /* Preto suave */
    --farofa-light: #f8f9fa; /* Branco suave */
    --farofa-gray: #6c757d; /* Cinza neutro */
    --farofa-success: #28a745; /* Verde sucesso */
    --farofa-danger: #dc3545; /* Vermelho perigo */
    
    /* Gradientes */
    --farofa-gradient-primary: linear-gradient(135deg, #072B1C, #1a5a3e);
    --farofa-gradient-secondary: linear-gradient(135deg, #E85C0D, #FF7A00);
    --farofa-gradient-accent: linear-gradient(135deg, #EEAC1F, #FFD700);
}

/* Reset e base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Party Confetti', 'Antique Olive', Arial, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--farofa-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

nav {
    background-color: var(--farofa-dark);
    opacity: 1;
    height: 80px;
    color: #FFF;
    z-index: 1000;
}

.navbar-collapse{
    z-index: 1000;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header da página */
.cart-header {
    background: var(--farofa-gradient-primary);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(7, 43, 28, 0.3);
    z-index: 1;
}

.cart-header .container {
    position: relative;
    z-index: 2;
}

@media (min-width: 992px){
    .cart-header{
        margin-top: 80px;
    }
}

.cart-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-header .lead {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0.5rem 0 0 0;
}

/* Cards principais - estilo igual ao checkout */
.cart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 2rem;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--farofa-gradient-accent);
}

.cart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.cart-card .card-header {
    background: transparent;
    color: var(--farofa-primary);
    border: none;
    padding: 0 0 1.5rem 0;
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.cart-card .card-header h5 {
    color: var(--farofa-primary);
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-card .card-header h5 i {
    color: var(--farofa-accent);
    font-size: 1.2em;
}

.cart-card .card-body {
    padding: 0;
}

/* Itens do carrinho */
.cart-item {
    background: linear-gradient(to right, rgba(238, 172, 31, 0.05), rgba(232, 92, 13, 0.05));
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--farofa-gradient-accent);
}

.cart-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(238, 172, 31, 0.2);
}

.cart-item:last-child {
    margin-bottom: 0;
}

/* Títulos dos produtos */
.cart-item h6 {
    color: var(--farofa-primary);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cart-item .text-muted {
    color: var(--farofa-gray) !important;
    font-size: 0.9rem;
}

.cart-item .text-info {
    color: var(--farofa-secondary) !important;
    font-weight: 600;
}

/* Controles de quantidade */
.input-group {
    max-width: 140px;
}

.input-group .btn {
    background: var(--farofa-primary);
    border: 1px solid var(--farofa-primary);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background: var(--farofa-secondary);
    border-color: var(--farofa-secondary);
    transform: scale(1.1);
}

.input-group .form-control {
    border: 1px solid var(--farofa-primary);
    text-align: center;
    font-weight: bold;
    color: var(--farofa-light);
    background: var(--farofa-dark) !important;
}

.input-group .form-control:focus {
    border-color: var(--farofa-accent);
    box-shadow: 0 0 0 3px rgba(238, 172, 31, 0.2);
    background: var(--farofa-dark) !important;
}

/* Preços */
.cart-item strong {
    color: var(--farofa-success);
    font-size: 1.1rem;
    font-weight: bold;
}

/* Botão de remover */
.btn-outline-danger {
    border-color: var(--farofa-danger);
    color: var(--farofa-danger);
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: var(--farofa-danger);
    border-color: var(--farofa-danger);
    transform: scale(1.1);
}

/* Resumo do pedido - estilo igual ao checkout */
.order-summary {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 2rem;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--farofa-gradient-accent);
}

.order-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.order-summary h5 {
    color: var(--farofa-primary);
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-summary h5 i {
    color: var(--farofa-accent);
    font-size: 1.2em;
}

.order-summary .d-flex {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    color: var(--farofa-primary);
}

.order-summary hr {
    border: none;
    border-top: 2px solid rgba(238, 172, 31, 0.3);
    margin: 1.5rem 0;
}

.order-summary strong {
    font-size: 1.2rem;
    color: var(--farofa-primary);
}

.order-summary .d-flex.justify-content-between strong {
    color: var(--farofa-primary);
    font-size: 1.3rem;
    font-weight: 800;
}

/* Botões principais */
.btn-farofa-primary {
    background: var(--farofa-gradient-secondary);
    border: none;
    color: white;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(232, 92, 13, 0.3);
}

.btn-farofa-primary:hover {
    background: var(--farofa-gradient-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 172, 31, 0.4);
    color: var(--farofa-primary);
}

.btn-farofa-secondary {
    background: var(--farofa-gradient-primary);
    border: 2px solid var(--farofa-primary);
    color: white;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 43, 28, 0.3);
}

.btn-farofa-secondary:hover {
    background: var(--farofa-gradient-accent);
    color: var(--farofa-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 172, 31, 0.4);
    border-color: var(--farofa-accent);
}

/* Estados vazios e de erro */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.empty-cart h4 {
    color: var(--farofa-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.empty-cart .emoji {
    font-size: 4rem;
    margin-bottom: 2rem;
    display: block;
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner-border-farofa {
    border: 4px solid rgba(7, 43, 28, 0.1);
    border-left: 4px solid var(--farofa-primary);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    animation: spin 1s linear infinite;
}

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

/* Alertas personalizados */
.alert-farofa {
    background: linear-gradient(135deg, rgba(238, 172, 31, 0.1), rgba(232, 92, 13, 0.1));
    border: 1px solid var(--farofa-accent);
    border-radius: 10px;
    color: var(--farofa-primary);
}

.alert-farofa h5 {
    color: var(--farofa-primary);
}

/* Form controls gerais - padrão do checkout */
.form-control, .form-select {
    background: var(--farofa-dark) !important;
    color: var(--farofa-light) !important;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--farofa-accent);
    box-shadow: 0 0 0 3px rgba(238, 172, 31, 0.2);
    background: var(--farofa-dark) !important;
    color: var(--farofa-light) !important;
}

.form-control::placeholder {
    color: rgba(248, 249, 250, 0.6) !important;
}

.form-select option {
    background: var(--farofa-dark) !important;
    color: var(--farofa-light) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .cart-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .cart-header h1 {
        font-size: 2rem;
    }
    
    .cart-card .card-body {
        padding: 1.5rem;
    }
    
    .cart-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .order-summary {
        position: static;
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .btn-farofa-primary,
    .btn-farofa-secondary {
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .cart-item .row {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item .col-md-3,
    .cart-item .col-md-2,
    .cart-item .col-md-1 {
        margin-bottom: 1rem;
    }
    
    .input-group {
        max-width: 100%;
        justify-content: center;
    }
}

/* Animações de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-card {
    animation: fadeInUp 0.6s ease-out;
}

.cart-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Efeitos de hover nos textos */
.cart-item h6:hover {
    color: var(--farofa-secondary);
    transition: color 0.3s ease;
}

/* Estilo para o badge do carrinho flutuante */
.floating-cart {
    background: var(--farofa-gradient-secondary) !important;
    box-shadow: 0 4px 20px rgba(232, 92, 13, 0.4) !important;
}

.floating-cart:hover {
    background: var(--farofa-gradient-accent) !important;
    box-shadow: 0 6px 25px rgba(238, 172, 31, 0.5) !important;
}

/* Customização do badge */
.cart-badge-floating {
    background-color: var(--farofa-accent) !important;
    color: var(--farofa-primary) !important;
    font-weight: bold !important;
}

/* ===========================
   Modal de Regras do Checkout
   =========================== */

/* Específico para o modal de checkout */
#checkoutRulesModal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(7, 43, 28, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#checkoutRulesModal .modal-header {
    background: var(--farofa-gradient-primary);
    color: white;
    border: none;
    padding: 1.75rem 2rem;
    position: relative;
    overflow: hidden;
}

#checkoutRulesModal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(238, 172, 31, 0.15), transparent);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

#checkoutRulesModal .modal-title {
    font-weight: bold;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

#checkoutRulesModal .modal-title::before {
    content: '📋';
    font-size: 1.3em;
    animation: bounce 2s ease-in-out infinite;
}

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

#checkoutRulesModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

#checkoutRulesModal .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

#checkoutRulesModal .modal-body {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    min-height: 200px;
}

#checkoutRulesModal .modal-body p {
    color: var(--farofa-dark);
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
    padding: 1rem;
    background: rgba(238, 172, 31, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--farofa-accent);
}

#checkoutRulesModal .modal-footer {
    border-top: 2px solid rgba(238, 172, 31, 0.2);
    padding: 1.5rem 2rem;
    background: white;
    gap: 1rem;
}

/* Botão Cancelar */
#checkoutRulesModal .modal-footer .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

#checkoutRulesModal .modal-footer .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #4e555b);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

/* Botão Continuar */
#checkoutRulesModal .modal-footer .btn-primary {
    background: var(--farofa-gradient-secondary);
    border: none;
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(232, 92, 13, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

#checkoutRulesModal .modal-footer .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

#checkoutRulesModal .modal-footer .btn-primary:hover::before {
    left: 100%;
}

#checkoutRulesModal .modal-footer .btn-primary:hover {
    background: var(--farofa-gradient-accent);
    color: var(--farofa-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 172, 31, 0.5);
}

/* Responsividade do modal */
@media (max-width: 576px) {
    #checkoutRulesModal .modal-dialog {
        margin: 0.5rem;
    }
    
    #checkoutRulesModal .modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    #checkoutRulesModal .modal-title {
        font-size: 1.2rem;
    }
    
    #checkoutRulesModal .modal-body {
        padding: 1.5rem;
    }
    
    #checkoutRulesModal .modal-body p {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
    
    #checkoutRulesModal .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column-reverse;
    }
    
    #checkoutRulesModal .modal-footer .btn-secondary,
    #checkoutRulesModal .modal-footer .btn-primary {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
}
