/* =========================
RESET
========================= */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f5f7;
    color: #222;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

/* =========================
LAYOUT BASE
========================= */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px 100px;
}

/* =========================
TOPBAR
========================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid #ececec;
    background: #fff;
    flex-shrink: 0;
}

.topbar-texto {
    min-width: 0;
    flex: 1;
}

.topbar-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-meta {
    font-size: 12px;
    color: #666;
}

.topbar-badge {
    background: #ea1d2c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 12px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* =========================
HERO
========================= */
.hero {
    margin-top: 12px;
    border-radius: 20px;
    overflow: hidden;
    background: #111;
    position: relative;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}

.hero-banner {
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.hero-logo {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20);
}

.hero-texto {
    min-width: 0;
}

.hero-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 6px;
    color: #fff;
    word-break: break-word;
}

.hero-meta {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
}

/* =========================
INFO
========================= */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.info-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 14px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.info-card strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.info-card span {
    display: block;
    font-size: 12px;
    color: #666;
}

/* =========================
CATEGORIAS
========================= */
.categorias-wrap {
    position: sticky;
    top: 71px;
    z-index: 950;
    background: rgba(244, 245, 247, 0.97);
    backdrop-filter: blur(10px);
    padding: 12px 0 10px;
}

.categorias-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categorias-scroll::-webkit-scrollbar {
    display: none;
}

.categoria-chip {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 999px;
    padding: 11px 15px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    color: #333;
    transition: 0.2s ease;
    flex-shrink: 0;
}

.categoria-chip.active {
    background: #ea1d2c;
    border-color: #ea1d2c;
    color: #fff;
}

/* =========================
SEÇÕES
========================= */
.section {
    margin-bottom: 28px;
    scroll-margin-top: 140px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.section-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.section-count {
    font-size: 12px;
    color: #666;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================
GRID PRODUTOS
========================= */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* =========================
CARD PRODUTO
========================= */
.card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e9e9e9;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.card-name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 6px;
    word-break: break-word;
}

.card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.45;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 56px;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.card-price {
    font-weight: 800;
    font-size: 16px;
    color: #222;
}

.add-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #ea1d2c;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(234, 29, 44, 0.25);
}

.add-btn:active {
    transform: scale(0.96);
}

.card-img-wrap {
    width: 108px;
    min-width: 108px;
    flex-shrink: 0;
}

.card-img {
    width: 108px;
    height: 108px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #ededed;
    background: #fafafa;
}

.empty {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 16px;
    font-size: 14px;
    color: #666;
}

/* =========================
BARRA DO CARRINHO
========================= */
.cart-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 560px;
    background: #ea1d2c;
    color: #fff;
    border-radius: 18px;
    padding: 14px 16px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 1200;
    box-shadow: 0 16px 34px rgba(234, 29, 44, 0.32);
    border: 0;
    cursor: pointer;
}

.cart-bar.show {
    display: flex;
}

.cart-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cart-count {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

.cart-text {
    min-width: 0;
}

.cart-text strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.cart-text span {
    display: block;
    font-size: 12px;
    opacity: 0.92;
}

.cart-total {
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

/* =========================
RESPONSIVO
========================= */
@media (min-width: 700px) {
    .container {
        padding: 0 18px 110px;
    }

    .topbar-inner {
        padding: 14px 18px;
    }

    .hero-banner {
        height: 240px;
    }

    .hero-title {
        font-size: 28px;
    }

    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .card-img-wrap,
    .card-img {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 20px 120px;
    }

    .topbar-inner {
        padding: 14px 20px;
    }

    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .card {
        padding: 14px;
    }
}

@media (max-width: 520px) {
    .hero-banner {
        height: 180px;
    }

    .hero-title {
        font-size: 21px;
    }

    .info-grid {
        gap: 8px;
    }

    .info-card {
        padding: 12px 10px;
    }

    .info-card strong {
        font-size: 15px;
    }

    .info-card span {
        font-size: 11px;
    }

    .card {
        padding: 12px;
        gap: 10px;
    }

    .card-img-wrap {
        width: 96px;
        min-width: 96px;
    }

    .card-img {
        width: 96px;
        height: 96px;
    }

    .card-desc {
        min-height: 50px;
    }
}
body.modal-open {
    overflow: hidden;
}

.card-produto {
    cursor: pointer;
}

.produto-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
}

.produto-modal.show {
    display: block;
}

.produto-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.produto-modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 24px);
    max-width: 980px;
    max-height: calc(100vh - 32px);
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.produto-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.produto-modal-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 560px;
}

.produto-modal-media {
    background: #f2f2f2;
    min-height: 320px;
}

.produto-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.produto-modal-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
}

.produto-modal-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 22px 22px 18px;
}

.produto-modal-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: #222;
    padding-right: 34px;
}

.produto-modal-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 14px;
}

.produto-modal-price {
    font-size: 28px;
    font-weight: 800;
    color: #222;
    margin-bottom: 14px;
}

.produto-modal-loja {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #fff;
}

.produto-modal-loja-nome {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.produto-modal-loja-meta {
    font-size: 12px;
    color: #777;
}

.produto-modal-grupo {
    border-radius: 14px;
    background: #f5f5f5;
    margin-bottom: 14px;
    overflow: hidden;
}

.produto-modal-grupo-top {
    padding: 14px 16px;
    background: #efefef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.produto-modal-grupo-title {
    font-size: 21px;
    font-weight: 800;
    color: #444;
}

.produto-modal-grupo-subtitle {
    font-size: 13px;
    color: #777;
    margin-top: 2px;
}

.produto-modal-grupo-check {
    font-size: 22px;
    color: #32a852;
    flex-shrink: 0;
}

.produto-modal-aviso {
    padding: 16px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    background: #fff;
}

.produto-modal-observacao {
    margin-top: 6px;
}

.produto-modal-observacao-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #444;
    margin-bottom: 8px;
}

.produto-modal-observacao textarea {
    width: 100%;
    min-height: 94px;
    resize: vertical;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.produto-modal-observacao textarea:focus {
    border-color: #ea1d2c;
}

.produto-modal-footer {
    border-top: 1px solid #ececec;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    background: #fff;
}

.produto-modal-quantidade {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 6px 10px;
}

.produto-modal-quantidade button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    font-size: 24px;
    color: #ea1d2c;
    cursor: pointer;
}

.produto-modal-quantidade span {
    min-width: 18px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.produto-modal-add {
    border: 0;
    background: #ea1d2c;
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(234, 29, 44, 0.25);
}

.produto-modal-add strong {
    font-size: 16px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .produto-modal-dialog {
        width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
    }

    .produto-modal-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .produto-modal-media {
        height: 260px;
        min-height: 260px;
    }
}

@media (max-width: 640px) {
    .produto-modal-dialog {
        width: 100%;
        max-width: none;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        transform: none;
        top: 0;
        left: 0;
    }

    .produto-modal-grid {
        height: 100vh;
    }

    .produto-modal-media {
        height: 260px;
        min-height: 260px;
    }

    .produto-modal-scroll {
        padding: 18px 16px 16px;
    }

    .produto-modal-title {
        font-size: 20px;
    }

    .produto-modal-price {
        font-size: 24px;
    }

    .produto-modal-grupo-title {
        font-size: 18px;
    }

    .produto-modal-footer {
        padding: 12px 14px;
        gap: 10px;
    }

    .produto-modal-add {
        min-width: 0;
        flex: 1;
        padding: 14px 16px;
    }
}
.topbar-carrinho-btn {
    border: 0;
    cursor: pointer;
}

.add-btn {
    min-width: 108px;
    width: auto;
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
    border-radius: 12px;
}

.sacola-modal {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: none;
}

.sacola-modal.show {
    display: block;
}

.sacola-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.sacola-modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 24px);
    max-width: 620px;
    max-height: calc(100vh - 32px);
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
}

.sacola-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #ececec;
}

.sacola-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #222;
}

.sacola-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.sacola-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    background: #fafafa;
}

.sacola-vazia {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.sacola-item {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
}

.sacola-item-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.sacola-item-info {
    min-width: 0;
    flex: 1;
}

.sacola-item-info h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.3;
    color: #222;
}

.sacola-item-info p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #666;
}

.sacola-item-info strong {
    display: block;
    font-size: 16px;
    color: #222;
}

.sacola-remover {
    border: 0;
    background: transparent;
    color: #ea1d2c;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.sacola-item-bottom {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sacola-item-unitario {
    font-size: 13px;
    color: #666;
}

.sacola-qtd {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 6px 10px;
}

.sacola-qtd button {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    font-size: 22px;
    color: #ea1d2c;
    cursor: pointer;
}

.sacola-qtd span {
    min-width: 18px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.sacola-modal-footer {
    border-top: 1px solid #ececec;
    background: #fff;
    padding: 16px 18px 18px;
}

.sacola-resumo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 15px;
    color: #444;
}

.sacola-resumo strong {
    font-size: 22px;
    color: #222;
}

.sacola-continuar-btn {
    width: 100%;
    border: 0;
    background: #ea1d2c;
    color: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(234, 29, 44, 0.25);
}

@media (max-width: 640px) {
    .add-btn {
        min-width: 94px;
        padding: 0 12px;
        font-size: 13px;
    }

    .sacola-modal-dialog {
        width: 100%;
        max-width: none;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }

    .sacola-modal-header {
        padding: 16px 14px 12px;
    }

    .sacola-modal-body {
        padding: 14px;
    }

    .sacola-modal-footer {
        padding: 14px;
    }

    .sacola-resumo strong {
        font-size: 20px;
    }
}
.produto-modal-grupo-real {
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #fff;
    margin-bottom: 14px;
    overflow: hidden;
}

.produto-modal-grupo-head {
    padding: 14px 16px;
    background: #f7f7f7;
    border-bottom: 1px solid #ececec;
}

.produto-modal-grupo-real-title {
    font-size: 16px;
    font-weight: 800;
    color: #222;
    margin-bottom: 4px;
}

.produto-modal-grupo-real-sub {
    font-size: 12px;
    color: #666;
}

.produto-modal-opcoes {
    display: flex;
    flex-direction: column;
}

.produto-modal-opcao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.produto-modal-opcao:last-child {
    border-bottom: 0;
}

.produto-modal-opcao-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.produto-modal-opcao-left input[type="checkbox"] {
    transform: scale(1.15);
    flex-shrink: 0;
}

.produto-modal-opcao-foto {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #ececec;
    flex-shrink: 0;
}

.produto-modal-opcao-sem-foto {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid #ececec;
    background: #fafafa;
    color: #888;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px;
    flex-shrink: 0;
}

.produto-modal-opcao-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.produto-modal-opcao-info strong {
    font-size: 14px;
    color: #222;
    line-height: 1.3;
}

.produto-modal-opcao-info span {
    font-size: 12px;
    color: #666;
    line-height: 1.35;
}

.produto-modal-opcao-preco {
    font-size: 13px;
    font-weight: 800;
    color: #222;
    white-space: nowrap;
    flex-shrink: 0;
}

.produto-modal-opcao-vazia {
    padding: 14px;
    color: #666;
    font-size: 13px;
}

.sacola-adicionais {
    margin: 8px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sacola-adicional-linha {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: #555;
}

.sacola-adicional-linha strong {
    font-size: 12px;
    color: #222;
}

@media (max-width: 640px) {
    .produto-modal-opcao {
        padding: 12px;
    }

    .produto-modal-opcao-foto,
    .produto-modal-opcao-sem-foto {
        width: 40px;
        height: 40px;
    }

    .produto-modal-opcao-preco {
        font-size: 12px;
    }
}