/* product_list.css — 課程列表 專屬樣式 */

/* Filter sidebar */
.filter-card {
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
}

.filter-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
}

.filter-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
}

.custom-checkbox .custom-control-label {
    cursor: pointer;
}

/* Tag pills */
.tag-pill {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: rgba(189, 86, 27, 0.1);
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-right: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.tag-pill:hover {
    background-color: var(--primary-color);
    color: white;
}

.tag-pill.active {
    background-color: var(--primary-color);
    color: white;
}

/* Rating stars */
.rating-stars {
    color: #f8d448;
}

/* Sort by dropdown */
.sort-dropdown .dropdown-toggle {
    color: var(--secondary-color);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    background-color: white;
}

.sort-dropdown .dropdown-toggle:hover {
    border-color: var(--primary-color);
}

.sort-dropdown .dropdown-toggle:focus {
    box-shadow: none;
}

.sort-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.sort-dropdown .dropdown-item.active,
.sort-dropdown .dropdown-item:active {
    background-color: var(--primary-color);
}

/* Original price */
.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Course stats */
.course-stats {
    display: flex;
    font-size: 0.8rem;
    color: #6c757d;
}

.course-stats div {
    margin-right: 10px;
}

/* Pagination（覆寫 main.css 樣式） */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid #ddd;
    margin: 0 5px;
    border-radius: 4px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-link:hover {
    background-color: rgba(189, 86, 27, 0.1);
}

.pagination .page-link:focus {
    box-shadow: none;
}

.pagination li a {
    color: var(--primary-color);
    border: 1px solid #ddd;
    margin: 0 3px;
    border-radius: 4px;
    padding: 8px 12px;
    text-decoration: none;
    display: inline-block;
}

.pagination li a:hover {
    background-color: rgba(189, 86, 27, 0.1);
}

.pagination .page-item.active a {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
}

/* Category header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.category-icon-lg {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-right: 20px;
}

.category-stats {
    font-size: 1.1rem;
    color: #666;
}

/* Mobile offcanvas filter */
.offcanvas-filter {
    width: 85% !important;
}

/* Footer 覆寫（product_list 少了 margin-top: auto 和 width: 100%） */
footer {
    margin-top: auto;
    width: 100%;
}

/* Social icon（product_list 特有的圓形社群圖示） */
.social-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: white;
    transition: background-color 0.3s;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 覆寫 social-btn 為 pill 樣式 */
.social-btn {
    border-radius: 20px;
    font-size: 0.85rem;
}

.social-btn i {
    margin-right: 6px;
}

@media (max-width: 768px) {
    footer {
        margin-bottom: 60px;
    }

    .filter-btn {
        position: fixed;
        bottom: 70px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: var(--primary-color);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }
}
