/**
 * 搜尋彈窗下方三區塊樣式
 * 對應 inc/search-popup-override.php 輸出的 HTML
 */

/* 覆寫父主題：原本 popup-wrap 是「flex row + 50% 高 + 50% 寬搜尋框」
   只能放一個 child。加入區塊後要改成 column 堆疊、wrap 撐滿可滾動。 */
.site-search-popup {
    overflow-y: auto;
}
.site-search-popup .site-search-popup-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    min-height: 100%;
    padding: 100px 0 60px;
    max-width: 1280px;
    width: 92%;
    margin: 0 auto;
}
.site-search-popup .site-search-popup-wrap .site-search {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.search-popup-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
    padding: 0 8px;
    text-align: left;
}

.search-popup-section + .search-popup-section {
    /* grid gap 已處理欄間距，這裡空著作為 hook */
}

.search-popup-section-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 20px;
    color: #222;
}

.search-popup-group {
    margin-bottom: 18px;
}
.search-popup-group:last-child {
    margin-bottom: 0;
}

.search-popup-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}
.search-popup-group-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.search-popup-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.search-popup-tag a,
.search-popup-tag span {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    background: #f7f7f7;
    color: #444;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.search-popup-tag a:hover,
.search-popup-tag a:focus {
    background: #ffa726; /* 配合 ekommart 橘色搜尋按鈕 */
    color: #fff;
    border-color: #ffa726;
}

/* Tablet：縮成 2 欄，第 3 區換行置中 */
@media (max-width: 991px) {
    .search-popup-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

/* Mobile：單欄堆疊 */
@media (max-width: 600px) {
    .search-popup-sections {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 28px;
        padding: 0;
    }
    .search-popup-section-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
}
