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

#wts-loading-overlay {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    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: 18px;
    width: 100%;
}

/* Card do Produto */
.wts-produto-card {
    display: flex;
    flex-direction: column;
    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%;
}

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

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

.wts-placeholder-img {
    background: #f4f4f4;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    flex-shrink: 0;
}

.wts-produto-info {
    padding: 15px;
    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: 18px;
    color: #333;
    line-height: 1.35;
    font-weight: bold;
}

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

.wts-btn-ver-desc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #111827;
    padding: 0.65em 1em;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.25;
    border: 1px solid #d1d5db;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    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: 0.45em;
    background: #25D366;
    color: #fff !important;
    padding: 0.65em 1em;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 17px;
    line-height: 1.25;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
    text-align: center;
    width: 100%;
}

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

.wts-icone-svg {
    width: 1.45em !important;
    height: 1.45em !important;
    flex-shrink: 0;
    vertical-align: middle;
}

.wts-btn-add-lista {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #09a501;
    color: #fff;
    padding: 0.65em 1em;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.25;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    box-sizing: border-box;
    width: 100%;
}

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

.wts-btn-add-lista.adicionado {
    background: #0073aa;
}

/* 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: 0.7em 1.2em;
    font-size: 16px;
    line-height: 1.25;
    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;
    inset: 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: 520px;
    border-radius: 12px;
    padding: 22px;
    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: 12px;
    margin-bottom: 15px;
}

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

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

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

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

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

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

.wts-qtd-controles {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
}

.wts-qtd-btn {
    background: #eee;
    border: none;
    width: 2.1em;
    height: 2.1em;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.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 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 0.65em 1em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.25;
}

/* =========================================================
   2. AJUSTES PARA DESKTOP E TELAS MAIORES
   ========================================================= */
@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-info {
        padding: 16px;
    }

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

    .wts-acoes-card {
        margin-top: 16px;
    }

    .wts-acoes-card .wts-btn-ver-desc,
    .wts-acoes-card .wts-btn-add-lista {
        font-size: 16px;
    }

    .wts-acoes-card .wts-btn-whats {
        font-size: 18px;
    }
}