/* ============================================================
   GRECOON - CSS PRINCIPAL
   Versão 2.0 - Totalmente refatorado
   ============================================================ */

/* --------------------------------------------
   1. RESET
   (tokens/variáveis agora centralizados em
   /assets/css/design-system.css — incluir esse
   arquivo ANTES deste no <head> da página)
-------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
    padding-bottom: calc(90px + var(--safe-bottom));
    opacity: 0;
    transition: opacity 0.3s;
}

body.ready {
    opacity: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
}

/* --------------------------------------------
   2. MENSAGEM DO DIA
-------------------------------------------- */
.msg-day {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 8px 16px;
    font-size: 13px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 10px;
}

.msg-day i {
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

/* --------------------------------------------
   3. HEADER / TOPBAR
-------------------------------------------- */
.app-header {
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ── Info do Restaurante ── */
.restaurant-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.restaurant-logo-wrap {
    position: relative;
    flex-shrink: 0;
}

.restaurant-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--primary);
    background: white;
    padding: 2px;
    transition: transform 0.3s;
}

.restaurant-logo:hover {
    transform: scale(1.05);
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2.5px solid white;
    box-shadow: var(--shadow-sm);
}

.status-dot--open {
    background: #22c55e;
    animation: pulse-dot 2s infinite;
}

.status-dot--closed {
    background: var(--error);
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.restaurant-details {
    flex: 1;
    min-width: 0;
}

.restaurant-details h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 2px;
}

.restaurant-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 12px;
    color: var(--gray-500);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.meta-item + .meta-item::before {
    content: '·';
    margin: 0 6px;
    color: var(--gray-300);
}

.meta-item i {
    font-size: 11px;
    color: var(--primary);
}

.meta-item .star {
    color: #f59e0b;
}

.meta-muted {
    color: var(--gray-400);
}

.status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 4px;
}

.status-badge--open {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge--closed {
    background: #fee2e2;
    color: #dc2626;
}

/* ── Ações do Header ── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    font-size: 18px;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.05);
}

.btn-icon--cart {
    background: var(--primary);
    color: white;
}

.btn-icon--cart:hover {
    background: var(--primary-dark);
    color: white;
    transform: scale(1.05);
}

.btn-icon .badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid white;
}

/* ── Idioma Dropdown ── */
.lang-selector {
    position: relative;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 6px 0;
    z-index: 9999;
}

.lang-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.lang-option:hover {
    background: var(--gray-50);
}

.lang-option.active {
    background: var(--primary);
    color: white;
}

.lang-option .check {
    margin-left: auto;
    font-size: 12px;
}

/* --------------------------------------------
   4. BANNERS
-------------------------------------------- */
.banner-section {
    padding: 12px 16px 0;
}

.banner-carousel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    background: var(--gray-100);
}

.banner-track {
    position: relative;
    width: 100%;
    min-height: 140px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
    cursor: pointer;
}

.banner-slide.active {
    position: relative;
    opacity: 1;
    z-index: 2;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    max-height: 220px;
    object-fit: cover;
    display: block;
    background: var(--gray-100);
}

.banner-message {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

.banner-message span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: block;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    line-height: 1.4;
}

/* ── Controles do Banner ── */
.banner-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.banner-carousel:hover .banner-control {
    opacity: 1;
}

.banner-control:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.1);
}

.banner-control--prev {
    left: 12px;
}

.banner-control--next {
    right: 12px;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 15;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0;
}

.banner-dot.active {
    background: #ffffff;
    width: 24px;
    border-radius: 4px;
    transform: scale(1.1);
}

.banner-counter {
    position: absolute;
    bottom: 10px;
    right: 16px;
    z-index: 15;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

/* --------------------------------------------
   5. CATEGORIAS (CHIPS)
-------------------------------------------- */
.categories-section {
    position: sticky;
    top: var(--header-h, 64px);
    z-index: 90;
    background: var(--gray-50);
    padding: 20px 16px 12px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-section::-webkit-scrollbar {
    display: none;
}

/* Fade nas bordas — sinaliza visualmente que dá pra rolar pro lado */
.categories-section::before,
.categories-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    z-index: 2;
    pointer-events: none;
}
.categories-section::before {
    left: 0;
    background: linear-gradient(to right, var(--gray-50, #fff) 0%, transparent 100%);
}
.categories-section::after {
    right: 0;
    background: linear-gradient(to left, var(--gray-50, #fff) 0%, transparent 100%);
}

/* Setas de navegação — principalmente úteis pra quem usa mouse
   (sem touch), já que sem elas as categorias fora da tela não tinham
   nenhuma forma de serem alcançadas */
.cat-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 1.5px solid var(--gray-200);
    color: var(--gray-600);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.cat-scroll-arrow:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.cat-scroll-arrow--prev { left: 6px; }
.cat-scroll-arrow--next { right: 6px; }
.cat-scroll-arrow.hidden { display: none; }

@media (max-width: 640px) {
    /* No celular o gesto de arrastar já é natural — as setas só
       ocupam espaço sem ajudar muito, então ficam escondidas ali. */
    .cat-scroll-arrow { display: none; }

    /* Como a barra de categorias agora fica fixa na tela o tempo
       todo, cada pixel de altura dela conta em dobro no celular —
       por isso fica bem mais enxuta aqui do que no desktop. */
    .header-content {
        padding: 6px 12px;
    }
    .restaurant-logo {
        width: 42px;
        height: 42px;
    }
    .categories-section {
        padding: 10px 12px 8px;
    }
    .category-chip {
        padding: 6px 14px;
        font-size: 12px;
        border-radius: 8px;
        gap: 6px;
    }
    .category-chip img {
        width: 18px;
        height: 18px;
    }
    .category-chip.active {
        transform: none;
    }
    .search-section {
        padding: 6px 12px 10px;
    }
}

.categories-scroll {
    display: flex;
    gap: 10px;
    padding-bottom: 4px;
}

.category-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    background: white;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid var(--gray-200);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(234, 29, 44, 0.3);
    transform: scale(1.05);
}

.category-chip img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

/* --------------------------------------------
   6. PESQUISA
-------------------------------------------- */
.search-section {
    padding: 8px 16px 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.search-icon {
    position: absolute;
    left: 18px;
    color: var(--gray-400);
    font-size: 16px;
}

.search-input {
    flex: 1;
    padding: 13px 16px 13px 48px;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    background: transparent;
    color: var(--gray-800);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-clear {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 18px;
    display: none;
    padding: 4px;
    transition: color 0.2s;
}

.search-clear:hover {
    color: var(--gray-600);
}

.search-clear.visible {
    display: block;
}

/* ── Sugestões ── */
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    border: 1px solid var(--gray-200);
}

.search-suggestions.active {
    display: block;
}

.search-suggestion {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--gray-100);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background: var(--primary-light);
}

.search-suggestion img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-suggestion .info {
    flex: 1;
    min-width: 0;
}

.search-suggestion .name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
}

.search-suggestion .desc {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion .price {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    flex-shrink: 0;
}

/* --------------------------------------------
   7. PRODUTOS
-------------------------------------------- */
.products-section {
    padding: 8px 16px 40px;
    max-width: 1280px;
    margin: 0 auto;
}

.category-title {
    font-size: 20px;
    font-weight: 800;
    margin: 24px 0 14px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--gray-200);
    border-radius: 1px;
}

/* ── Grid ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* ── Card ── */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.product-card:active {
    transform: scale(0.98);
}

.product-card--unavailable {
    opacity: 0.6;
    filter: grayscale(0.2);
    cursor: not-allowed;
}

.product-card--unavailable:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* ── Imagem ── */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 85%;
    overflow: hidden;
    background: var(--gray-100);
}

.product-image-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.06);
}

/* ── Badges ── */
.product-badge {
    position: absolute;
    top: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    color: #fff;
    z-index: 2;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.product-badge--new {
    left: 8px;
    background: var(--error);
}

.product-badge--discount {
    right: 8px;
    background: var(--success);
}

.stock-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    color: #fff;
    z-index: 2;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
}

.stock-badge--low {
    background: rgba(245, 158, 11, 0.9);
    animation: pulse-badge 2s infinite;
}

.stock-badge--critical {
    background: rgba(249, 115, 22, 0.9);
    animation: pulse-badge 1.5s infinite;
}

.stock-badge--out {
    background: rgba(220, 38, 38, 0.9);
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ── Unavailable Overlay ── */
.product-unavailable {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.product-unavailable i {
    font-size: 32px;
    color: var(--error);
    margin-bottom: 8px;
}

.product-unavailable span {
    font-size: 13px;
    font-weight: 700;
    color: var(--error);
    letter-spacing: 0.5px;
}

/* ── Info ── */
.product-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    color: var(--gray-900);
    margin: 0;
}

.product-description {
    font-size: 12px;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    line-height: 1.4;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--gray-500);
}

.product-meta i {
    color: var(--primary);
    font-size: 10px;
    margin-right: 2px;
}

.product-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.attr-tag {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    letter-spacing: 0.2px;
}

.product-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.product-price .old-price {
    font-size: 12px;
    color: var(--gray-400);
    text-decoration: line-through;
    font-weight: 400;
}

.product-price .from-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
}

/* --------------------------------------------
   8. CARRINHO FLUTUANTE
-------------------------------------------- */
.cart-floating {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    max-width: 480px;
    margin: 0 auto;
    z-index: 999;
    animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
    from { transform: translateY(80px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cart-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 32px rgba(234, 29, 44, 0.4);
    cursor: pointer;
    border: none;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.cart-button:hover {
    transform: scale(1.03) translateY(-3px);
    color: #fff;
    box-shadow: 0 12px 40px rgba(234, 29, 44, 0.5);
}

.cart-button:active {
    transform: scale(0.97);
}

.cart-button-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-button-left i {
    font-size: 18px;
}

.cart-button-count {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    padding: 2px 14px;
    font-size: 13px;
    font-weight: 700;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cart-button-label {
    font-size: 13px;
    font-weight: 600;
}

.cart-button-total {
    font-size: 19px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 18px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------
   9. SIDEBAR (Modal de Produto)
-------------------------------------------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 9998;
    animation: fadeIn 0.3s;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: calc(var(--vh, 1vh) * 100);
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 48px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h3 i {
    color: var(--primary);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.sidebar-close:hover {
    color: var(--gray-700);
    transform: rotate(90deg);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 16px;
    color: var(--gray-500);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------
   10. TOAST
-------------------------------------------- */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    min-width: 280px;
    max-width: 420px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--success);
    padding: 14px 18px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.error {
    border-left-color: var(--error);
}

.toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--success-light);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.toast-notification.error .toast-icon {
    background: var(--error);
    color: white;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-900);
}

.toast-message {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--gray-700);
}

/* --------------------------------------------
   11. COOKIES BANNER
-------------------------------------------- */
.cookies-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 3px solid var(--primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    display: none;
}

.cookies-banner.active {
    display: block;
    animation: slideUp 0.4s ease;
}

.cookies-banner-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cookies-banner-text {
    flex: 1;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
}

.cookies-banner-text strong {
    color: var(--gray-900);
}

.cookies-banner-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.cookies-banner-text a:hover {
    color: var(--primary-dark);
}

.cookies-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookies-btn {
    padding: 8px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-sans);
}

.cookies-btn--accept {
    background: var(--primary);
    color: #fff;
}

.cookies-btn--accept:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.cookies-btn--settings {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.cookies-btn--settings:hover {
    background: var(--gray-200);
}

/* --------------------------------------------
   12. MODAIS (Bootstrap)
-------------------------------------------- */
.modal-loja .modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-loja .modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 20px;
}

.modal-loja .modal-header h6 {
    font-weight: 700;
    color: var(--gray-900);
}

.modal-loja .modal-header h6 i {
    color: var(--primary);
}

.modal-loja .modal-body {
    padding: 20px;
}

.hours-table tr td {
    padding: 6px 8px;
    font-size: 13px;
}

.hours-table .today td {
    background: #f0fdf4;
    border-radius: 6px;
    font-weight: 700;
}

.badge-24h {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 11px;
    padding: 2px 12px;
    border-radius: var(--radius-full);
    display: inline-block;
}

/* --------------------------------------------
   13. EMPTY STATE
-------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.empty-state i {
    font-size: 52px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
}

/* --------------------------------------------
   14. UTILITÁRIOS
-------------------------------------------- */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.font-weight-bold { font-weight: 700; }
.small { font-size: 12px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.rounded-pill { border-radius: var(--radius-full); }
.w-100 { width: 100%; }

/* --------------------------------------------
   15. RESPONSIVO
-------------------------------------------- */
@media (max-width: 480px) {
    .restaurant-details h1 {
        font-size: 14px;
    }
    .restaurant-logo {
        width: 40px;
        height: 40px;
    }
    .restaurant-meta {
        font-size: 10px;
    }
    .meta-item + .meta-item::before {
        margin: 0 4px;
    }
    .status-badge {
        font-size: 9px;
        padding: 1px 8px;
    }
    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .header-actions {
        gap: 2px;
    }
    .category-chip {
        font-size: 12px;
        padding: 6px 14px;
    }
    .product-name {
        font-size: 13px;
        min-height: 32px;
    }
    .product-price {
        font-size: 15px;
    }
    .cart-button {
        padding: 12px 16px;
        font-size: 13px;
    }
    .cart-button-total {
        font-size: 16px;
        padding: 2px 12px;
    }
    .cart-button-label {
        font-size: 11px;
    }
    .toast-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    .cookies-banner {
        padding: 12px 16px;
    }
    .cookies-banner-content {
        flex-direction: column;
        text-align: center;
    }
    .cookies-banner-actions {
        width: 100%;
        justify-content: center;
    }
    .banner-slide img {
        min-height: 100px;
        max-height: 150px;
    }
    .products-grid {
        gap: 10px;
    }
    .product-info {
        padding: 10px 12px 12px;
    }
}

@media (min-width: 768px) {
    .product-name {
        font-size: 15px;
    }
    .product-price {
        font-size: 18px;
    }
}