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

/* Fonte customizada */
@font-face {
    font-family: 'Turnpike';
    src: url('fonts/Turnpike.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #6b4423;
    --primary-light: #8b5a3c;
    --secondary: #f5deb3;
    --success: #28a745;
    --danger: #dc3545;
    --text: #333;
    --text-light: #666;
    --bg: #f8f9fa;
    --white: #ffffff;
    --border: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --font-display: 'Turnpike', cursive;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-top: 80px;
    padding-bottom: 80px;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: normal;
    color: var(--white);
    margin: 0;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.account-btn {
    background: rgba(220, 170, 110, 0.35);
    border: 1.5px solid rgba(240, 200, 150, 0.55);
    color: var(--white);
    padding: 0.5rem 0.9rem;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.account-btn:hover {
    background: rgba(220, 170, 110, 0.55);
    border-color: rgba(240, 200, 150, 0.8);
}

.account-label {
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.cart-btn {
    background: rgba(220, 170, 110, 0.35);
    border: 1.5px solid rgba(240, 200, 150, 0.55);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 70px;
    transition: all 0.3s;
}

.cart-btn:hover {
    background: rgba(220, 170, 110, 0.55);
    border-color: rgba(240, 200, 150, 0.8);
}

.cart-icon {
    font-size: 1.25rem;
}

.cart-count {
    background: var(--white);
    color: var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

/* Menu Section */
.menu-section {
    padding: 2rem 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

/* Menu Search */
.menu-search-wrap {
    margin-bottom: 1rem;
}

.menu-search-wrap input[type="search"] {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.menu-search-wrap input[type="search"]:focus {
    border-color: var(--primary);
}

/* Menu Filter */
.menu-filter {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary-light);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Menu Content */
.menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-category {
    display: block;
}

.menu-category.hidden {
    display: none;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
}

.subcategory-title {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin: 2rem 0 1rem 0;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative; /* Para posicionar estrela */
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ⭐ Botão de Favorito */
.btn-favorite {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: all 0.3s;
    z-index: 1;
    opacity: 0.6;
}

.btn-favorite:hover {
    opacity: 1;
    transform: scale(1.2);
}

.btn-favorite.active {
    opacity: 1;
    animation: star-pulse 0.5s ease;
}

@keyframes star-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Destacar botão de filtro "Meus Favoritos" */
.filter-favorites {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: var(--text);
    font-weight: 600;
}

.filter-favorites.active {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: var(--white);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.item-header h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: normal;
    color: var(--text);
    flex: 1;
    letter-spacing: 0.3px;
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    margin-left: 1rem;
}

.item-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.item-extras {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.item-extras strong {
    color: var(--text);
}

.item-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-add {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.btn-add:active {
    transform: scale(0.98);
}

/* Mini Cart */
.mini-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 998;
    padding: 1rem;
}

.mini-cart-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#miniCartTotal {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary);
}

.btn-checkout {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}

.modal-header h2 {
    flex: 1;
    margin: 0;
    color: var(--primary);
    font-size: 1.25rem;
    font-family: 'Playfair Display', serif;
}

.btn-back, .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1.5rem;
}

/* Cart Items */
.cart-items-list {
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-choices {
    font-size: 0.75rem;
    color: var(--primary, #8B4513);
    margin-bottom: 0.2rem;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Modal de escolhas */
.choices-product-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.choices-group {
    margin-bottom: 1.25rem;
}

.choices-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.choices-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.choice-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.choice-option:has(input:checked) {
    border-color: var(--primary, #8B4513);
    background: #fdf5ec;
}

.choice-option input {
    accent-color: var(--primary, #8B4513);
    flex-shrink: 0;
}

/* Preço exibido no lado direito da opção */
.option-price {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary, #8B4513);
    white-space: nowrap;
}

/* Badge "múltipla escolha" ao lado do label do grupo */
.multi-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary, #8B4513);
    background: #fdf5ec;
    border: 1px solid var(--primary, #8B4513);
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Total com adicionais no rodapé do modal de escolhas */
.choices-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.choices-total strong {
    color: var(--primary, #8B4513);
    font-size: 1.05rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-qty {
    background: var(--bg);
    border: 1px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-qty {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

/* Summary */
.cart-summary, .final-summary {
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-row.total {
    font-size: 1.25rem;
    padding-top: 0.5rem;
    border-top: 2px solid var(--border);
    margin-top: 0.5rem;
}

/* Buttons */
.btn-primary-large, .btn-secondary-large, .btn-finish-large {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.btn-primary-large {
    background: var(--primary);
    color: var(--white);
}

.btn-finish-large {
    background: var(--success);
    color: var(--white);
    font-size: 1.25rem;
}

.btn-secondary-large {
    background: var(--border);
    color: var(--text);
}

/* Checkout Steps */
.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
}

.checkout-step h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

/* Delivery Options */
.delivery-options, .payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.delivery-option, .payment-option {
    display: block;
    cursor: pointer;
}

.delivery-option input, .payment-option input {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
}

.delivery-option input:checked + .option-content,
.payment-option input:checked + .option-content {
    border-color: var(--primary);
    background: rgba(107, 68, 35, 0.05);
}

.option-icon {
    font-size: 2rem;
}

.option-content strong {
    display: block;
    margin-bottom: 0.25rem;
}

.option-content small {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.status-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--success);
}

/* Credit Banner */
.credit-banner {
    background: linear-gradient(135deg, var(--success) 0%, #20c997 100%);
    color: var(--white);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.credit-icon {
    font-size: 2rem;
}

.credit-text strong {
    display: block;
}

/* PIX */
.qrcode-container {
    display: flex;
    justify-content: center;
    padding: 2rem;
    background: var(--bg);
    border-radius: 12px;
    margin: 1rem 0;
}

.qrcode-container img {
    max-width: 250px;
    width: 100%;
}

.pix-code-box {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.pix-code-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.875rem;
}

.btn-copy {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Success */
.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-text {
    font-size: 1.125rem;
    margin: 1rem 0;
}

.order-number {
    color: var(--text-light);
    margin: 1rem 0;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
    font-size: 0.875rem;
}

.error-message {
    background: #fee;
    color: var(--danger);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin: 1rem 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.25rem;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
