/* =====================================================
   PRODUTOS / ARTES - CLEAN MODERNO RESPONSIVO
   (compartilhado entre a home e a página de categoria)
===================================================== */

#artes.artes-section {
    width: 100%;
    padding: 28px 14px 34px;
    background: #f7f8f6;
}

#artes * {
    box-sizing: border-box;
}

#artes h3 {
    margin: 0 0 18px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #18201a;
}

/* ===========================
   BUSCA CLEAN
=========================== */

#artes .form-pesquisa {
    width: 100%;
    max-width: 680px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px;
    background: #ffffff;
    border: 1px solid rgba(40, 167, 69, 0.22);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.045);
}

#artes .form-pesquisa:focus-within {
    border-color: #28a745;
    box-shadow: 0 10px 28px rgba(40,167,69,0.12);
}

#artes .form-pesquisa input[type="text"] {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 12px 14px;
    font-size: 15px;
    color: #202020;
}

#artes .form-pesquisa input[type="text"]::placeholder {
    color: #8d958e;
}

#artes .form-pesquisa button {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    transition: .2s ease;
}

#artes .form-pesquisa button:hover {
    background: #218838;
    transform: scale(1.03);
}

#artes .form-pesquisa button i {
    font-size: 17px;
}

#artes .form-pesquisa .limpar-busca {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f3f1;
    color: #6b726b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    text-decoration: none;
    transition: .2s ease;
}

#artes .form-pesquisa .limpar-busca:hover {
    background: #e3e6e3;
    color: #18201a;
}

#artes .busca-info {
    max-width: 680px;
    margin: -12px auto 22px;
    text-align: center;
    font-size: 14px;
    color: #6b726b;
}

#artes .busca-info strong {
    color: #28a745;
}

/* ===========================
   GRID DESKTOP
=========================== */

#artes .artes-grid {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* Vai reduzindo conforme a tela estreita. */
@media (max-width: 1000px) {
    #artes .artes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}

#artes .arte-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.045);
    transition: .22s ease;
}

#artes .arte-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.08);
}

/* Imagem mais próxima do topo */
#artes .arte-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1.10;
    background: #ffffff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

#artes .arte-img-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

#artes .arte-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
}

/* Informações quase coladas na imagem */
#artes .arte-info {
    padding: 2px 12px 13px;
}

#artes .arte-card h4 {
    margin: 0 0 2px;
    color: #151515;
    font-size: 15px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.2px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#artes .arte-categoria {
    margin: 0 0 5px;
    color: #7c837c;
    font-size: 12px;
    line-height: 1.1;
}

#artes .arte-preco-display {
    margin: 0 0 8px;
    color: #28a745;
    font-size: 16px;
    font-weight: 900;
}

/* ===========================
   AÇÕES: VISUALIZAR 25% + 2% + COMPRAR 73%
=========================== */

#artes .arte-acoes {
    width: 100%;
    display: flex;
    align-items: center;
}

#artes .btn-visualizar-arte {
    width: 25%;
    flex: 0 0 25%;
    margin-right: 2%;
    min-height: 38px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #eef5f0;
    color: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
}

#artes .btn-visualizar-arte i {
    font-size: 18px;
}

#artes .btn-visualizar-arte:hover {
    background: #28a745;
    color: #ffffff;
}

#artes .btn-comprar-baixar {
    width: 73%;
    flex: 0 0 73%;
    min-height: 38px;
    padding: 9px 8px;
    border-radius: 12px;
    background: #28a745;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
}

#artes .btn-comprar-baixar:hover {
    background: #218838;
    color: #ffffff;
}

/* ===========================
   PAGINAÇÃO
=========================== */

#artes .paginacao-container {
    margin: 28px auto 0;
    display: flex;
    justify-content: center;
}

#artes .paginacao-lista {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

#artes .paginacao-lista li {
    margin: 0;
}

#artes .paginacao-link {
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    color: #242424;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0,0,0,0.035);
    transition: .18s ease;
}

#artes .paginacao-link:visited,
#artes .paginacao-link:focus,
#artes .paginacao-link:active {
    text-decoration: none !important;
}

#artes .paginacao-lista li.active .paginacao-link,
#artes .paginacao-link:hover {
    background: #28a745;
    color: #ffffff;
    border-color: #28a745;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(40,167,69,.28);
}

/* ===========================
   MODAL TELA CHEIA
=========================== */

.modal-arte-full {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,0.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal-arte-full.ativo {
    display: flex;
}

.modal-arte-conteudo {
    width: 100%;
    max-width: 980px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-arte-conteudo img {
    max-width: 100%;
    max-height: 84vh;
    object-fit: contain;
    border-radius: 14px;
    background: #ffffff;
}

.modal-arte-conteudo p {
    margin: 10px 0 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.fechar-modal-arte {
    position: fixed;
    top: 14px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #111111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1000000;
}

/* ===========================
   MOBILE - SEM MARGEM NAS BORDAS
=========================== */

@media (max-width: 768px) {

    /* força a seção sair de qualquer container com padding */
    #artes.artes-section {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding: 20px 0 28px;
        overflow-x: hidden;
    }

    #artes h3 {
        font-size: 20px;
        margin-bottom: 14px;
        padding: 0 8px;
    }

    #artes .form-pesquisa {
        max-width: calc(100% - 12px);
        margin-bottom: 16px;
        padding: 5px;
        border-radius: 18px;
    }

    #artes .form-pesquisa input[type="text"] {
        font-size: 14px;
        padding: 10px 11px;
    }

    #artes .form-pesquisa button {
        width: 42px;
        height: 42px;
    }

    #artes .artes-grid {
        width: 93%;
        max-width: 96%;
        margin: 0 auto;
        padding: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    #artes .arte-card {
        width: 100%;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.045);
    }

    /* imagem mais próxima do topo no celular */
    #artes .arte-img-wrap {
        aspect-ratio: 1 / 1.12;
        align-items: flex-start;
    }

    #artes .arte-card img {
        object-position: center top;
    }

    /* mínimo de margem entre imagem e texto */
    #artes .arte-info {
        padding: 0 6px 8px;
        margin-top: -4px;
    }

    #artes .arte-card h4 {
        font-size: 12.5px;
        line-height: 1.12;
        margin-bottom: 1px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    #artes .arte-categoria {
        font-size: 10.5px;
        margin-bottom: 3px;
        line-height: 1.05;
    }

    #artes .arte-preco-display {
        font-size: 13px;
        margin-bottom: 5px;
    }

    #artes .btn-visualizar-arte {
        width: 25%;
        flex: 0 0 25%;
        margin-right: 2%;
        min-height: 32px;
        border-radius: 10px;
    }

    #artes .btn-visualizar-arte i {
        font-size: 16px;
    }

    #artes .btn-comprar-baixar {
        width: 73%;
        flex: 0 0 73%;
        min-height: 32px;
        padding: 7px 4px;
        border-radius: 10px;
        font-size: 11px;
    }

    .modal-arte-full {
        padding: 10px;
    }

    .modal-arte-conteudo img {
        max-height: 82vh;
        border-radius: 10px;
    }

    .fechar-modal-arte {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 26px;
    }
}

/* Celular muito pequeno */
@media (max-width: 360px) {
    #artes .artes-grid {
        gap: 5px;
        padding: 0;
    }

    #artes .arte-info {
        padding: 0 5px 7px;
        margin-top: -5px;
    }

    #artes .arte-card h4 {
        font-size: 11.5px;
    }

    #artes .arte-categoria {
        font-size: 10px;
    }

    #artes .btn-comprar-baixar {
        font-size: 10.5px;
    }

    #artes .btn-visualizar-arte i {
        font-size: 15px;
    }
}
