/* =========================================================
   1. ESTILOS BASE E CELULAR (MOBILE FIRST)
   ========================================================= */
#wts-catalogo-wrapper {
    font-family: sans-serif;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0;
    box-sizing: border-box;
}

#wts-loading-overlay {
    text-align: center;
    padding: 20px;
    font-weight: bold;
    color: #666;
}

#wts-catalogo-gatilho {
    height: 30px;
    margin-top: 10px;
    margin-bottom: 30px;
    clear: both;
}

.wts-lista-catalogo {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* Card do Produto no Celular */
.wts-produto-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    width: 100%;
    gap: 12px;
}

.wts-produto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.07);
}

.wts-produto-card img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    object-position: center;
    margin: 0 auto;
    display: block;
    flex-shrink: 0;
    background: #f9f9f9;
}

.wts-placeholder-img {
    background: #f4f4f4;
    width: 130px;
    min-height: 130px;
    display: block;
    flex-shrink: 0;
}

.wts-produto-info {
    padding: 12px 12px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    min-width: 0;
    box-sizing: border-box;
}

.wts-produto-info h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.3;
    font-weight: bold;
}

.wts-produto-info p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botões e Ícone WhatsApp */
.wts-acoes-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.wts-btn-ver-desc {
    background: #f3f4f6;
    color: #111827;
    padding: 9px 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.wts-produto-card:hover .wts-btn-ver-desc {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.wts-btn-whats {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25D366;
    color: #fff !important;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

.wts-btn-whats:hover {
    background: #1ebe5d;
}

.wts-icone-svg {
    flex-shrink: 0;
}

.wts-btn-add-lista {
    background: #0073aa;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    box-sizing: border-box;
}

.wts-btn-add-lista:hover {
    background: #005177;
}

.wts-btn-add-lista.adicionado {
    background: #2e7d32;
}

/* Modal Produto Individual (Tela Cheia sem brechas) */
.wts-produto-pagina-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    z-index: 99999998;
    overflow-y: auto;
    box-sizing: border-box;
}

.wts-modal-conteudo {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    font-family: sans-serif;
}

.wts-modal-fechar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #e5e7eb;
    color: #333;
    font-weight: bold;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    text-decoration: none;
    transition: background 0.2s;
    box-sizing: border-box;
}

.wts-modal-fechar:hover {
    background: #d1d5db;
}

.wts-produto-pagina-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.wts-col-esquerda {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wts-col-esquerda img {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    border: 1px solid #eee;
    border-radius: 8px;
}

.wts-col-direita h3 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
}

.wts-col-direita .descricao-curta {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 18px 0;
    white-space: pre-line;
}

.wts-modal-acoes-produto {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.wts-col-direita .descricao {
    font-size: 17px;
    color: #555;
    line-height: 1.6;
    margin-top: 20px;
    white-space: pre-line;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Botão Flutuante e Modal da Lista */
#wts-btn-flutuante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #09a501;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 99999999;
    transition: transform 0.2s;
}

#wts-btn-flutuante:hover {
    transform: scale(1.05);
}

.wts-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 100000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    font-family: sans-serif;
}

.wts-modal-lista-box {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    padding: 20px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.wts-modal-lista-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.wts-modal-lista-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

#wts-fechar-lista {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

#wts-itens-selecionados-container {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wts-item-selecionado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    gap: 10px;
}

.wts-item-selecionado-info {
    flex-grow: 1;
}

.wts-item-selecionado-titulo {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    display: block;
}

.wts-qtd-controles {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wts-qtd-btn {
    background: #eee;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.wts-modal-lista-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.wts-btn-sec {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
}

/* =========================================================
   2. AJUSTES PARA DESKTOP E TELAS MAIORES
   ========================================================= */
@media (min-width: 768px) {
    .wts-modal-conteudo {
        padding: 35px 40px;
    }

    .wts-produto-pagina-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }

    .wts-col-esquerda {
        width: 45%;
    }

    .wts-col-direita {
        width: 55%;
    }

    .wts-col-direita h2 {
        font-size: 25px;
    }

    .wts-col-direita .descricao-curta {
        font-size: 16px;
    }

    .wts-modal-acoes-produto {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .wts-modal-acoes-produto .wts-btn-add-lista,
    .wts-modal-acoes-produto .wts-btn-whats,
    .wts-modal-acoes-produto .wts-modal-fechar {
        padding: 14px 22px;
        font-size: 15px;
    }
}

@media (min-width: 900px) {
    #wts-catalogo-wrapper {
        max-width: 1280px;
        padding: 20px;
    }

    .wts-lista-catalogo {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }

    .wts-produto-card {
        flex-direction: column;
        gap: 0;
    }

    .wts-produto-card img,
    .wts-placeholder-img {
        width: 100%;
        height: 210px;
        object-fit: cover;
        object-position: center;
    }

    .wts-produto-info {
        padding: 15px;
    }

    .wts-produto-info h3 {
        font-size: 17px;
    }

    .wts-produto-info p {
        font-size: 13px;
        -webkit-line-clamp: 2;
        margin-top: 6px;
    }

    .wts-acoes-card {
        flex-direction: column;
        margin-top: 14px;
    }

    .wts-acoes-card .wts-btn-add-lista,
    .wts-acoes-card .wts-btn-whats {
        width: 100%;
    }
}
