/* รูปแบบใหม่สำหรับ product-term style="y" (vertical) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Sarabun:wght@400;500;700&display=swap');

.filter-container {
    background-color: white;
    padding: 12px;
    /*border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);*/
    width: 100%;
    max-width: 300px;
    font-family: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
}

.filter-icon {
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-icon:hover {
    color: #e53e3e;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list-item {
    font-size: 1rem;
    color: #4a5568;
    padding: 8px 0;
    /*border-bottom: 1px solid #e2e8f0;*/
    transition: all 0.3s ease;
}

.filter-list-item:last-child {
    border-bottom: none;
}

.filter-list-item.active {
    color: #e53e3e;
    font-weight: 700;
}

.filter-list-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.filter-list-item:hover {
    color: #e53e3e;
}

/* รองรับการแสดงผลบนมือถือ */
@media (max-width: 768px) {
    .filter-container {
        max-width: 100%;
    }
    
    /* สำหรับการซ่อน/แสดงเมนู */
    .filter-list.hidden {
        display: none;
    }
    
    .filter-icon.collapsed svg line:nth-child(1) {
        transform: rotate(90deg);
        transform-origin: center;
    }
}

/* ซ่อน tooltip ในสภาวะปกติ */
.product-term-tooltip {
    position: absolute;
    right: -15px;
    top: 100%;
    margin-top: 5px;
    background-color: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    font-weight: normal;
}

/* สามเหลี่ยมชี้ขึ้น */
.product-term-tooltip:after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 15px;
    border-width: 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent #000;
}

/* แสดง tooltip เมื่อ hover ที่ icon */
.filter-icon:hover .product-term-tooltip {
    opacity: 1;
    visibility: visible;
}