/* =========================
   DESIGN SYSTEM • CHOCOPINGU
========================= */

/* RESET BÁSICO */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
}

/* =========================
   HEADER (INDEX + CHECKOUT)
========================= */

header {
    text-align: center;
    padding: 48px 20px 32px;
}

header h1 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 6px;
}

header p {
    font-size: 16px;
    color: #6e6e73;
}

/* =========================
   SEÇÃO DE PRODUTOS (INDEX)
========================= */

.produtos {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* CARD PADRÃO */
.produto,
.checkout-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    padding: 28px;
    box-shadow:
        0 10px 25px rgba(0,0,0,.05),
        0 1px 2px rgba(0,0,0,.04);
}

/* CARD PRODUTO (INDEX) */
.produto {
    text-align: center;
}

.produto img {
    margin-bottom: 16px;
}

.produto h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.produto p {
    font-size: 14px;
    color: #6e6e73;
    margin-bottom: 12px;
}

.produto span {
    display: block;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* BOTÃO PADRÃO */
.produto a,
.btn-primary {
    display: inline-block;
    text-decoration: none;
    background: linear-gradient(180deg, #007aff, #0063cc);
    color: #fff;
    padding: 14px 22px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 12px 24px rgba(0,122,255,.35);
    transition: transform .15s ease, filter .15s ease;
}

.produto a:hover,
.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* =========================
   CHECKOUT
========================= */

body.checkout {
    background: linear-gradient(180deg, #f9f9fb, #f1f1f4);
}

/* CONTAINER CHECKOUT */
.checkout-container {
    max-width: 760px;
    margin: auto;
    padding: 0 16px 60px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* TITULOS CHECKOUT */
.checkout-card h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 18px;
}

.checkout-card h3 {
    font-size: 16px;
    margin: 26px 0 12px;
}

/* PRODUTO CHECKOUT */
.produto-selecao > div {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.produto-img {
    width: 5em;
    max-width: 160px;
    height: auto;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
    padding: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* CAMPOS */
input,
select,
textarea {
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: #f5f5f7;
    font-size: 15px;
    color: #1d1d1f;
    line-height: 1.4;
    transition: all .2s ease;
    margin-bottom: 14px;
}

input::placeholder,
textarea::placeholder {
    color: #8e8e93;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: rgba(0,122,255,.4);
    box-shadow: 0 8px 20px rgba(0,0,0,.06);
}


textarea {
    resize: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,113,227,.25);
}

/* GRID */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

/* TOTAL */
.total {
    margin-top: 18px;
    font-size: 22px;
    font-weight: 600;
    text-align: right;
}

/* BOTÃO CHECKOUT */
.btn-primary {
    width: 100%;
    margin-top: 28px;
    border: none;
    cursor: pointer;
}

/* =========================
   FOOTER
========================= */

footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
    color: #6e6e73;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    header h1 {
        font-size: 30px;
    }

    .produto-selecao > div {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .total {
        text-align: center;
    }
}

.checkout-card form {
    display: flex;
    flex-direction: column;
}

.checkout-card h3 {
    margin-top: 32px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #6e6e73;
    font-weight: 500;
}

/* FIX DEFINITIVO — IMAGEM DO PRODUTO NO CHECKOUT */
body.checkout .produto-selecao img {
    width: 10em !important;
    max-width: 10em !important;
    height: auto !important;
    object-fit: contain;
    padding: 10px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
