/* Three 系列共用樣式：對齊 UI/pro-list.html */

/* Page Header */
.page-header {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Topbar 顏色 */
.fixed-top .container-fluid.bg-dark {
    background-color: #64A600 !important;
}

.fixed-top .container-fluid.bg-dark,
.fixed-top .container-fluid.bg-dark p {
    color: #CAE5CC !important;
}

/* 會員登入下拉選單 */
.fixed-top #memberDropdown {
    background-color: #009A3E;
    border-color: #009A3E;
    color: #E8F5E9;
    margin: 0;
}

.fixed-top #memberDropdown:hover,
.fixed-top #memberDropdown:focus {
    background-color: #218838;
    border-color: #1E7E34;
    color: #E8F5E9;
}

.fixed-top .dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 200px;
}

.fixed-top .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: #666666;
    transition: all 0.2s ease;
    font-weight: 500;
}

.fixed-top .dropdown-item:hover,
.fixed-top .dropdown-item:focus {
    background-color: #F8F9FA;
    color: #28A745;
    transform: translateX(5px);
}

.fixed-top .dropdown-item i {
    width: 16px;
    text-align: center;
    color: #28A745;
}

.fixed-top .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #E9ECEF;
}

.free-product-page {
    padding-top: 120px !important;
}

.free-product-page__content {
    padding-top: 24px !important;
}

@media (max-width: 991.98px) {
    .free-product-page {
        padding-top: 135px !important;
    }

    .free-product-page__content {
        padding-top: 12px !important;
    }
}

/* 產品卡片樣式 */
.product-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.3;
}

.product-tagline {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.product-price {
    margin-bottom: 1rem;
}

.product-price .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #28a745;
    margin-right: 0.5rem;
}

.product-price .original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.product-card .btn.more {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.product-card .btn.more:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #ffffff;
}

/* 視圖切換按鈕 */
.btn-outline-primary {
    border-color: #009a3e;
    color: #009a3e;
}

.btn-outline-primary:hover {
    background-color: #009a3e;
    border-color: #009a3e;
    color: #ffffff;
}

.btn-check:checked + .btn-outline-primary {
    background-color: #009a3e;
    border-color: #009a3e;
    color: #ffffff;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* 列表模式樣式 */
.product-card-list {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card-list:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image-list {
    width: 200px;
    flex-shrink: 0;
}

.product-image-list img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px 0 0 10px;
}

.product-info-list {
    padding: 1.5rem;
}

.product-card-list .product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-card-list .product-tagline {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-card-list .product-price .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #28a745;
}

.product-card-list .product-price .price-suffix {
    color: #666;
    margin-left: 0.25rem;
}

@media (max-width: 768px) {
    .product-card-list {
        flex-direction: column;
    }

    .product-image-list {
        width: 100%;
    }

    .product-image-list img {
        height: 200px;
        border-radius: 10px 10px 0 0;
    }
}

/* 搜尋 Modal 層級修正，避免被 backdrop 擋住 */
#searchModal.modal {
    z-index: 2000;
}

#searchModal .modal-dialog {
    z-index: 2001;
}

.modal-backdrop {
    z-index: 1990;
}

/* 搜尋建議字體大小 */
#searchModal .search-suggestions .badge {
    font-size: 0.95rem;
    padding: 0.35rem 0.6rem;
}

.search-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid #009a3e;
    background: transparent;
    color: #009a3e;
}