/*!
 * galeria_opcoes.css
 * Componente visual: botao "Ver imagens" ao lado de um <select>,
 * abrindo um modal com a grade de imagens das opcoes (moldura, estojo, cor do courino...).
 * O <select> original e mantido e sincronizado nos dois sentidos.
 */

/* ---------- Linha do select + botao ---------- */
.go-linha {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.go-linha > select {
    flex: 1 1 auto;
    min-width: 0;
}

.go-btn {
    background: #d20245;
    border: 1px solid #d20245;
    color: #fff;
    white-space: nowrap;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.go-btn:hover,
.go-btn:focus {
    background: #b00238;
    border-color: #b00238;
    color: #fff;
    outline: none;
}

.go-btn .go-badge {
    background: rgba(255, 255, 255, .25);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Overlay / caixa do modal ---------- */
.go-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, .68);
    z-index: 10800;
    display: none;
    padding: 18px;
}

.go-overlay.go-aberto {
    display: flex;
    align-items: center;
    justify-content: center;
}

.go-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 1040px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.go-topo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.go-topo h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #222;
}

.go-topo .go-sub {
    font-size: 12.5px;
    color: #6c757d;
    margin: 0;
}

.go-busca {
    flex: 1 1 220px;
    min-width: 160px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.go-busca:focus {
    outline: none;
    border-color: #f3a0b8;
    box-shadow: 0 0 0 3px rgba(210, 2, 69, .08);
}

.go-fechar {
    border: 0;
    background: #f1f1f1;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 1;
    color: #444;
    cursor: pointer;
    flex: 0 0 auto;
}

.go-fechar:hover {
    background: #e2e2e2;
}

/* ---------- Grade de imagens ---------- */
.go-grid {
    overflow-y: auto;
    padding: 16px 18px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 14px;
}

.go-item {
    border: 2px solid #ececec;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    background: #fff;
    text-align: center;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    position: relative;
}

.go-item:hover {
    border-color: #f3a0b8;
    transform: translateY(-2px);
}

.go-item.go-ativo {
    border-color: #d20245;
    box-shadow: 0 0 0 3px rgba(210, 2, 69, .10);
}

.go-item img {
    width: 100%;
    height: 108px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
    display: block;
}

.go-sem-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 108px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #c4c4c4;
    font-size: 30px;
}

.go-nome {
    display: block;
    font-size: 12.5px;
    color: #333;
    margin-top: 8px;
    line-height: 1.3;
    font-weight: 600;
    word-break: break-word;
}

.go-preco {
    display: block;
    color: #d20245;
    font-weight: 700;
    font-size: 12.5px;
    margin-top: 3px;
}

.go-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d20245;
    color: #fff;
    font-size: 13px;
    display: none;
    align-items: center;
    justify-content: center;
}

.go-item.go-ativo .go-check {
    display: flex;
}

.go-vazio {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    padding: 40px 10px;
    font-size: 15px;
}

/* ---------- Mobile ---------- */
@media (max-width: 575px) {
    .go-overlay {
        padding: 0;
    }

    .go-box {
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }

    .go-grid {
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
        gap: 10px;
    }

    .go-item img,
    .go-sem-img {
        height: 92px;
    }

    .go-linha {
        flex-wrap: wrap;
    }

    .go-btn {
        width: 100%;
        justify-content: center;
    }
}
