* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    padding: 12px 24px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #000;
    text-decoration: none;
}
.logo:hover { opacity: 0.8; }

.search-bar {
    flex: 1;
    max-width: 400px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-bar:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.cart-icon {
    position: relative;
    text-decoration: none;
    font-size: 22px;
    color: #1d1d1f;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
}

/* ========== MAIN ========== */
main {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    min-height: calc(100vh - 200px);
}

/* ========== CABEÇALHO ========== */
.checkout-header { margin-bottom: 32px; }

.btn-voltar {
    color: #007aff;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 8px;
}

.btn-voltar:hover { text-decoration: underline; }

.checkout-header h1 { font-size: 32px; font-weight: 700; }

/* ========== GRID ========== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* ========== FORMULÁRIO ========== */
.checkout-form-container {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s;
    color: #1d1d1f;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.btn-finalizar-pedido {
    width: 100%;
    padding: 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-finalizar-pedido:hover { background: #0051b3; }

/* ========== RESUMO ========== */
.checkout-resumo {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 90px;
}

.checkout-resumo h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.resumo-itens {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.resumo-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.resumo-item-info { flex: 2; }

.resumo-item-nome { font-weight: 500; margin-bottom: 4px; }

.resumo-item-quantidade { color: #6e6e73; font-size: 12px; }

.resumo-item-preco { font-weight: 500; color: #1d1d1f; }

.resumo-linha {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: #1d1d1f;
}

.resumo-total {
    border-top: 2px solid #e0e0e0;
    padding-top: 16px;
    margin-top: 8px;
    font-weight: 700;
    font-size: 20px;
}

.resumo-deposito {
    color: #007aff;
    font-weight: 500;
    font-size: 15px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}

/* ========== AVISO DE LOCALIZAÇÃO ========== */
.aviso-localizacao {
    background: #e8f0fe;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: #1d1d1f;
}

.aviso-localizacao i { margin-right: 8px; }

.aviso-localizacao button {
    background: none;
    border: none;
    color: #007aff;
    cursor: pointer;
    font-weight: 500;
}

.aviso-localizacao button:hover { text-decoration: underline; }

/* ========== FOOTER ========== */
.footer {
    background: #f5f5f7;
    border-top: 1px solid #e0e0e0;
    padding: 32px 24px;
    margin-top: 48px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: #6e6e73;
    font-size: 14px;
}

.footer-social { display: flex; gap: 16px; }

.footer-social a { color: #6e6e73; transition: color 0.2s; }

.footer-social a:hover { color: #007aff; }

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .checkout-resumo {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .checkout-header h1 { font-size: 28px; }

    .aviso-localizacao {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .checkout-form-container { padding: 20px; }

    .checkout-header h1 { font-size: 24px; }

    .btn-finalizar-pedido {
        font-size: 15px;
        padding: 14px;
    }

    .resumo-total { font-size: 18px; }
}