/* Lista de Desejos - Minimalista - Estilo SIA */

/* Variáveis */
:root {
    --ld-primary: #000;
    --ld-secondary: #666;
    --ld-light: #999;
    --ld-bg: #fff;
    --ld-card: #fff;
    --ld-border: #e0e0e0;
    --ld-success: #2e7d32;
    --ld-danger: #c62828;
    --ld-font: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* Botão na página do produto */
.lista-desejos-botao-wrapper {
    margin: 16px 0;
}

.lista-desejos-botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--ld-primary);
    border: 1px solid var(--ld-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--ld-font);
    width: 100%;
    max-width: 400px;
}

.lista-desejos-botao:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.lista-desejos-botao:hover svg {
    stroke: #fff;
    fill: #fff;
}

.lista-desejos-botao.na-lista {
    background: var(--ld-primary);
    color: #fff;
}

.lista-desejos-botao.na-lista svg {
    fill: #fff;
    stroke: #fff;
}

.lista-desejos-botao.na-lista:hover {
    background: #333;
    color: #fff;
}

.lista-desejos-botao.na-lista:hover svg {
    fill: #fff;
    stroke: #fff;
}

.lista-desejos-botao svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

/* Bloquear scroll quando pop-up estiver aberto */
body.lista-desejos-popup-aberto {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Pop-up */
.lista-desejos-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    font-family: var(--ld-font);
    overflow-y: auto;
    padding: 20px;
}

.lista-desejos-popup.active {
    display: flex;
}

.lista-desejos-popup-content {
    background: var(--ld-card);
    padding: 48px 40px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: popupFadeIn 0.25s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lista-desejos-popup-fechar {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ld-primary);
    transition: opacity 0.2s ease;
    width: 32px;
    height: 32px;
}

.lista-desejos-popup-fechar:hover {
    opacity: 0.5;
}

.lista-desejos-popup-fechar svg {
    width: 20px;
    height: 20px;
}

.lista-desejos-popup-content h3 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--ld-primary);
    letter-spacing: 0.02em;
}

.lista-desejos-popup-content p {
    font-size: 14px;
    color: var(--ld-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.lista-desejos-popup-botoes {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.lista-desejos-popup-botoes button,
.lista-desejos-popup-botoes a {
    padding: 14px 28px;
    border: 1px solid var(--ld-primary);
    background: transparent;
    color: var(--ld-primary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lista-desejos-popup-botoes button:hover,
.lista-desejos-popup-botoes a:hover {
    background: var(--ld-primary);
    color: #fff;
}

.lista-desejos-popup-botoes .botao-primario {
    background: var(--ld-primary);
    color: #fff;
}

.lista-desejos-popup-botoes .botao-primario:hover {
    background: #333;
    border-color: #333;
}

/* Página Minha Conta */
.lista-desejos-container {
    font-family: var(--ld-font);
    -webkit-font-smoothing: antialiased;
}

.lista-desejos-container h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 32px;
    color: var(--ld-primary);
    letter-spacing: 0.02em;
    text-align: center;
}

.lista-vazia {
    text-align: center;
    padding: 80px 24px;
    color: var(--ld-secondary);
    font-size: 14px;
}

.lista-vazia::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='1'%3E%3Cpath d='M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.566'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
}

.lista-desejos-tabela-wrapper {
    overflow-x: auto;
    margin-bottom: 48px;
}

.lista-desejos-tabela {
    width: 100%;
    border-collapse: collapse;
}

.lista-desejos-tabela thead {
    border-bottom: 1px solid var(--ld-border);
}

.lista-desejos-tabela th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ld-secondary);
}

.lista-desejos-tabela td {
    padding: 24px 12px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.lista-desejos-tabela tbody tr {
    transition: background 0.2s ease;
}

.lista-desejos-tabela tbody tr:hover {
    background: #fafafa;
}

.imagem-produto a {
    display: block;
}

.imagem-produto img {
    width: 80px;
    height: 100px;
    object-fit: cover;
}

.nome-produto a {
    color: var(--ld-primary);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
}

.nome-produto a:hover {
    text-decoration: underline;
}

.preco-produto {
    font-size: 14px;
}

.preco-sale {
    color: #c00;
    font-weight: 400;
}

.preco-normal {
    color: var(--ld-light);
    text-decoration: line-through;
    font-size: 13px;
    margin-left: 8px;
}

.data-adicao {
    color: var(--ld-secondary);
    font-size: 13px;
}

.status-estoque {
    font-size: 12px;
    font-weight: 400;
}

.status-estoque.em-estoque {
    color: var(--ld-success);
}

.status-estoque.fora-estoque {
    color: var(--ld-danger);
}

.acoes-produto {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.botao-adicionar-carrinho {
    padding: 12px 20px;
    background: var(--ld-primary);
    color: #fff !important;
    text-decoration: none;
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--ld-primary);
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.botao-adicionar-carrinho:hover {
    background: #333;
    border-color: #333;
    color: #fff !important;
}

.botao-remover-lista {
    padding: 12px 20px;
    background: transparent;
    color: var(--ld-secondary);
    border: 1px solid var(--ld-border);
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.botao-remover-lista:hover {
    border-color: var(--ld-primary);
    color: var(--ld-primary);
}

/* Compartilhar */
.lista-desejos-compartilhar {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--ld-border);
}

.lista-desejos-compartilhar h3 {
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    color: var(--ld-primary);
}

.compartilhar-url {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

#share-url-input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--ld-border);
    font-size: 13px;
    font-family: inherit;
    color: var(--ld-primary);
    background: #fff;
}

#share-url-input:focus {
    outline: none;
    border-color: var(--ld-primary);
}

.botao-copiar-url {
    padding: 14px 24px;
    background: var(--ld-primary);
    color: #fff;
    border: 1px solid var(--ld-primary);
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.botao-copiar-url:hover {
    background: #333;
    border-color: #333;
}

.compartilhar-icones {
    display: flex;
    gap: 16px;
}

.icone-compartilhar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ld-border);
    color: var(--ld-primary);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.icone-compartilhar:hover {
    background: var(--ld-primary);
    border-color: var(--ld-primary);
    color: #fff;
}

.icone-compartilhar:hover svg {
    fill: #fff;
    stroke: #fff;
}

.icone-compartilhar svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

/* Ícone no menu Minha Conta */
.woocommerce-MyAccount-navigation-link--lista-desejos a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.woocommerce-MyAccount-navigation-link--lista-desejos a::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.566'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* Página Pública (Shortcode) */
.lista-desejos-publica {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Responsivo */
@media (max-width: 768px) {
    .lista-desejos-botao {
        max-width: 100%;
    }
    
    .lista-desejos-tabela thead {
        display: none;
    }
    
    .lista-desejos-tabela,
    .lista-desejos-tabela tbody,
    .lista-desejos-tabela tr,
    .lista-desejos-tabela td {
        display: block;
    }
    
    .lista-desejos-tabela tr {
        padding: 24px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .lista-desejos-tabela td {
        padding: 8px 0;
        border: none;
    }
    
    .lista-desejos-tabela td[data-label]::before {
        content: attr(data-label);
        font-weight: 400;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--ld-secondary);
        display: block;
        margin-bottom: 6px;
    }
    
    .lista-desejos-tabela td[data-label=""]::before {
        display: none;
    }
    
    .imagem-produto img {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .acoes-produto {
        flex-direction: column;
        margin-top: 16px;
    }
    
    .botao-adicionar-carrinho,
    .botao-remover-lista {
        width: 100%;
        text-align: center;
    }
    
    .compartilhar-url {
        flex-direction: column;
    }
    
    .lista-desejos-popup-content {
        padding: 40px 24px 32px;
        margin: 16px;
    }
    
    .lista-desejos-popup-botoes {
        flex-direction: column;
    }
    
    .lista-desejos-popup-botoes button,
    .lista-desejos-popup-botoes a {
        width: 100%;
    }
}
