@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #ea1d2c;
    --primary-dark: #c01824;
    --secondary: #00a082;
    --background: #fafafa;
    --surface: #ffffff;
    --text-main: #2e2e2e;
    --text-muted: #757575;
    --white: #ffffff;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --border-radius: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    overflow-x: hidden;
    padding-bottom: 80px; /* Para não cobrir o rodapé/carrinho */
}

/* Header */
header {
    background: var(--white);
    padding: 1.2rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.brand-name h1 {
    font-size: 1.15rem;
    font-weight: 700;
}

.brand-name span {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Hero */
.hero {
    position: relative;
    height: 220px;
    margin: 1.5rem 5%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    color: var(--white);
}

.hero-overlay h2 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

/* Menu Navigation / Categories */
.categories {
    padding: 1rem 5%;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    position: sticky;
    top: 75px;
    background: var(--background);
    z-index: 90;
    margin-bottom: 1.5rem;
}

.category-tab {
    padding: 0.6rem 1.2rem;
    background: var(--white);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid #eee;
    transition: var(--transition);
}

.category-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Menu Grid */
.menu-section {
    padding: 0 5%;
    margin-bottom: 2rem;
}

.menu-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: #eee;
}

.product-img {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-bottom: 8px;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
}

.btn-add {
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.btn-add:hover {
    transform: scale(1.1);
}

/* Floating Cart Bar */
.cart-bar {
    position: fixed;
    bottom: 20px;
    left: 5%;
    right: 5%;
    background: var(--primary);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(234, 29, 44, 0.3);
    cursor: pointer;
    z-index: 110;
    transition: var(--transition);
}

.cart-bar:hover {
    transform: translateY(-3px);
}

/* Checkout Drawer/Modal */
.checkout-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    z-index: 200;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem 5%;
}

.checkout-drawer.open {
    bottom: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

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

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

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #eee;
    border-radius: 12px;
    outline: none;
}

.btn-finalize {
    width: 100%;
    padding: 1.1rem;
    background-color: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 160, 130, 0.2);
    transition: var(--transition);
}

.btn-finalize:hover {
    background-color: #00876d;
    transform: translateY(-2px);
}

/* Modal do Produto */
.product-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

@media(min-width: 768px) {
    .product-modal-backdrop {
        align-items: center;
    }
}

.product-modal {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    border-radius: 30px 30px 0 0;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media(min-width: 768px) {
    .product-modal {
        border-radius: 24px;
        animation: fadeIn 0.2s ease;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--shadow);
}

.product-modal img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.extra-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
}

.extra-row label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.extra-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.btn-add-modal {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-modal:hover {
    background-color: var(--primary-dark);
}
