/* 服務列表頁樣式 - 品牌色調 */
:root {
    --primary-color: #5ba595;      /* 主品牌色 - 藍綠 */
    --secondary-color: #ac4c4d;    /* 輔助色 - 紅褐 */
    --primary-hover: #4a8a7d;      /* 主色深色版 */
    --secondary-hover: #8c3d3e;    /* 輔助色深色版 */
    --light-primary: rgba(91, 165, 149, 0.1);
    --light-secondary: rgba(172, 76, 77, 0.1);
    --text-dark: #333333;
    --text-medium: #555555;
    --text-light: #777777;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-dark: rgba(0, 0, 0, 0.15);
}

.service-bg {
    background: linear-gradient(rgba(91, 165, 149, 0.85), rgba(91, 165, 149, 0.9)), 
                url('<?= HOST_URL ?>assets/img/beauty-salon-banner.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-dark);
}

.categories-list li a:hover,
.categories-list li.active a {
    background: var(--light-primary);
    color: var(--primary-color);
}

.categories-list li a i {
    color: var(--primary-color);
}

.categories-list .count {
    background: var(--bg-light);
    color: var(--text-light);
}

.search-form .search-btn {
    color: var(--primary-color);
}

.area-badge {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-medium);
    transition: all 0.3s;
}

.area-badge:hover,
.area-badge.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.area-badge.text-danger {
    background: var(--light-secondary);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.area-badge.text-danger:hover {
    background: var(--secondary-color);
    color: white;
}

.salon-featured {
    border: 3px solid #FFD700;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #FFD700, #FFB300);
    color: var(--text-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.recommended-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.salon-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
    background: white;
    border: 1px solid var(--border-color);
}

.salon-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-dark);
    border-color: var(--primary-color);
}

.salon-featured:hover {
    border-color: #FFD700;
}

.salon-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.salon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.salon-card:hover .salon-image img {
    transform: scale(1.05);
}

.salon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.salon-card:hover .salon-overlay {
    opacity: 1;
}

.view-details {
    color: white;
    padding: 8px 15px;
    border: 2px solid white;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(91, 165, 149, 0.8);
    transition: all 0.3s;
}

.view-details:hover {
    background: var(--primary-color);
}

.salon-content {
    padding: 20px;
}

.salon-category a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.salon-category a:hover {
    color: var(--primary-hover);
}

.salon-name {
    font-size: 1.1rem;
    margin: 10px 0;
    color: var(--text-dark);
    font-weight: 600;
}

.salon-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.salon-name a:hover {
    color: var(--primary-color);
}

.salon-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.salon-features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.feature-tag {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.price-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(91, 165, 149, 0.3);
}

.duration {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.salon-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.salon-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s;
}

.salon-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 165, 149, 0.3);
}

.filter-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 5px rgba(91, 165, 149, 0.2);
}

.filter-badge a {
    color: white;
    margin-left: 5px;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.filter-badge a:hover {
    opacity: 1;
}

.sort-options .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(91, 165, 149, 0.25);
}

.page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.page-link:hover {
    color: var(--primary-hover);
    background-color: var(--light-primary);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 側邊欄小工具樣式 */
.sidebar-widget {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
    border: 1px solid var(--border-color);
}

.feature-badge {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    font-weight: 500;
}

.no-results {
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px var(--shadow-light);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 快速搜索表單 */
.quick-search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(91, 165, 149, 0.25);
}

.quick-search-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
}

.quick-search-form .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
}

/* 響應式設計 */
@media (max-width: 991px) {
    .service-bg {
        padding: 60px 0;
    }
    
    .salon-image {
        height: 180px;
    }
}

@media (max-width: 767px) {
    .service-bg {
        padding: 40px 0;
    }
    
    .salon-card {
        margin-bottom: 20px;
    }
    
    .salon-image {
        height: 160px;
    }
    
    .widget-title {
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    .salon-name {
        font-size: 1rem;
    }
    
    .salon-desc {
        font-size: 0.85rem;
    }
    
    .price-tag {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .feature-tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Popular Salons Widget Styles */
.popular-salons {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow-light);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.popular-salons .widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.popular-salons .widget-title i {
    color: var(--primary-color);
}

.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.popular-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-list li:hover {
    transform: translateX(5px);
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    padding: 8px;
    border-radius: 8px;
}

.popular-item:hover {
    background: var(--light-primary);
}

.popular-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.popular-item:hover .popular-image img {
    transform: scale(1.1);
}

.popular-content {
    flex: 1;
}

.popular-content h6 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s;
}

.popular-item:hover .popular-content h6 {
    color: var(--primary-color);
}

.popular-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.popular-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.popular-meta .post-date {
    color: var(--text-light);
    font-size: 0.75rem;
}

.popular-meta i {
    color: var(--primary-color);
    font-size: 0.7rem;
}

/* For service-show.php sidebar */
.popular-salons .popular-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.popular-salons .popular-link:hover {
    background: var(--light-primary);
    transform: translateX(5px);
}

.popular-salons .popular-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.popular-salons .popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.popular-salons .popular-link:hover .popular-image img {
    transform: scale(1.1);
}

.popular-salons .popular-content h6 {
    margin: 0 0 5px 0;
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 600;
}

.popular-salons .popular-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.popular-salons .popular-meta i {
    color: var(--secondary-color);
}

/* No results message */
.popular-salons .no-related {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .popular-salons {
        padding: 20px;
    }
    
    .popular-image {
        width: 50px;
        height: 50px;
    }
    
    .popular-content h6 {
        font-size: 0.85rem;
    }
}

@media (max-width: 575px) {
    .popular-salons {
        padding: 15px;
    }
    
    .widget-title {
        font-size: 1rem;
    }
    
    .popular-item {
        padding: 5px;
    }
}

/* 地區小工具樣式 */
.area-widget {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px var(--shadow-light);
    border: 1px solid var(--border-color);
}

.area-widget .widget-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.area-widget .widget-title i {
    color: var(--primary-color);
}

.areas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.area-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
    font-weight: 500;
}

.area-badge:hover,
.area-badge.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(91, 165, 149, 0.2);
}

.area-badge .count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.area-badge.text-danger {
    background: var(--light-secondary);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    font-weight: 600;
}

.area-badge.text-danger:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    color: white;
    border-color: var(--secondary-color);
}

/* 地區篩選結果信息 */
.filter-results-info {
    background: var(--light-primary);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.filter-results-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-results-info h3 i {
    color: var(--primary-color);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(91, 165, 149, 0.3);
}

.filter-badge a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.filter-badge a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

/* 手機版：小工具內部項目水平滾動 */
@media (max-width: 991px) {
    /* 側邊欄保持垂直排列 */
    .service-sidebar {
        display: block;
        overflow-x: visible;
        overflow-y: visible;
        padding: 0;
        margin: 0;
        white-space: normal;
    }
    
    .sidebar-widget {
        width: 100% !important;
        min-height: auto;
        margin-bottom: 20px;
        margin-right: 0;
        margin-left: 0;
    }
    
    /* 地區小工具內部水平滾動 */
    .area-widget .areas-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding-bottom: 10px;
        margin: 0 -5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .area-widget .areas-list::-webkit-scrollbar {
        height: 4px;
    }
    
    .area-widget .areas-list::-webkit-scrollbar-track {
        background: var(--bg-light);
        border-radius: 2px;
    }
    
    .area-widget .areas-list::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    .area-widget .area-badge {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 15px;
        margin: 0 5px;
    }
    
    /* 分類菜單內部水平滾動 */
    .categories-widget .categories-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding-bottom: 10px;
        margin: 0 -5px;
        -webkit-overflow-scrolling: touch;
        list-style: none;
    }
    
    .categories-widget .categories-list li {
        flex: 0 0 auto;
        margin-bottom: 0;
    }
    
    .categories-widget .categories-list li a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 15px;
        border-radius: 8px;
        white-space: nowrap;
        min-width: 120px;
        justify-content: center;
        text-align: center;
    }
    
    /* 移除原來的列表樣式 */
    .categories-widget .categories-list li a i {
        display: none; /* 隱藏ICON */
    }
    
    /* 熱門美容院內部水平滾動 */
    .popular-salons .popular-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        padding-bottom: 10px;
        margin: 0 -5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .popular-salons .popular-list li {
        flex: 0 0 auto;
        width: 200px;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        padding-right: 12px;
    }
    
    .popular-salons .popular-list li:last-child {
        border-right: none;
    }
    
    .popular-salons .popular-item {
        flex-direction: column;
        text-align: center;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: white;
    }
    
    .popular-salons .popular-image {
        width: 100%;
        height: 120px;
        margin-bottom: 10px;
    }
    
    .popular-salons .popular-content h6 {
        font-size: 0.9rem;
        margin-bottom: 8px;
        height: 40px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
    }
    
    /* 特色服務內部水平滾動 */
    .features-widget .features-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding-bottom: 10px;
        margin: 0 -5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .features-widget .feature-badge {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 15px;
        margin: 0 5px;
        min-width: 140px;
        text-align: center;
    }
}

/* 更小的手機屏幕調整 */
@media (max-width: 575px) {
    .area-widget .area-badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .categories-widget .categories-list li a {
        padding: 8px 12px;
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .popular-salons .popular-list li {
        width: 160px;
    }
    
    .popular-salons .popular-image {
        height: 100px;
    }
    
    .features-widget .feature-badge {
        padding: 8px 12px;
        min-width: 80px;
        font-size: 0.85rem;
    }
}

/* 滾動提示 */
.scroll-hint-container {
    position: relative;
    margin-top: 10px;
}

.scroll-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.8rem;
    padding: 5px 10px;
    background: var(--bg-light);
    border-radius: 15px;
    margin-top: 5px;
}

@media (max-width: 991px) {
    .scroll-hint {
        display: flex;
    }
}

.scroll-hint i {
    color: var(--primary-color);
    animation: scrollHint 1.5s infinite;
}

@keyframes scrollHint {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.5;
    }
    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}