/* =====================================
   WC Custom Search Tabs – CORRIGIDO
===================================== */

#wcst-container {
    width: 100%;
    position: relative; /* Define a base para o posicionamento absoluto */
}

/* -------- Tabs -------- */
.wcst-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.wcst-tab {
    flex: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: #efefef;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
}

.wcst-tab.active {
    background: #000;
    color: #fff;
}

/* -------- Columns wrapper -------- */
#wcst-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    position: absolute; /* Não empurra o layout */
    top: 100%;          /* Aparece logo abaixo das tabs */
    left: 0;
    right: 0;
    z-index: 99999;     /* Fica por cima de outros elementos */
    pointer-events: none; /* Ignora cliques no container vazio */
}

/* posicionar cada coluna por baixo da tab certa */
.wcst-col[data-level="0"].open { grid-column: 1; }
.wcst-col[data-level="1"].open { grid-column: 2; }
.wcst-col[data-level="2"].open { grid-column: 3; }

/* -------- Column -------- */
.wcst-col {
    display: none;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #fff;
    max-height: 220px;
    overflow-y: auto;
    pointer-events: auto; /* Reativa cliques dentro da coluna */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.wcst-col.open {
    display: block;
    animation: wcstFade .15s ease-out;
}

/* -------- Items -------- */
.wcst-col a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
}

.wcst-col a:last-child { border-bottom: none; }
.wcst-col a:hover { background: #f5f5f5; }
.wcst-col a.selected { background: #000; color: #fff; }

@keyframes wcstFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

/* -------- Scroll -------- */
.wcst-col::-webkit-scrollbar { width: 6px; }
.wcst-col::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 10px; }

/* -------- Mobile -------- */
@media (max-width: 768px) {
    #wcst-columns {
        grid-template-columns: 1fr;
    }
}
.wcst-loading, .wcst-empty {
    padding: 12px;
    font-size: 13px;
    color: #777;
    text-align: center;
}