/* =====================================================
   上利剪刀网站 - 主样式
   工业风格：简洁、专业、快速加载
   ===================================================== */

/* --- 变量 --- */
:root {
    --primary: #1a5fa8;
    --primary-dark: #0f3d70;
    --accent: #e04020;
    --text: #222;
    --text-light: #666;
    --bg: #f5f6f8;
    --white: #fff;
    --border: #dde0e6;
    --header-h: 64px;
    --nav-bg: #0f3d70;
    --shadow: 0 2px 8px rgba(0,0,0,.1);
    --radius: 4px;
}

/* --- 基础 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* --- 布局 --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* --- 顶部Header --- */
.site-header {
    background: var(--primary);
    color: #fff;
    height: var(--header-h);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .5px;
}

.site-logo:hover { color: #fff; }

.logo-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 900;
}

.header-contact {
    font-size: .85rem;
    opacity: .9;
    text-align: right;
}

.header-contact strong { font-size: 1rem; }

/* --- 导航栏 --- */
.site-nav {
    background: var(--nav-bg);
    border-bottom: 3px solid var(--accent);
}

.site-nav .container {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

.site-nav a {
    color: rgba(255,255,255,.88);
    padding: 10px 12px;
    font-size: .85rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    border-bottom-color: var(--accent);
}

/* --- 主内容区 --- */
.site-main { padding: 24px 0 40px; }

/* --- 面包屑 --- */
.breadcrumb {
    font-size: .85rem;
    color: var(--text-light);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb span { margin: 0 6px; }

/* --- 页面标题 --- */
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

/* --- 首页Banner --- */
.home-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 40px 0;
    margin-bottom: 32px;
}

.home-banner h1 {
    font-size: 1.9rem;
    margin-bottom: 10px;
}

.home-banner p {
    font-size: 1.05rem;
    opacity: .9;
    margin-bottom: 6px;
}

.home-banner .contact-info {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.contact-badge {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: .9rem;
}

/* --- 相册分类网格 --- */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.album-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    display: block;
    color: var(--text);
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    color: var(--text);
}

.album-cover {
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: #e8ecf0;
}

.album-cover-placeholder {
    width: 100%;
    height: 170px;
    background: linear-gradient(135deg, #e8ecf0, #d0d8e4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 2.5rem;
}

.album-info {
    padding: 14px 16px;
}

.album-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--primary-dark);
}

.album-count {
    font-size: .82rem;
    color: var(--text-light);
}

/* --- 图片网格 --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.photo-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .12s;
}

.photo-item:hover { transform: scale(1.02); }

.photo-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #e8ecf0;
}

.photo-title {
    padding: 8px 10px;
    font-size: .8rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Lightbox 灯箱 --- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-overlay.active { display: flex; }

.lightbox-img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 2px;
}

.lightbox-title {
    color: rgba(255,255,255,.85);
    margin-top: 12px;
    font-size: .9rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: .8;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    background: rgba(0,0,0,.4);
    padding: 8px 16px;
    border-radius: var(--radius);
    user-select: none;
    opacity: .8;
    transition: opacity .1s;
}

.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* --- 分页 --- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 24px 0;
}

.page-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    background: var(--white);
    font-size: .9rem;
    transition: all .1s;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- 静态页内容 --- */
.page-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.page-content h2 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.page-content h3 {
    font-size: 1rem;
    color: var(--primary);
    margin: 16px 0 8px;
}

.page-content p { margin-bottom: 10px; }
.page-content ol, .page-content ul { padding-left: 24px; }
.page-content li { margin-bottom: 6px; }

/* --- 公司简介卡 --- */
.intro-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.intro-card h2 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

/* --- Footer --- */
.site-footer {
    background: #1a2840;
    color: rgba(255,255,255,.7);
    padding: 24px 0;
    font-size: .85rem;
    text-align: center;
    margin-top: 20px;
}

.site-footer a { color: rgba(255,255,255,.6); }
.site-footer a:hover { color: #fff; }

/* --- 响应式 --- */
@media (max-width: 640px) {
    :root { --header-h: 56px; }

    .site-logo { font-size: 1rem; }
    .header-contact { display: none; }

    .home-banner h1 { font-size: 1.4rem; }

    .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    .album-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .page-content { padding: 16px; }

    .lightbox-nav { font-size: 1.8rem; padding: 6px 12px; }
}

@media (max-width: 380px) {
    .photo-grid { grid-template-columns: 1fr 1fr; }
    .album-grid { grid-template-columns: 1fr 1fr; }
}
