/* 宠物网站样式 - 简洁紧凑风格 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

/* 导航样式 */
.navigation {
    background: #007bff;
}

.navigation .container {
    position: relative;
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    border-right: 1px solid #0056b3;
    position: relative;
}

.nav-item:last-child {
    border-right: none;
}

.nav-link {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    font-size: 14px;
    transition: background-color 0.3s;
    line-height: 1.2;
}

.nav-link:hover, .nav-link.active {
    background: #0056b3;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    margin-left: 5px;
    font-size: 10px;
    transition: transform 0.3s;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 0 0 5px 5px;
    border: 1px solid #007bff;
    border-top: none;
    z-index: 10000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown.active .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    border-bottom: 1px solid #e9ecef;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: #007bff;
    color: #fff;
}

.dropdown-menu a:first-child {
    font-weight: bold;
    background: #f8f9fa;
}

.dropdown-menu a:first-child:hover {
    background: #007bff;
    color: #fff;
}

/* 快捷导航按钮 */
.quick-nav-toggle {
    display: none !important;
    background: #17a2b8;
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 10003;
}

.quick-nav-toggle:hover {
    background: #138496;
}

.quick-nav-toggle .nav-icon {
    font-size: 16px;
    line-height: 1;
}

.quick-nav-toggle .nav-text {
    font-size: 14px;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 0;
    height: 100%;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .quick-nav-toggle {
        display: inline-flex !important;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #007bff;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 9999;
    }
    
    .nav-list.active {
        max-height: 500px;
        overflow-y: auto;
    }
    
    .nav-item {
        border-right: none;
        border-bottom: 1px solid #0056b3;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        padding: 15px 20px;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: #0056b3;
        display: block;
        opacity: 1;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 10001;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 300px;
        overflow-y: auto;
        z-index: 999;
    }
    
    .dropdown-menu a {
        color: #fff;
        padding: 12px 30px;
        border-bottom: 1px solid #004085;
    }
    
    .dropdown-menu a:hover,
    .dropdown-menu a.active {
        background: #0056b3;
    }
    
    .dropdown-menu a:first-child {
        background: #004085;
        font-weight: normal;
    }
    
    .dropdown-menu a:first-child:hover {
        background: #0056b3;
    }
    
    /* 汉堡菜单动画 */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* 主要内容区域 */
.main-content {
    background: #fff;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.content-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.content-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.content-body {
    padding: 20px;
}

/* 内容分组样式 */
.content-type-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 24px;
}

.content-grid-horizontal {
    display: grid;
    gap: 15px; /* 增加间距防止重叠 */
    align-items: start; /* 确保卡片从顶部对齐 */
}

/* 桌面端产品布局 - 一行6个，显示2行共12个 */
@media (min-width: 769px) {
    body:not(.product-page) .content-grid-horizontal {
        grid-template-columns: repeat(6, minmax(180px, 1fr));
    }
    
    /* 在桌面端首页显示前12个产品 */
    body:not(.product-page) .content-grid-horizontal .product-card:nth-child(n+13) {
        display: none !important;
    }
    
    /* 产品列表页面 - 一行6个，显示所有产品 */
    body.product-page .content-grid-horizontal {
        grid-template-columns: repeat(6, minmax(180px, 1fr));
    }
}

/* 手机端产品布局 - 一行2个，显示2行共4个 */
@media (max-width: 768px) {
    body:not(.product-page) .content-grid-horizontal {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 10px;
    }
    
    /* 在手机端首页显示前4个产品 */
    body:not(.product-page) .content-grid-horizontal .product-card:nth-child(n+5) {
        display: none !important;
    }
    
    /* 产品列表页面 - 一行2个，显示所有产品 */
    body.product-page .content-grid-horizontal {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 10px;
    }
}

/* 默认网格布局（用于其他内容类型） */
body:not(.product-page):not(:has(.product-card)) .content-grid-horizontal {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* 专门为宠物品种创建的无边框紧密布局 */
.pet-breed-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* 增加间距 */
    align-items: center;
    padding-left: 10px; /* 增加左边距，与相册保持一致 */
}

/* 手机端宠物品种列表 - 仅在首页显示一行，保持卡片正常大小 */
@media (max-width: 768px) {
    /* 只在首页（没有pet_breed-page类）应用限制 */
    body:not(.pet_breed-page) .pet-breed-list {
        gap: 6px;
        padding-left: 5px;
        align-items: center; /* 垂直居中对齐 */
        flex-wrap: nowrap; /* 禁止换行，强制一行显示 */
        overflow: hidden; /* 隐藏超出部分 */
    }
    
    /* 保持宠物品种卡片正常大小，不压缩 */
    body:not(.pet_breed-page) .pet-breed-list .pet-breed-card {
        flex: 0 0 auto !important; /* 不允许伸缩，保持原始大小 */
        min-width: auto !important;
        max-width: none !important;
    }
    
    /* 宠物品种卡片显示由JavaScript控制 */
    
    /* 查看更多按钮样式 - 在列表下方独立显示 */
    body:not(.pet_breed-page) .pet-breed-list + .show-more-container {
        display: block !important;
        margin: 5px 0 0 5px;
        padding: 0;
        border: none;
        background: none;
        text-align: left;
    }
}

/* 电脑端宠物品种列表 - 仅在首页显示一行，保持卡片正常大小 */
@media (min-width: 769px) {
    /* 只在首页（没有pet_breed-page类）应用限制 */
    body:not(.pet_breed-page) .pet-breed-list {
        flex-wrap: nowrap; /* 禁止换行，强制一行显示 */
        overflow: hidden; /* 隐藏超出部分 */
    }
    
    /* 保持宠物品种卡片正常大小，不压缩 */
    body:not(.pet_breed-page) .pet-breed-list .pet-breed-card {
        flex: 0 0 auto !important; /* 不允许伸缩，保持原始大小 */
        min-width: auto !important;
        max-width: none !important;
    }
    
    /* 宠物品种卡片显示由JavaScript控制 */
    
    /* 查看更多按钮样式 - 在列表下方独立显示 */
    body:not(.pet_breed-page) .pet-breed-list + .show-more-container {
        display: block !important;
        margin: 5px 0 0 5px;
        padding: 0;
        border: none;
        background: none;
        text-align: left;
    }
}

/* 分类页面：显示所有宠物品种 */
body.pet_breed-page .pet-breed-list .pet-breed-card {
    display: flex !important;
}

body.pet_breed-page .pet-breed-list .pet-breed-more {
    display: none !important;
}

/* 专门为相册创建的网格布局 */
.album-list {
    display: grid;
    gap: 15px; /* 相册之间有合适的间距 */
}

/* 桌面端相册布局 - 一行5个，显示两行共10个 */
@media (min-width: 769px) {
    .album-list {
        grid-template-columns: repeat(5, minmax(180px, 1fr));
    }
    
    /* 在桌面端首页显示前10个相册 */
    body:not(.album-page) .album-list .album-card:nth-child(n+11) {
        display: none !important;
    }
}

/* 手机端相册布局 - 一行2个，显示三行共6个 */
@media (max-width: 768px) {
    .album-list {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 10px;
    }
    
    /* 在手机端首页显示前6个相册 */
    body:not(.album-page) .album-list .album-card:nth-child(n+7) {
        display: none !important;
    }
}

/* 查看更多容器样式 */
.show-more-container {
    grid-column: 1 / -1; /* 占据整行 */
    text-align: left; /* 左对齐 */
    padding: 10px 0;
}

.show-more-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: color 0.3s, background-color 0.3s;
}

.show-more-link:hover {
    color: #0056b3;
    text-decoration: underline;
    background-color: #f8f9fa;
}

/* 相册在相册列表中的特殊处理 */
.album-list .album-card {
    max-width: 200px; /* 恢复相册卡片的最大宽度 */
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.album-list .album-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* 专门为文章创建的网格布局 */
.article-list {
    display: grid;
    gap: 15px; /* 文章之间的间距 */
}

/* 桌面端文章布局 - 一行2个，显示5行共10个 */
@media (min-width: 769px) {
    .article-list {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
    
    /* 在桌面端首页显示前10个文章 */
    body:not(.article-page) .article-list .article-card:nth-child(n+11) {
        display: none !important;
    }
}

/* 手机端文章布局 - 一行1个，显示5行共5个 */
@media (max-width: 768px) {
    .article-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* 在手机端首页显示前5个文章 */
    body:not(.article-page) .article-list .article-card:nth-child(n+6) {
        display: none !important;
    }
}

/* 相册在相册列表中的特殊处理 */
.album-list .album-card {
    max-width: 200px; /* 相册卡片更小 */
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.album-list .album-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* 其他内容类型保持原有大小 */
.content-grid-horizontal .content-card:not(.album-card):not(.product-card) {
    min-width: 280px;
}











/* 推荐产品卡片特殊样式 */
.content-grid-horizontal .product-card {
    width: 100%;
    height: auto;
    min-height: 300px;
    margin: 0;
    box-sizing: border-box;
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

/* 宠物领养卡片样式 */
.adoption-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.adoption-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.adoption-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.adoption-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.adoption-card:hover .adoption-image img {
    transform: scale(1.05);
}

.adoption-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.adoption-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.adoption-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}

.adoption-title a:hover {
    color: #007bff;
    text-decoration: underline;
}

.adoption-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

.meta-item {
    font-size: 11px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    border: 1px solid #e9ecef;
}

.meta-value {
    color: #000;
    font-weight: 700;
    font-size: 10px;
}

.meta-item.category .meta-value {
    color: #ff6b35;
    font-weight: 700;
}

.meta-item.location .meta-value {
    color: #17a2b8;
    font-weight: 700;
}

.meta-item.status .meta-value.status-available {
    color: #28a745;
    background: #d4edda;
    border-color: #c3e6cb;
    font-weight: 700;
}

.meta-item.status .meta-value.status-pending {
    color: #856404;
    background: #fff3cd;
    border-color: #ffeaa7;
    font-weight: 700;
}

.meta-item.status .meta-value.status-adopted {
    color: #721c24;
    background: #f8d7da;
    border-color: #f5c6cb;
    font-weight: 700;
}

.meta-item.fee .meta-value {
    color: #dc3545;
    font-weight: 700;
}

/* 状态样式 */
.status-available {
    color: #28a745;
    font-weight: 500;
}

.status-pending {
    color: #ffc107;
    font-weight: 500;
}

.status-adopted {
    color: #dc3545;
    font-weight: 500;
}

.status-unknown {
    color: #6c757d;
    font-weight: 500;
}

.adoption-list {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

/* 首页布局控制 */
.adoption-list.adoption-home {
    grid-template-columns: repeat(6, 1fr);
}

/* 分类页面布局控制 */
.adoption-list.adoption-full {
    grid-template-columns: repeat(6, 1fr);
}

/* 桌面端布局 - 一行6个，仅显示1行，查看更多在第二行左侧 */
@media (min-width: 769px) {
    .adoption-list.adoption-home {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }
    
    /* 首页仅显示前6个卡片 */
    .adoption-list.adoption-home .adoption-card:nth-child(n+7) {
        display: none !important;
    }
    
    /* 显示查看更多按钮在第7个位置（第二行左侧） */
    .adoption-list.adoption-home .show-more-container {
        grid-column: 1 / -1;
        display: block;
        grid-row: 2;
    }
    
    /* 分类页面显示所有 */
    body.adoption-page .adoption-list.adoption-full {
        grid-template-columns: repeat(6, 1fr);
    }
    
    /* 分类页面移除卡片数量限制，显示所有卡片 */
    body.adoption-page .adoption-list.adoption-full .adoption-card {
        display: block !important;
    }
    
    /* 分类页面不显示查看更多按钮 */
    body.adoption-page .adoption-list.adoption-full .show-more-container {
        display: none !important;
    }
}

/* 平板端布局 */
@media (max-width: 768px) and (min-width: 577px) {
    .adoption-list.adoption-home {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .adoption-list.adoption-full {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 手机端布局 - 一行2个，最多显示2行（4个），查看更多在第三行左侧 */
@media (max-width: 576px) {
    .adoption-list.adoption-home {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* 首页仅显示前4个卡片 */
    .adoption-list.adoption-home .adoption-card:nth-child(n+5) {
        display: none !important;
    }
    
    /* 显示查看更多按钮在第5个位置（第三行左侧） */
    .adoption-list.adoption-home .show-more-container {
        grid-column: 1 / -1;
        display: block;
        grid-row: 3;
    }
    
    /* 分类页面显示所有 */
    .adoption-list.adoption-full {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 手机端卡片调整 */
    .adoption-image {
        height: 150px;
    }
    
    .adoption-info {
        padding: 10px;
    }
    
    .adoption-title {
        font-size: 13px;
        margin-bottom: 6px;
        line-height: 1.2;
    }
    
    .meta-item {
        font-size: 10px;
        padding: 1px 4px;
        gap: 1px;
    }
}

/* 查看更多按钮样式 */
.show-more-container {
    text-align: left;
    margin-top: 15px;
}

.show-more-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.show-more-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
    text-decoration: none;
    color: white;
}

@media (max-width: 576px) {
    .show-more-link {
        font-size: 12px;
        padding: 6px 16px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 400px) {
    .adoption-list {
        gap: 8px;
    }
    
    .adoption-image {
        height: 120px;
    }
    
    .adoption-info {
        padding: 10px;
    }
}

.product-card .card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.product-card .card-body {
    padding: 15px;
    flex: 1;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* 相册缩略图特殊处理 - 正方形显示 */
.album-card .card-image {
    width: 100%;
    aspect-ratio: 1/1; /* 强制正方形比例 */
    object-fit: cover;
    height: auto; /* 让高度由 aspect-ratio 控制 */
}

.card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 宠物品种卡片覆盖默认的card-body样式 */
.pet-breed-card .card-body {
    padding: 8px 4px; /* 添加适当的内边距 */
    margin: 0; /* 完全移除外边距 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* 元素之间的间距 */
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-control.error {
    border-color: #dc3545;
}

.error-text {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 消息提示样式 */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.pagination-item {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination-item:hover {
    background: #e9ecef;
}

.pagination-item.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination-item.disabled {
    color: #6c757d;
    cursor: not-allowed;
}

/* 页脚样式 */
.footer {
    background: #343a40;
    color: #fff;
    padding: 30px 0 15px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.footer-section h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-section li {
    margin-bottom: 0;
}

.footer-section a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 12px;
}

/* 相册样式 */
.album-card {
    display: flex;
    flex-direction: column;
    max-width: 200px; /* 限制相册卡片的最大宽度 */
}

.album-card .card-body {
    order: 1; /* 确保卡片内容在上 */
    padding-bottom: 10px;
}

.album-card .card-image {
    order: 2; /* 确保图片在下 */
    width: 100%;
    aspect-ratio: 1/1; /* 强制正方形比例 */
    object-fit: cover;
    height: auto; /* 让高度由 aspect-ratio 控制 */
}

/* 宠物品种样式 */
.pet-breed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 120px; /* 增大尺寸 */
    padding: 0; /* 完全移除内边距 */
    margin: 0; /* 完全移除外边距 */
    border: none; /* 移除边框 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    background: transparent; /* 移除背景 */
}

.pet-breed-image-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%; /* 圆形容器 */
    overflow: hidden;
    margin-bottom: 5px;
    margin-left: 0;
    margin-right: 0;
    border: 1px solid #f8f9fa; /* 更细更淡的边框 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* 添加轻微阴影增强圆形效果 */
}

.pet-breed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* 圆形图片 */
}

.pet-breed-card .card-body {
    padding: 8px 4px; /* 添加适当的内边距 */
    margin: 0; /* 完全移除外边距 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* 元素之间的间距 */
}

.pet-breed-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold !important; /* 确保链接文字也加粗 */
    transition: color 0.3s;
    display: block;
    text-align: center;
    width: 100%;
}

.pet-breed-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 分类链接样式 */
.pet-breed-card .card-category {
    margin: 0;
    padding: 0;
    text-align: center;
    width: 100%;
    order: -1; /* 确保在最上方 */
}

.pet-breed-card .category-link {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
    display: block;
}

.pet-breed-card .category-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 宠物品种查看更多按钮样式 */
.pet-breed-more {
    display: none; /* 默认隐藏，通过媒体查询显示 */
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    transition: none;
}

.pet-breed-more:hover {
    background: #007bff;
    border-color: #007bff;
}

.pet-breed-more-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
    transition: color 0.3s;
}

.pet-breed-more:hover .pet-breed-more-link {
    color: #0056b3;
    text-decoration: underline;
}

/* 使用更高优先级的选择器确保样式生效 */
body .pet-breed-card .card-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: bold !important; /* 强制加粗显示 */
    text-align: center !important; /* 居中对齐 */
    line-height: 1.2 !important;
    width: 100% !important; /* 确保占满宽度 */
    order: 1 !important; /* 确保在下方 */
}

.album-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.album-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 文章列表样式 */
.article-card {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item:hover {
    background: #f8f9fa;
}

.article-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-category {
    display: inline-block;
    color: #007bff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
    width: fit-content;
}

.article-category a {
    color: #007bff;
    text-decoration: none;
}

.article-category a:hover {
    text-decoration: underline;
}

.article-title {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
}

.article-title:hover {
    color: #007bff;
    text-decoration: underline;
}

.product-link {
    color: #333;
    text-decoration: none;
}

.product-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 关于站长卡片样式 */
.about-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.about-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    gap: 15px;
}

.about-avatar-wrapper {
    flex-shrink: 0;
}

.about-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 3px solid #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-info {
    flex: 1;
    min-width: 0;
}

.about-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.about-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

.about-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.about-list {
    display: grid;
    gap: 15px;
}

/* 桌面端关于站长布局 - 一行2个，显示3行共6个 */
@media (min-width: 769px) {
    .about-list {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
    
    /* 在桌面端首页显示前6个关于站长 */
    body:not(.about-page) .about-list .about-card:nth-child(n+7) {
        display: none !important;
    }
}

/* 手机端关于站长布局 - 一行1个，显示3行共3个 */
@media (max-width: 768px) {
    .about-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* 在手机端首页显示前3个关于站长 */
    body:not(.about-page) .about-list .about-card:nth-child(n+4) {
        display: none !important;
    }
}

.album-card .card-title {
    margin-bottom: 0;
    font-size: 16px;
}

/* 描述内容样式 */
.description-content {
    line-height: 1.6;
    word-wrap: break-word;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quick-nav-toggle {
        display: inline-flex !important;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        align-items: center;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-item {
        border-right: none;
        border-bottom: 1px solid #0056b3;
    }
    
    .content-grid {
        gap: 15px;
    }
    


    

    



    

    
    .content-card {
        min-height: auto;
    }
    
    .card-image {
        height: 160px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* 超小屏幕产品卡片优化 */
    @media (max-width: 480px) {
        .product-card {
            min-height: 260px;
        }
        

    }
}

/* 桌面端样式 - 确保快捷导航按钮隐藏 */
@media (min-width: 769px) {
    .quick-nav-toggle {
        display: none !important;
        visibility: hidden !important;
    }
}

/* 描述内容样式 */
.description-content {
    line-height: 1.6;
    word-wrap: break-word;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quick-nav-toggle {
        display: inline-flex !important;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        align-items: center;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-item {
        border-right: none;
        border-bottom: 1px solid #0056b3;
    }
    
    .content-grid {
        gap: 15px;
    }
    


    

    



    

    
    .content-card {
        min-height: auto;
    }
    
    .card-image {
        height: 160px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th, .table td {
        padding: 8px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 桌面端样式 - 确保快捷导航按钮隐藏 */
@media (min-width: 769px) {
    .quick-nav-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

@media (max-width: 480px) {
    .content-body {
        padding: 15px;
    }
    
    .form-control {
        padding: 6px 10px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    /* 超小屏幕产品卡片优化 */
    .product-card {
        min-width: 140px;
            max-width: 150px;
        }
    }
    
    /* 更小屏幕优化 */
    .album-list {
        gap: 8px;
    }
    
    .album-list .album-card {
        border-radius: 6px;
    }
    
    /* 移动端产品卡片优化 */
    .product-card {
        min-height: 280px;
    }
    

}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* 富文本编辑器样式 */
.editor-content {
    min-height: 200px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    background: #fff;
}

.editor-content img {
    max-width: 100%;
    height: auto;
}

.editor-content a {
    color: #007bff;
    text-decoration: none;
}

.editor-content a:hover {
    text-decoration: underline;
}

/* 分类导航样式 */
.category-navigation {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
    position: relative;
    z-index: 100;
}

.category-nav-content {
    padding: 15px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.category-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.category-nav-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.category-nav-item {
    margin: 0;
}

.category-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-nav-link:hover {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.category-nav-link.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    font-weight: 500;
}

.category-count {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 2px;
}

.category-nav-link.active .category-count {
    background: rgba(255,255,255,0.3);
}

/* 移动端分类导航优化 */
@media (max-width: 768px) {
    .category-nav-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }
    
    .category-nav-title {
        font-size: 14px;
    }
    
    .category-nav-list {
        width: 100%;
        justify-content: flex-start;
    }
    
    .category-nav-link {
        padding: 5px 10px;
        font-size: 13px;
        gap: 4px;
    }
    
    .category-count {
        font-size: 11px;
        padding: 1px 4px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .category-navigation {
        margin-bottom: 15px;
    }
    
    .category-nav-content {
        padding: 10px 0;
        gap: 10px;
    }
    
    .category-nav-title {
        font-size: 13px;
    }
    
    .category-nav-link {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .category-count {
        font-size: 10px;
        padding: 1px 3px;
    }
}

/* 区块头部操作按钮容器样式 */
.section-actions {
    display: flex;
    align-items: center;
    gap: 8px; /* 按钮之间的间距 */
}

/* 移动端区块头部操作按钮优化 */
@media (max-width: 768px) {
    .section-actions {
        gap: 6px;
    }
    
    .section-actions .btn {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* 管理后台响应式样式 */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background: #343a40;
    color: white;
    padding: 20px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    border-bottom: 1px solid #495057;
}

.sidebar-link {
    display: block;
    color: #adb5bd;
    text-decoration: none;
    padding: 12px 20px;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: #495057;
    color: #fff;
}

.admin-content,
.main-content {
    flex: 1;
    padding: 20px;
    background: #f8f9fa;
}

.admin-header {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 管理后台手机端优化 */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px 0;
        order: 2; /* 侧边栏在手机端放在底部 */
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
    }
    
    .sidebar-item {
        border-bottom: none;
        border-right: 1px solid #495057;
        flex: 0 0 auto;
    }
    
    .sidebar-item:last-child {
        border-right: none;
    }
    
    .sidebar-link {
        padding: 8px 12px;
        font-size: 12px;
        text-align: center;
        white-space: nowrap;
    }
    
    .admin-content,
    .main-content {
        padding: 15px;
        order: 1; /* 主内容在手机端放在顶部 */
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-header > div {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .admin-header .btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* 管理后台超小屏幕优化 */
@media (max-width: 480px) {
    .sidebar-menu {
        flex-direction: column;
    }
    
    .sidebar-item {
        border-right: none;
        border-bottom: 1px solid #495057;
    }
    
    .sidebar-item:last-child {
        border-bottom: none;
    }
    
    .sidebar-link {
        padding: 10px;
        font-size: 14px;
        text-align: left;
    }
    
    .admin-header > div {
        flex-direction: column;
        gap: 8px;
    }
}