/**
 * 猫大仙 - 网站主样式表
 * 年轻化艺术风格设计
 */

/* ========== 基础变量 ========== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #8b7355;
    --accent-color: #d4a574;
    --bg-color: #faf8f5;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e8e4df;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 基础样式重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== 导航栏 ========== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color) !important;
    background: rgba(139, 115, 85, 0.08);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========== 主内容区 ========== */
.main-content {
    min-height: calc(100vh - 300px);
    padding-top: 76px;
}

/* ========== Banner轮播 ========== */
.hero-banner {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-banner .carousel-item {
    height: 600px;
}

.hero-banner .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ========== 区块标题 ========== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1.2rem;
}

/* ========== 卡片样式 ========== */
.work-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.work-card-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.work-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-card-image img {
    transform: scale(1.08);
}

.work-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.work-card-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.work-card-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.work-card-price .original {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

.work-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-card-btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-custom:hover {
    background: var(--secondary-color);
    color: white;
}

/* ========== 首页特色入口 ========== */
.feature-entry {
    padding: 5rem 0;
}

.entry-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.entry-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.entry-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.entry-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.entry-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========== 页面区块 ========== */
.page-section {
    padding: 4rem 0;
}

.bg-light {
    background: #f5f3f0 !important;
}

/* ========== 作品列表网格 ========== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* 手机端：一行两个作品 */
@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .work-card-body {
        padding: 0.75rem !important;
    }
    
    .work-card-title {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .work-card-meta {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .work-card-price {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .work-card-price .original {
        font-size: 0.7rem !important;
    }
    
    .work-card-desc {
        font-size: 0.75rem !important;
        margin-bottom: 0.4rem !important;
        -webkit-line-clamp: 1 !important;
    }
    
    .work-card-btn {
        padding: 0.4rem !important;
        font-size: 0.75rem !important;
    }
}

/* ========== 作品详情页 ========== */
.work-detail {
    padding: 3rem 0;
}

.work-detail-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.work-detail-image img {
    width: 100%;
    height: auto;
}

.work-detail-info {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.work-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.work-detail-meta {
    margin-bottom: 1.5rem;
}

.work-detail-meta-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.work-detail-meta-item:last-child {
    border-bottom: none;
}

.work-detail-meta-label {
    width: 100px;
    color: var(--text-muted);
    font-weight: 500;
}

.work-detail-meta-value {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.work-detail-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 1.5rem 0;
}

.work-detail-price .original {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.75rem;
    font-weight: 400;
}

.work-detail-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* ========== 表单样式 ========== */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ========== 底部 ========== */
.footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 0;
}

.footer-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-desc {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-contact i {
    color: var(--accent-color);
    width: 20px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-color);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== 回到顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ========== 小程序悬浮按钮 ========== */
.miniprogram-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: linear-gradient(135deg, #07c160, #05a050);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 998;
}

.miniprogram-float:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.miniprogram-float i {
    font-size: 1.2rem;
}

/* ========== 收银台悬浮按钮 ========== */
.cashier-float {
    position: fixed;
    bottom: 165px;
    right: 30px;
    background: linear-gradient(135deg, #1677ff, #0056d6);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 997;
}

.cashier-float:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.cashier-float i {
    font-size: 1.2rem;
}

/* ========== 收银台弹窗样式 ========== */
.cashier-qrcode-wrapper {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.cashier-qrcode-img {
    max-width: 240px;
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.cashier-contact {
    text-align: center;
}

.wechat-id-box {
    display: inline-flex;
    align-items: center;
    background: #f0f9f0;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    border: 1px solid #d4edda;
    color: #155724;
    font-size: 1.1rem;
}

/* 手机端收银台按钮适配 */
@media (max-width: 768px) {
    .cashier-float {
        bottom: 145px;
        right: 15px;
        padding: 0.6rem 1rem;
    }
    
    .cashier-float span {
        display: none;
    }
    
    .cashier-qrcode-img {
        max-width: 200px;
    }
    
    .wechat-id-box {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* ========== 二维码弹窗 ========== */
.qrcode-img {
    max-width: 200px;
    border-radius: var(--radius-sm);
}

/* ========== 单页内容 ========== */
.page-content {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.page-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.page-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.page-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ========== 响应式适配 ========== */
@media (max-width: 991px) {
    .hero-banner,
    .hero-banner .carousel-item {
        height: 450px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 60px;
    }
    
    /* 手机端首页海报优化 */
    .hero-banner,
    .hero-banner .carousel-item {
        height: 65vh;
        min-height: 480px;
        max-height: 600px;
    }
    
    .hero-overlay {
        background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.6) 100%);
        padding: 0 1.5rem;
    }
    
    .hero-content {
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
        font-weight: 600;
        margin-bottom: 1.25rem;
        line-height: 1.4;
        letter-spacing: 0.5px;
    }
    
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 2.5rem;
        opacity: 0.9;
        line-height: 1.6;
    }
    
    /* 按钮样式优化 */
    .hero-content .btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
        border-radius: 50px;
        margin: 0.5rem 0.35rem;
        min-width: 130px;
    }
    
    .hero-content .btn-lg {
        padding: 0.875rem 2rem;
    }
    
    .hero-content .me-3 {
        margin-right: 0.5rem !important;
    }
    
    /* 轮播指示器优化 */
    .hero-banner .carousel-indicators {
        bottom: 1.5rem;
    }
    
    .hero-banner .carousel-indicators button {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin: 0 4px;
    }
    
    /* 区块标题优化 */
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        color: var(--text-muted);
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* 首页公告区域优化 */
    .page-section.bg-light {
        padding: 2.5rem 0;
    }
    
    .page-content {
        padding: 1.75rem;
        font-size: 0.95rem;
        line-height: 1.8;
    }
    
    /* 特色入口区域优化 */
    .feature-entry {
        padding: 3rem 0;
    }
    
    .feature-entry .row {
        --bs-gutter-x: 1rem;
    }
    
    .entry-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-md);
    }
    
    .entry-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .entry-title {
        font-size: 1.15rem;
        margin-bottom: 0.5rem;
    }
    
    .entry-desc {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    
    .entry-card .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* 页面区块间距优化 */
    .page-section {
        padding: 2.5rem 0;
    }
    
    .page-content {
        padding: 2rem 1.5rem;
    }
    
    .work-detail-title {
        font-size: 1.5rem;
    }
    
    .work-detail-price {
        font-size: 2rem;
    }
    
    .miniprogram-float {
        bottom: 80px;
        right: 15px;
        padding: 0.6rem 1rem;
    }
    
    .miniprogram-float span {
        display: none;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 115, 85, 0.3);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 图片懒加载占位 ========== */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1.5rem;
}

.empty-state-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ========== 提示信息 ========== */
.alert-custom {
    border: none;
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
}

.alert-success-custom {
    background: #d4edda;
    color: #155724;
}

.alert-error-custom {
    background: #f8d7da;
    color: #721c24;
}
