/* Cardapio estilo iFood */
:root {
    --ifood-red: #ea1d2c;
    --ifood-gray: #717171;
    --ifood-light: #f7f7f7;
    --ifood-border: #e0e0e0;
    --ifood-dark: #3e3e3e;
}

* { box-sizing: border-box; }

body.cardapio-ifood {
    background: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--ifood-dark);
}

/* Header do Restaurante */
.ifood-header {
    background: #fff;
    border-bottom: 1px solid var(--ifood-border);
    padding: 0;
    position: relative;
}

.ifood-banner {
    width: 100%;
    aspect-ratio: 2 / 1;
    max-height: 280px;
    background: linear-gradient(135deg, #ea1d2c 0%, #ff6b35 100%);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .ifood-banner {
        max-height: none;
    }
}

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

/* Banner Carousel */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.banner-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.banner-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

/* Capa do restaurante - overlay escuro sutil pra dar destaque */
.banner-slide-capa {
    position: relative;
}
.banner-slide-capa img {
    filter: brightness(0.85);
}
.banner-capa-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.banner-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.banner-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ifood-restaurant-card {
    max-width: 800px;
    margin: -50px auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 20px 24px;
    position: relative;
    z-index: 10;
}

.ifood-restaurant-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ifood-restaurant-logo {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--ifood-border);
    flex-shrink: 0;
}

.ifood-restaurant-details h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #000;
}

.ifood-restaurant-details .ifood-location {
    font-size: 13px;
    color: var(--ifood-gray);
    margin: 0;
}

.ifood-status {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ifood-status.open { color: #50a773; }
.ifood-status.closed { color: var(--ifood-red); }

.ifood-delivery-info {
    display: flex;
    border-top: 1px solid var(--ifood-border);
    margin-top: 16px;
    padding-top: 16px;
}

.ifood-delivery-info > div {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--ifood-border);
    padding: 0 16px;
}

.ifood-delivery-info > div:last-child {
    border-right: none;
}

.ifood-delivery-info .ifood-label {
    font-size: 12px;
    color: var(--ifood-gray);
    position: static;
    pointer-events: auto;
}

.ifood-delivery-info .ifood-value {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

/* Links de acao */
.ifood-actions {
    max-width: 800px;
    margin: 12px auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ifood-actions a {
    color: #3f51b5;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.ifood-actions .ifood-benefits {
    border: 1px solid var(--ifood-border);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    color: var(--ifood-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Barra de busca */
.ifood-search {
    max-width: 800px;
    margin: 0 auto 8px;
    padding: 8px 16px;
}

.ifood-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--ifood-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--ifood-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23717171' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 12px center;
    outline: none;
    transition: border-color 0.2s;
}

.ifood-search input:focus {
    border-color: var(--ifood-red);
}

/* Navegacao de categorias (sticky) */
.ifood-categories-nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
    border-bottom: 1px solid var(--ifood-border);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ifood-categories-nav::-webkit-scrollbar { display: none; }

.ifood-categories-nav a {
    display: inline-block;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ifood-gray);
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.ifood-categories-nav a:hover,
.ifood-categories-nav a.active {
    color: var(--ifood-dark);
    border-bottom-color: var(--ifood-dark);
}

/* Container principal */
.ifood-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px 100px;
}

/* Secao Mais Pedidos */
.ifood-popular {
    padding: 24px 0 16px;
}

.ifood-popular h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    text-align: center;
}

.ifood-popular-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ifood-popular-scroll::-webkit-scrollbar { display: none; }

.ifood-popular-card {
    flex-shrink: 0;
    width: 160px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--ifood-border);
    transition: box-shadow 0.2s;
}

.ifood-popular-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.ifood-popular-card .card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    position: relative;
}

.ifood-popular-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ifood-popular-card .card-body {
    padding: 10px 12px;
}

.ifood-popular-card .card-body h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #000;
    white-space: normal;
    line-height: 1.3;
}

.ifood-popular-card .card-body .price {
    font-size: 13px;
    color: var(--ifood-gray);
}

.ifood-popular-card .card-body .price strong {
    color: #000;
    font-size: 15px;
}

.ifood-popular-card .badge-popular {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ffb100;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Secao de categoria com produtos */
.ifood-category-section {
    padding: 24px 0 0;
    border-top: 8px solid var(--ifood-light);
}

.ifood-category-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    text-transform: uppercase;
    text-align: center;
}

/* Card de produto (estilo iFood) */
.ifood-product {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid var(--ifood-border);
    text-decoration: none;
    color: inherit;
    gap: 12px;
    transition: background 0.15s;
}

.ifood-product:hover {
    background: var(--ifood-light);
    margin: 0 -16px;
    padding: 16px;
    border-radius: 8px;
}

.ifood-product:last-child {
    border-bottom: none;
}

.ifood-product-info {
    flex: 1;
    min-width: 0;
}

.ifood-product-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #000;
}

.ifood-product-info .description {
    font-size: 13px;
    color: var(--ifood-gray);
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ifood-product-info .serves {
    display: inline-block;
    font-size: 11px;
    color: var(--ifood-gray);
    border: 1px solid var(--ifood-border);
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 6px;
}

.ifood-product-info .price {
    font-size: 14px;
    color: var(--ifood-dark);
}

.ifood-product-info .price strong {
    font-size: 16px;
    font-weight: 700;
}

.ifood-product-info .price del {
    color: var(--ifood-gray);
    font-size: 12px;
    margin-left: 6px;
}

.ifood-product-info .price .discount-badge {
    background: #50a773;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}

.ifood-product-img {
    width: 120px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

/* Secao de resultado de busca */
#area_busca {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Footer */
.ifood-footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--ifood-gray);
    border-top: 1px solid var(--ifood-border);
}

.ifood-footer a {
    color: var(--ifood-gray);
    text-decoration: none;
    margin: 0 8px;
}

.ifood-footer a:hover {
    color: var(--ifood-dark);
}

/* Promoções */
.ifood-promo-section {
    padding: 24px 0 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border-radius: 12px;
    margin-bottom: 8px;
}

.ifood-promo-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    text-align: center;
    color: var(--ifood-red);
}

.ifood-promo-card {
    border: 2px solid #ffe0e0 !important;
}

.ifood-promo-card:hover {
    border-color: var(--ifood-red) !important;
}

.badge-promo {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--ifood-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.ifood-promo-card .price del {
    display: block;
    color: #999;
    font-size: 11px;
}

/* Ranking badges */
.badge-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Rating badge */
.badge-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Esgotado */
.ifood-esgotado {
    opacity: 0.5;
    pointer-events: none;
}

.ifood-esgotado::after {
    content: 'Esgotado';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Icone do carrinho flutuante */
body.cardapio-ifood .col-xl-3.mr-5 {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 200;
    width: auto;
    padding: 0;
    margin: 0;
}

body.cardapio-ifood .col-xl-3.mr-5 .header__info {
    margin: 0;
    padding: 0;
}

body.cardapio-ifood .col-xl-3.mr-5 .header__info-cart button {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    position: relative;
    padding: 0;
}

body.cardapio-ifood .col-xl-3.mr-5 .header__info-cart button img {
    width: 24px;
    height: 24px;
}

body.cardapio-ifood .col-xl-3.mr-5 .header__info-cart span {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--ifood-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Sidebar do carrinho */
body.cardapio-ifood .tpcartinfo {
    z-index: 9999;
}

body.cardapio-ifood .cartbody-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

body.cardapio-ifood .cartbody-overlay.opened {
    display: block;
}

/* Responsivo */
@media (max-width: 768px) {
    .ifood-banner { aspect-ratio: 2 / 1; }
    .ifood-restaurant-card { margin: -30px 12px 0; padding: 16px; border-radius: 12px; }
    .ifood-restaurant-logo { width: 56px; height: 56px; }
    .ifood-restaurant-details h1 { font-size: 17px; }
    .ifood-popular-card { width: 140px; }
    .ifood-popular-card .card-img { height: 100px; }
    .ifood-product-img { width: 100px; height: 85px; }
    .ifood-content { padding: 0 12px 100px; }
    .ifood-search { padding: 8px 12px; }
    .ifood-categories-nav { padding: 0 12px; }
    .ifood-actions { padding: 0 12px; }
}

/* Reviews Section */
.reviews-scroll::-webkit-scrollbar { height: 3px; }
.reviews-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.ifood-reviews-section { scroll-behavior: smooth; }
