
/* ==========================================
   1. FONTES E CONFIGURAÇÕES GERAIS
========================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: 'DM Sans', Arial, sans-serif;

    background: var(--bg);
    color: var(--text);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}


/* ==========================================
   2. IDENTIDADE VISUAL DOS QUATRO MODELOS
========================================== */

/* BURGER - PRETO E AMARELO */

body.burger {
    --bg: #171618;
    --panel: #29272b;
    --card: #2c2a2e;
    --text: #f8f6f5;
    --muted: #b7b1b5;
    --accent: #ffb500;
    --accent-text: #1c1710;
    --border: #464149;
}

/* PIZZA - BRANCO E VERMELHO */

body.pizza {
    --bg: #faf8f6;
    --panel: #ffffff;
    --card: #ffffff;
    --text: #2d2424;
    --muted: #8a7e7e;
    --accent: #e12524;
    --accent-text: #ffffff;
    --border: #e8e0e0;
}

/* CAFÉ - MARROM E CREME */

body.cafe {
    --bg: #f4ede3;
    --panel: #fffaf3;
    --card: #e7d9c5;
    --text: #3b281e;
    --muted: #7f6c5e;
    --accent: #40291f;
    --accent-text: #fff7e8;
    --border: #d7c8b5;
}

/* ELEGANCE - MINIMALISTA */

body.elegance {
    --bg: #f4f1eb;
    --panel: #fdfbf6;
    --card: #e7e0d5;
    --text: #26221f;
    --muted: #777069;
    --accent: #26221f;
    --accent-text: #ffffff;
    --border: #c8c0b5;
}


/* ==========================================
   3. BARRA DE DEMONSTRAÇÃO
========================================== */

.demo-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 12px 30px;

    padding: 11px 18px;

    background: #2b1748;
    color: #e6d9ff;

    text-align: center;
    font-size: 11px;
    letter-spacing: 1.2px;
}

.demo-banner a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ==========================================
   4. ESTRUTURA PRINCIPAL DA LOJA
========================================== */

.shop {
    max-width: 1050px;
    min-height: 100vh;

    margin: 0 auto;

    background: var(--panel);

    box-shadow: 0 0 55px #00000012;
}


/* ==========================================
   5. CABEÇALHO DA LOJA
========================================== */

.shop-head {
    position: relative;

    display: flex;
    align-items: center;

    gap: 20px;

    padding: 42px 42px 35px;

    background: var(--card);
}

.head-text {
    min-width: 0;
}

.logo {
    display: grid;
    place-items: center;

    flex-shrink: 0;

    width: 112px;
    height: 112px;

    padding: 12px;

    background: #ffffff18;

    border-radius: 24px;

    font-size: 60px;
}

.mini-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;

    opacity: 0.7;
}

.shop-head h1 {
    margin: 8px 0;

    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.1;
}

.shop-head p {
    margin: 0 0 12px;

    font-size: 14px;
    line-height: 1.6;

    opacity: 0.8;
}

.status {
    display: inline-block;

    padding: 7px 11px;

    background: #b0f2d5;
    color: #126144;

    border-radius: 99px;

    font-size: 11px;
    font-weight: 600;
}


/* ==========================================
   6. CABEÇALHOS POR MODELO
========================================== */

.burger .shop-head {
    background: #252327;
}

.burger .shop-head h1 span {
    color: var(--accent);
}

.burger .logo {
    background: #363337;
}

.pizza .shop-head {
    background: linear-gradient(
            120deg,
            #e02a22,
            #fa5140
    );

    color: white;
}

.cafe .shop-head {
    background: #40291f;
    color: #fff4e4;
}

.elegance .shop-head {
    background: #f4f1eb;
    border-bottom: 1px solid var(--border);
}

.elegance .shop-head h1 {
    font-family: Georgia, serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}


/* ==========================================
   7. BOTÃO DO CARRINHO
========================================== */

.cart-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    flex-shrink: 0;

    margin-left: auto;
    align-self: flex-start;

    padding: 12px;

    border: 1px solid #ffffff66;
    border-radius: 14px;

    background: #ffffff20;
    color: inherit;

    font-size: 19px;
    white-space: nowrap;

    transition: transform 0.2s;
}

.cart-toggle:hover {
    transform: translateY(-2px);
}

.cart-toggle span {
    padding: 3px 7px;

    background: var(--accent);
    color: var(--accent-text);

    border-radius: 99px;

    font-size: 11px;
    font-weight: 800;
}

.pizza .cart-toggle {
    border-color: #ffffff80;
}

.elegance .cart-toggle {
    border-color: var(--border);
    background: transparent;
}


/* ==========================================
   8. CONTEÚDO DA LOJA
========================================== */

.shop-content {
    padding: 32px 42px 55px;
}


/* ==========================================
   9. CAMPO DE PESQUISA
========================================== */

.searchbar {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 17px;

    background: var(--bg);

    border: 1px solid var(--border);
    border-radius: 13px;

    font-size: 26px;

    transition: border-color 0.2s;
}

.searchbar:focus-within {
    border-color: var(--accent);
}

.searchbar input {
    flex: 1;
    min-width: 0;

    padding: 16px 0;

    border: none;
    outline: none;

    background: transparent;
    color: var(--text);

    font-size: 15px;
}

.searchbar input::placeholder {
    color: var(--muted);
}


/* ==========================================
   10. CATEGORIAS
========================================== */

.categories {
    display: flex;
    gap: 10px;

    overflow-x: auto;

    padding: 24px 0 12px;

    scrollbar-width: thin;
}

.categories button {
    flex-shrink: 0;

    padding: 11px 18px;

    border: 1px solid var(--border);
    border-radius: 99px;

    background: transparent;
    color: var(--text);

    font-weight: 700;

    white-space: nowrap;

    transition:
            background 0.2s,
            border-color 0.2s;
}

.categories button:hover {
    border-color: var(--accent);
}

.categories button.active {
    background: var(--accent);
    color: var(--accent-text);

    border-color: var(--accent);
}


/* ==========================================
   11. TÍTULO DA CATEGORIA
========================================== */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 12px;

    margin: 18px 0 22px;
}

.section-heading small {
    color: var(--accent);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.section-heading h2 {
    margin: 5px 0;

    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px;
    font-weight: 700;
}

.section-heading span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.elegance .section-heading h2 {
    font-family: Georgia, serif;
    font-weight: 400;
}


/* ==========================================
   12. GRADE DE PRODUTOS
========================================== */

.products {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.product {
    display: flex;
    flex-direction: column;

    min-width: 0;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 17px;

    overflow: hidden;

    transition:
            transform 0.25s,
            box-shadow 0.25s,
            border-color 0.25s;
}

.product:hover {
    transform: translateY(-4px);

    border-color: var(--accent);

    box-shadow: 0 12px 28px #00000018;
}


/* ==========================================
   13. FOTOGRAFIAS DOS PRODUTOS
========================================== */

.product-visual {
    width: 100%;
    height: 190px;

    overflow: hidden;

    background: var(--card);
}

.product-visual img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition: transform 0.35s ease;
}

.product:hover .product-visual img {
    transform: scale(1.06);
}

/* Enquadramentos por modelo */

.burger .product-visual img {
    object-position: center 55%;
}

.pizza .product-visual img {
    object-position: center;
}

.cafe .product-visual img {
    object-position: center;
}

.elegance .product-visual img {
    object-position: center;
}


/* ==========================================
   14. INFORMAÇÕES DOS PRODUTOS
========================================== */

.product-info {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 18px;
}

.product-info h3 {
    margin: 0 0 7px;

    font-size: 17px;
    line-height: 1.3;
}

.product-info p {
    margin: 0 0 18px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.5;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    margin-top: auto;
}

.product-bottom strong {
    font-size: 16px;
    white-space: nowrap;
}

.product-bottom button,
.primary {
    padding: 11px 16px;

    border: none;
    border-radius: 10px;

    background: var(--accent);
    color: var(--accent-text);

    font-weight: 800;

    transition:
            transform 0.2s,
            filter 0.2s;
}

.product-bottom button:hover,
.primary:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}


/* ==========================================
   15. AJUSTES VISUAIS DOS MODELOS
========================================== */

.pizza .product {
    box-shadow: 0 6px 20px #00000008;
}

.cafe .product {
    background: #fffaf3;
}

.elegance .product {
    border-radius: 0;
}

.elegance .product-info h3 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: 20px;
}

.elegance .product-bottom button,
.elegance .primary {
    border-radius: 0;
}


/* ==========================================
   16. RODAPÉ DA LOJA
========================================== */

.shop-footer {
    padding: 45px 20px;

    color: var(--muted);

    text-align: center;

    font-size: 12px;
    line-height: 1.7;
}

.shop-footer p {
    margin: 0 0 5px;
}

.shop-footer small {
    font-size: 11px;
}


/* ==========================================
   17. FUNDO DO CARRINHO
========================================== */

.overlay {
    position: fixed;
    inset: 0;

    z-index: 10;

    background: #0009;
}

.overlay[hidden] {
    display: none;
}


/* ==========================================
   18. CARRINHO LATERAL
========================================== */

.drawer {
    position: fixed;

    top: 0;
    right: 0;

    z-index: 20;

    display: flex;
    flex-direction: column;

    width: min(420px, 100%);
    height: 100%;
    height: 100dvh;

    padding: 25px;

    background: var(--panel);
    color: var(--text);

    box-shadow: -15px 0 60px #0005;

    transform: translateX(105%);

    transition: transform 0.25s;
}

.drawer.open {
    transform: translateX(0);
}

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

.drawer-head h2 {
    margin: 0;
}

.drawer-head button,
.close {
    border: none;

    background: transparent;
    color: var(--text);

    font-size: 32px;
    line-height: 1;

    cursor: pointer;
}

.drawer #cart-items {
    flex: 1;
    min-height: 0;

    overflow-y: auto;

    margin-top: 22px;
}


/* ==========================================
   19. ITENS DO CARRINHO
========================================== */

.cart-row {
    padding: 14px 0;

    border-bottom: 1px solid var(--border);
}

.cart-row b {
    display: block;
}

.cart-row small {
    display: block;

    margin: 5px 0;

    color: var(--muted);
}

.cart-row > strong {
    display: block;
    margin-top: 7px;
}

.cart-actions {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-top: 10px;
}

.cart-actions button {
    padding: 4px 10px;

    border: 1px solid var(--border);
    border-radius: 6px;

    background: transparent;
    color: var(--text);
}

.cart-actions .remove {
    margin-left: auto;
    color: var(--muted);
}

.cart-bottom {
    flex-shrink: 0;

    padding-top: 12px;

    border-top: 1px solid var(--border);
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 18px 0;

    font-size: 19px;
}

.wide {
    width: 100%;
    padding: 16px;
}


/* ==========================================
   20. MODAIS
========================================== */

.modal {
    width: min(520px, calc(100vw - 24px));
    max-height: 90vh;
    max-height: 90dvh;

    padding: 30px;

    border: none;
    border-radius: 19px;

    background: var(--panel);
    color: var(--text);

    overflow-y: auto;

    box-shadow: 0 30px 90px #0008;
}

.modal::backdrop {
    background: #0009;
}

.modal .close {
    float: right;
    position: relative;
    z-index: 2;
}

.modal h2 {
    margin: 10px 0;

    font-size: 27px;
}

.modal p {
    color: var(--muted);
    line-height: 1.6;
}


/* ==========================================
   21. FOTO GRANDE DO PRODUTO
========================================== */

.detail-visual {
    width: 100%;
    height: 250px;

    margin: 28px 0 18px;

    background: var(--card);

    border-radius: 15px;

    overflow: hidden;
}

.detail-visual img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}


/* ==========================================
   22. ADICIONAIS
========================================== */

.extra {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 12px 0;

    border-bottom: 1px solid var(--border);

    cursor: pointer;
}

.extra span {
    margin-left: auto;

    font-size: 13px;
    white-space: nowrap;
}

.extra input {
    flex-shrink: 0;

    width: 18px;
    height: 18px;

    accent-color: var(--accent);
}


/* ==========================================
   23. QUANTIDADE E PREÇO
========================================== */

.detail-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 20px;
}

.qty {
    display: flex;
    align-items: center;

    gap: 12px;
}

.qty button {
    padding: 8px 13px;

    background: var(--card);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 7px;
}

.modal .primary {
    margin-top: 18px;
}


/* ==========================================
   24. FINALIZAÇÃO SIMULADA
========================================== */

.checkout-modal input,
.checkout-modal select {
    display: block;

    width: 100%;

    padding: 12px;
    margin: 7px 0 15px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--bg);
    color: var(--text);
}

.checkout-modal label {
    font-size: 13px;
    font-weight: 700;
}

.checkout-modal .success {
    padding: 25px 0;
    text-align: center;
}

.checkout-modal .success .check {
    font-size: 55px;
    color: var(--accent);
}

.empty {
    padding: 50px 10px;

    color: var(--muted);

    text-align: center;
}


/* ==========================================
   25. RESPONSIVIDADE - TABLETS
========================================== */

@media (max-width: 900px) {

    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================
   26. RESPONSIVIDADE - CELULARES
========================================== */

@media (max-width: 700px) {

    .demo-banner {
        gap: 8px 18px;
        padding: 10px;
        font-size: 9px;
    }

    /* Cabeçalho */

    .shop-head {
        padding: 28px 18px;
        gap: 12px;
    }

    .logo {
        width: 64px;
        height: 64px;

        padding: 8px;

        border-radius: 15px;

        font-size: 35px;
    }

    .mini-label {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .shop-head h1 {
        font-size: 25px;
    }

    .shop-head p {
        font-size: 12px;
    }

    .cart-toggle {
        padding: 8px;
        font-size: 14px;
    }

    /* Conteúdo */

    .shop-content {
        padding: 20px 16px 40px;
    }

    .searchbar input {
        font-size: 14px;
    }

    .categories {
        padding: 18px 0 10px;
    }

    .categories button {
        padding: 10px 14px;
        font-size: 12px;
    }

    .section-heading h2 {
        font-size: 24px;
    }

    /* Produtos */

    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-visual {
        height: 145px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .product-info p {
        font-size: 11px;
    }

    .product-bottom {
        flex-wrap: wrap;
    }

    .product-bottom strong {
        font-size: 13px;
    }

    .product-bottom button {
        padding: 9px 10px;
        font-size: 11px;
    }

    /* Modal */

    .modal {
        padding: 22px;
    }

    .detail-visual {
        height: 200px;
    }

}


/* ==========================================
   27. RESPONSIVIDADE - CELULARES PEQUENOS
========================================== */

@media (max-width: 380px) {

    .shop-head {
        align-items: flex-start;
    }

    .logo {
        width: 52px;
        height: 52px;
        font-size: 28px;
    }

    .shop-head h1 {
        font-size: 21px;
    }

    .shop-head p {
        font-size: 11px;
    }

    .status {
        font-size: 9px;
        padding: 6px 8px;
    }

    .product-visual {
        height: 120px;
    }

    .product-bottom button {
        width: 100%;
    }

    .detail-visual {
        height: 170px;
    }

}

/* ==========================================
   REFINAMENTOS FINAIS - FOTOGRAFIAS E MOBILE
========================================== */
.logo { overflow: hidden; padding: 0; }
.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.product-visual, .detail-visual { display: block; overflow: hidden; padding: 0; }
.product-visual img, .detail-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-visual { background: var(--card); }
.product-visual:has(img) { font-size: 0; }
@media (max-width: 700px) {
  .shop-head { align-items: center; }
  .head-text { flex: 1; min-width: 0; }
  .shop-head h1 { overflow-wrap: anywhere; }
  .product-visual { height: clamp(130px, 40vw, 190px); }
  .product-info { min-width: 0; }
  .product-bottom { align-items: stretch; }
  .product-bottom button { min-height: 38px; }
  .modal { width: calc(100vw - 20px); padding: 20px; }
  .drawer { padding: 20px; }
}
@media (max-width: 420px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-info { padding: 11px; }
  .product-bottom button { width: 100%; }
  .shop-head { padding: 20px 12px; gap: 9px; }
  .logo { width: 54px; height: 54px; }
  .shop-head h1 { font-size: 22px; }
  .cart-toggle { padding: 7px; }
}

.photo-unavailable { display: grid; place-items: center; width: 100%; height: 100%; padding: 16px; font-size: 12px; color: var(--muted); text-align: center; }
