/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 24px;
    color: #333;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #007bff;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 轮播图 */
.banner {
    background-color: #f8f9fa;
    padding: 100px 0;
    text-align: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
}

.banner h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.banner p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* 功能区 */
.features {
    padding: 80px 0;
    background-color: #fff;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-item p {
    color: #666;
}

/* 商铺列表 */
.recommended-shops, .latest-shops {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.recommended-shops {
    background-color: #fff;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.shop-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.shop-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.shop-image {
    height: 200px;
    overflow: hidden;
}

.shop-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.shop-card:hover .shop-image img {
    transform: scale(1.05);
}

.shop-info {
    padding: 20px;
}

.shop-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.shop-info h3 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.shop-info h3 a:hover {
    color: #007bff;
}

.shop-info .price {
    font-size: 16px;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 5px;
}

.shop-info .area {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.shop-info .address {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.shop-tags {
    margin-top: 10px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* 底部 */
footer {
    background-color: #343a40;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.footer-links h4, .footer-contact h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    text-decoration: none;
    color: #adb5bd;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #fff;
}

.footer-contact p {
    margin-bottom: 10px;
    color: #adb5bd;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #495057;
    color: #adb5bd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        margin-top: 15px;
    }

    nav ul li {
        margin-left: 0;
        margin-right: 15px;
    }

    .banner h2 {
        font-size: 28px;
    }

    .banner p {
        font-size: 16px;
    }

    .shop-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* 表单样式 */
.form-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* 登录注册页面 */
.auth-page {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.auth-page h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* 用户中心 */
.user-center {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.user-sidebar {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.user-sidebar h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.user-sidebar ul {
    list-style: none;
}

.user-sidebar ul li {
    margin-bottom: 15px;
}

.user-sidebar ul li a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
    display: block;
    padding: 10px;
    border-radius: 4px;
}

.user-sidebar ul li a:hover,
.user-sidebar ul li a.active {
    color: #007bff;
    background-color: #f8f9fa;
}

.user-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-content h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* 消息提示 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 个人中心样式 */
.profile-page {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.profile-page h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    font-weight: bold;
}

.profile-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.profile-info,
.profile-limits,
.profile-management,
.profile-password,
.profile-stats {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

.profile-info h3,
.profile-limits h3,
.profile-management h3,
.profile-password h3,
.profile-stats h3 {
    font-size: 20px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 12px;
    font-weight: bold;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-input:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.limits-info p {
    margin-bottom: 12px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.limits-info p:last-child {
    font-weight: bold;
    color: #333;
}

.limits-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 管理中心样式 */
.profile-management {
    grid-column: 1 / -1;
}

.management-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.management-item {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.management-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.management-item h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

.management-item p {
    margin-bottom: 20px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.management-item .btn {
    margin-bottom: 10px;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
}

.management-item .btn:hover {
    transform: translateY(-2px);
}

.management-item .btn-secondary {
    margin-left: 0;
}

/* 统计信息样式 */
.profile-stats {
    grid-column: 1 / -1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.stats-item {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.stats-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: #007bff;
}

.stats-value {
    font-size: 32px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}

.stats-label {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* 最新信息模块 */
.latest-info {
    padding: 80px 0;
    background-color: #fff;
}

.latest-info .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.latest-info h2 {
    grid-column: 1 / -1;
    margin-bottom: 40px;
    color: #333;
}

.info-card {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card a {
    text-decoration: none;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.info-card a:hover {
    color: #007bff;
}

.info-card .date {
    font-size: 12px;
    color: #999;
}

.info-card .tag {
    font-size: 12px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
}

.info-card .tag-limited {
    color: #dc3545;
    background-color: #f8d7da;
}

.info-card .tag-active {
    color: #28a745;
    background-color: #d4edda;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .profile-management,
    .profile-stats {
        grid-column: 1;
    }
    
    .management-links {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .limits-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .profile-page h2 {
        font-size: 24px;
    }
    
    .stats-item {
        padding: 20px;
    }
    
    .stats-value {
        font-size: 24px;
    }
    
    .latest-info .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-info,
    .profile-limits,
    .profile-management,
    .profile-password,
    .profile-stats {
        padding: 20px;
    }
}

/* 商铺列表页面新样式 */
.shops-page {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.shops-page .container {
    background-color: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.shops-page h2 {
    margin-bottom: 30px;
    color: #333;
}

/* 搜索表单 */
.search-form {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid #dee2e6;
}

.search-form-header {
    margin-bottom: 20px;
}

.search-form-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.search-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.search-form .form-group {
    margin-bottom: 0;
}

.search-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.search-form .form-group input,
.search-form .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.price-range,
.area-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range input,
.area-range input {
    flex: 1;
}

.price-range span,
.area-range span {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.form-group-submit {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.form-group-submit button {
    flex: 1;
}

/* 排序选项 */
.sort-options {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.sort-options span {
    font-weight: 500;
    color: #333;
}

.sort-options a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

.sort-options a:hover {
    color: #007bff;
    background-color: #e9ecef;
}

/* 商铺卡片 */


.shop-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #f8f9fa;
    width: 100%;
}

.shop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
    min-height: 200px;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
    margin: 0;
    border: none;
}

.shop-card-image img.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-card-image img.lazy-load.loaded {
    opacity: 1;
}

.shop-card-image img:hover {
    transform: scale(1.05);
}

.shop-card-image img[src=""], 
.shop-card-image img:not([src]) {
    opacity: 0;
}

.shop-card-no-image,
.shop-no-image {
    height: 200px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
}

.shop-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-card-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
}

.shop-card-price {
    font-size: 20px;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 15px;
}

.shop-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-icon {
    font-size: 16px;
}

.shop-card-address {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.address-icon {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.shop-card-tags {
    margin-bottom: 20px;
    flex-grow: 1;
}

.shop-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.shop-tag:hover {
    background-color: #dee2e6;
    color: #343a40;
}

.shop-card-footer {
    margin-top: auto;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-links a,
.pagination-links span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination-links a:hover {
    background-color: #e9ecef;
    color: #333;
}

.pagination-active {
    background-color: #007bff;
    color: #fff !important;
    border-color: #007bff;
}

.pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 无商铺提示 */
.no-shops {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    grid-column: 1 / -1;
}

.no-shops-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-shops h3 {
    margin-bottom: 15px;
    color: #333;
}

.no-shops p {
    margin-bottom: 30px;
    color: #666;
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #007bff;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 999;
    display: none;
}

.back-to-top:hover {
    background-color: #0069d9;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .shops-page .container {
        padding: 20px;
    }
    
    .search-form {
        padding: 20px;
    }
    
    .search-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group-submit {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-group-submit button {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .sort-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sort-options a {
        display: inline-block;
    }
    
    .shop-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .pagination-links {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 992px) {
    .search-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
