:root {
    --primary-color: #59595a;
    --background-color: #F2F2F7;
    --text-color: #1C1C1E;
    --border-radius: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#app {
    width: 100%;
    max-width: 600px;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    text-align: center;
}

h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

main {
    padding: 20px;
}

#imagem-principal {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* 4:3 aspect ratio */
    margin-bottom: 5px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

#movel,
#sobreposicao {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#controles {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#opcoes-cores-container,
#opcoes-estampas-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 5px;
}

#opcoes-cores,
#opcoes-estampas {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 5px 0;
    scroll-snap-type: x mandatory;
}

.opcao-cor,
.opcao-estampa {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #CCCCCC;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    scroll-snap-align: center;
    overflow: hidden;
    padding: 0;
    /* Adicionado para remover padding interno */
    background-color: transparent;
    /* Adicionado para garantir fundo transparente */
}

.opcao-estampa img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Adicionado para remover espaço extra abaixo da imagem */
}

.opcao-cor:hover,
.opcao-cor:focus,
.opcao-estampa:hover,
.opcao-estampa:focus {
    transform: scale(1.1);
    outline: none;
    border-color: #999999;
}

.opcao-cor.selecionada,
.opcao-estampa.selecionada {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Esconder a barra de rolagem, mas manter a funcionalidade */
#opcoes-cores::-webkit-scrollbar,
#opcoes-estampas::-webkit-scrollbar {
    display: none;
}

#opcoes-cores,
#opcoes-estampas {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#remover-sobreposicao {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

#remover-sobreposicao:hover {
    background-color: #0056b3;
}

@media (max-width: 480px) {
    #app {
        border-radius: 0;
    }

    .opcao-cor,
    .opcao-estampa {
        width: 40px;
        height: 40px;
    }
}

.oculto {
    display: none;
}