/* Cores baseadas na Shopee */
:root {
    --shopee-orange: #ee4d2d;
    --shopee-orange-dark: #d73211;
    --shopee-bg: #f5f5f5;
    --shopee-text: #333333;
    --shopee-gray: #757575;
    --shopee-border: #e8e8e8;
    --shopee-white: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--shopee-bg);
    color: var(--shopee-text);
    line-height: 1.5;
}

/* Cabecalho */
body > img {
    display: block;
    margin: 0 auto;
    padding: 10px 0;
    max-width: 100%;
    height: auto;
}

/* Area principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 20px;
}

/* Formulario de busca */
.form-section {
    margin-bottom: 20px;
}

.form-section form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-section input[type="text"] {
    flex: 1 1 200px;
    padding: 10px 12px;
    border: 1px solid var(--shopee-border);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.form-section input[type="text"]:focus {
    border-color: var(--shopee-orange);
}

.form-section button {
    padding: 10px 18px;
    background-color: var(--shopee-orange);
    color: var(--shopee-white);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.form-section button:hover {
    background-color: var(--shopee-orange-dark);
}

/* Grid de cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 30px;
}

/* Card */
.card {
    background: var(--shopee-white);
    border: 1px solid var(--shopee-border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #fafafa;
}

.card .loja {
    display: inline-block;
    font-size: 12px;
    color: var(--shopee-gray);
    margin: 8px 10px 4px;
}

.card > b:last-of-type {
    /* preco em negrito */
    font-size: 16px;
    color: var(--shopee-orange);
    margin: 4px 10px 8px;
}

/* Texto do produto */
.card {
    font-size: 13px;
}

.card > br {
    display: none; /* esconde <br> soltos, o layout ja organiza */
}

/* Botao "Ver Shopee" */
.card a {
    display: block;
    margin: 8px 10px 12px;
    padding: 8px 10px;
    background-color: var(--shopee-orange);
    color: var(--shopee-white);
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.card a:hover {
    background-color: var(--shopee-orange-dark);
}

/* Responsividade extra para telas pequenas */
@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .card img {
        height: 140px;
    }

    .form-section input[type="text"] {
        flex: 1 1 100%;
    }

    .form-section button {
        width: 100%;
    }
}