/* ===== 工厂实拍页面专用样式 ===== */
/* ===== 页面基础样式 ===== */
.factory-page {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    color: #f5f5f5;
    line-height: 1.6;
}

/* ===== 首屏引导区 ===== */
.factory-hero {
    height: 420px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #34495e;
    border-bottom: 3px solid #2c3e50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

    /* 混凝土纹理背景 */
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><defs><pattern id="concretePattern" patternUnits="userSpaceOnUse" width="200" height="200"><rect width="200" height="200" fill="%2334495e"/><circle cx="60" cy="70" r="4" fill="%234a6572" opacity="0.4"/><circle cx="140" cy="90" r="6" fill="%234a6572" opacity="0.3"/><circle cx="90" cy="140" r="5" fill="%234a6572" opacity="0.35"/><circle cx="30" cy="40" r="7" fill="%234a6572" opacity="0.25"/><rect x="30" y="80" width="140" height="2" fill="%232c3e50" opacity="0.2"/></pattern></defs><rect width="100%25" height="100%25" fill="url(%23concretePattern)"/></svg>'),
        linear-gradient(135deg, rgba(52, 73, 94, 0.9) 0%, rgba(41, 128, 185, 0.1) 100%);
}

/* 内容层 */
.factory-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    margin-top: 60px;
}

/* ===== 面包屑导航 (适配 PbootCMS 标签) ===== */
.factory-breadcrumb {
    position: absolute;
    top: 20px;
    left: 20px;
    right: auto;
    text-align: left;
    z-index: 20;
}

.breadcrumb-list {
    display: inline-flex;
    align-items: center;
    list-style: none;
    padding: 8px 16px;
    margin: 0;
    font-size: 14px;
    color: #bdc3c7;
    background: rgba(44, 62, 80, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* PbootCMS 自动生成的 span 包裹项 */
.breadcrumb-list span {
    display: inline-flex;
    align-items: center;
}

/* 普通链接样式 */
.breadcrumb-list a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
    color: #3498db;
}

/* 当前页（最后一个 span，且内部无链接） */
.breadcrumb-list span:last-child {
    color: #ecf0f1;
    font-weight: 500;
}

/* 分隔符图标（FontAwesome 角度右） */
.breadcrumb-list i {
    margin: 0 10px;
    color: #3498db;
    font-size: 14px;
}

/* 原硬编码面包屑样式保留（避免影响其他页面，但与本页新结构无冲突） */
.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin: 0 10px;
    color: #3498db;
}
.breadcrumb-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb-link:hover {
    color: #3498db;
}
.breadcrumb-current {
    color: #ecf0f1;
    font-weight: 500;
}

/* ===== 主标题样式 ===== */
.factory-hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #ecf0f1;
    margin-bottom: 16px;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.factory-hero-subtitle {
    display: block;
    font-size: 24px;
    font-weight: 500;
    color: #3498db;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 32px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 12px;
    display: inline-block;
}

.factory-hero-desc {
    font-size: 18px;
    color: #bdc3c7;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 24px;
    background: rgba(44, 62, 80, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
}

/* ===== 工厂分区按钮组 - 单排展示 ===== */
.factory-category-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 15px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-btn {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    padding: 12px 10px;
    color: #ecf0f1;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(3px);
    position: relative;
    overflow: hidden;
    min-width: 130px;
    flex: 1;
    max-width: 150px;
}

.category-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

.category-btn .btn-icon {
    font-size: 20px;
    color: #3498db;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.category-btn:hover .btn-icon {
    color: #e74c3c;
    transform: scale(1.05);
}

.category-btn .btn-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.category-btn .btn-desc {
    font-size: 11px;
    color: #bdc3c7;
    opacity: 0.8;
    line-height: 1.3;
}

/* ===== 悬挂相册墙 (核心模块) ===== */
.factory-gallery-wall {
    padding: 80px 20px;
    min-height: 1400px;
    position: relative;
    overflow: hidden;
    background-image: 
        url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAwIiBoZWlnaHQ9IjYwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9Im5vaXNlIiB4PSIwJSIgeT0iMCUiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPgogICAgICA8ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC42IiBudW1PY3RhdmVzPSI1IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+CiAgICAgIDxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwLjkgMCAwIDAgMC4xIDAuOSAwIDAgMC4xIDAgMC45IDAgMC4xIDAgMCAwIDAuNyAwIi8+CiAgICA8L2ZpbHRlcj4KICA8L2RlZnM+CiAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI25vaXNlKSIgZmlsbD0iI2Y4ZjlmYSIvPgo8L3N2Zz4='),
        linear-gradient(45deg, rgba(0,0,0,0.03) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.03) 75%, rgba(0,0,0,0.03) 0),
        linear-gradient(45deg, rgba(0,0,0,0.03) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.03) 75%, rgba(0,0,0,0.03) 0);
    background-color: #f8f9fa;
    background-size: 600px 600px, 60px 60px, 30px 30px;
    background-position: 0 0, 0 0, 15px 15px;
}

.wall-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #2c3e50 0%, #3498db 30%, #e74c3c 50%, #3498db 70%, #2c3e50 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.gallery-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 64px;
    text-align: center;
    position: relative;
    padding-bottom: 24px;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, #e74c3c 50%, transparent 100%);
    border-radius: 2px;
}

/* 相册网格 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 30px;
    margin-bottom: 80px;
    position: relative;
}

/* 相框基础样式 */
.photo-frame {
    position: relative;
    perspective: 800px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

/* 错落有致的垂直偏移 */
.photo-frame:nth-child(1) { margin-top: 0px; }
.photo-frame:nth-child(2) { margin-top: 25px; }
.photo-frame:nth-child(3) { margin-top: -15px; }
.photo-frame:nth-child(4) { margin-top: 10px; }
.photo-frame:nth-child(5) { margin-top: 15px; }
.photo-frame:nth-child(6) { margin-top: -10px; }
.photo-frame:nth-child(7) { margin-top: 30px; }
.photo-frame:nth-child(8) { margin-top: 0px; }
.photo-frame:nth-child(9) { margin-top: -20px; }
.photo-frame:nth-child(10) { margin-top: 5px; }
.photo-frame:nth-child(11) { margin-top: 25px; }
.photo-frame:nth-child(12) { margin-top: -5px; }
.photo-frame:nth-child(13) { margin-top: 20px; }
.photo-frame:nth-child(14) { margin-top: 0px; }
.photo-frame:nth-child(15) { margin-top: -15px; }
.photo-frame:nth-child(16) { margin-top: 25px; }
.photo-frame:nth-child(17) { margin-top: -10px; }
.photo-frame:nth-child(18) { margin-top: 30px; }
.photo-frame:nth-child(19) { margin-top: 10px; }
.photo-frame:nth-child(20) { margin-top: 0px; }

/* 相框尺寸 */
.photo-frame.size-xlarge .photo-frame-inner { height: 340px; width: 95%; }
.photo-frame.size-large .photo-frame-inner { height: 300px; width: 85%; }
.photo-frame.size-medium .photo-frame-inner { height: 260px; width: 90%; }
.photo-frame.size-small .photo-frame-inner { height: 220px; width: 80%; }
.photo-frame.size-xsmall .photo-frame-inner { height: 200px; width: 75%; }

/* 钉子效果 */
.photo-frame::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.2), inset 0 -1px 2px rgba(0, 0, 0, 0.5);
    background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 1%, transparent 10%), radial-gradient(circle at 70% 70%, rgba(0,0,0,0.3) 1%, transparent 10%);
}
.nail-silver::before { background: radial-gradient(circle at 30% 30%, #f8f9fa 0%, #e9ecef 30%, #dee2e6 70%, #adb5bd 100%); }
.nail-copper::before { background: radial-gradient(circle at 30% 30%, #d39e00 0%, #b8860b 30%, #8b6914 70%, #654321 100%); }
.nail-black::before { background: radial-gradient(circle at 30% 30%, #495057 0%, #343a40 30%, #212529 70%, #000000 100%); }
.nail-gold::before { background: radial-gradient(circle at 30% 30%, #ffd700 0%, #daa520 30%, #b8860b 70%, #8b6914 100%); }

.photo-frame::after {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 8px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
    z-index: 4;
    filter: blur(2px);
}

.photo-frame-inner {
    position: relative;
    height: 280px;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 8px #4a6572, 0 8px 25px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.15), inset 0 1px 3px rgba(255, 255, 255, 0.8), inset 0 -1px 3px rgba(0, 0, 0, 0.05);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.photo-frame:hover .photo-frame-inner {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 0 0 8px #3498db, 0 15px 40px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2), inset 0 2px 5px rgba(255, 255, 255, 0.9), inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.photo-frame:hover::before {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), inset 0 2px 3px rgba(255, 255, 255, 0.3), inset 0 -2px 3px rgba(0, 0, 0, 0.6);
    transform: translateX(-50%) scale(1.1);
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.98) contrast(1.05);
}

.photo-frame:hover .photo-image {
    transform: scale(1.05);
    filter: brightness(1.05) contrast(1.1);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(33, 33, 33, 0.95) 0%, rgba(33, 33, 33, 0.7) 70%, transparent 100%);
    padding: 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.photo-frame:hover .photo-caption {
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 24px;
}

.photo-frame-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.03);
    pointer-events: none;
    z-index: 1;
    border-radius: 4px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px 25px;
    }
    .photo-frame.size-xlarge .photo-frame-inner { height: 320px; width: 90%; }
    .photo-frame.size-large .photo-frame-inner { height: 280px; width: 85%; }
    .photo-frame.size-medium .photo-frame-inner { height: 240px; width: 85%; }
    .photo-frame.size-small .photo-frame-inner { height: 210px; width: 80%; }
    .photo-frame.size-xsmall .photo-frame-inner { height: 190px; width: 75%; }
}

@media (max-width: 992px) {
    .factory-hero { height: 450px; }
    .factory-hero-title { font-size: 36px; }
    .factory-hero-subtitle { font-size: 20px; }
    .factory-category-buttons { gap: 12px; }
    .category-btn { min-width: 110px; max-width: 120px; padding: 10px 8px; }
    .category-btn .btn-icon { font-size: 18px; margin-bottom: 6px; }
    .category-btn .btn-title { font-size: 13px; }
    .category-btn .btn-desc { font-size: 10px; }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
    }
    .photo-frame.size-xlarge .photo-frame-inner,
    .photo-frame.size-large .photo-frame-inner,
    .photo-frame.size-medium .photo-frame-inner,
    .photo-frame.size-small .photo-frame-inner,
    .photo-frame.size-xsmall .photo-frame-inner {
        width: 85%;
    }
}

@media (max-width: 768px) {
    .factory-hero { height: 500px; }
    .factory-hero-title { font-size: 32px; }
    .factory-hero-subtitle { font-size: 18px; }
    .factory-hero-desc { font-size: 16px; padding: 16px; margin-bottom: 25px; }
    .factory-breadcrumb { top: 15px; left: 15px; }
    .breadcrumb-list { font-size: 12px; padding: 6px 12px; }
    .factory-category-buttons { flex-wrap: wrap; justify-content: center; }
    .category-btn { min-width: 100px; max-width: 110px; flex: 0 0 calc(33.333% - 10px); margin-bottom: 10px; }
    .gallery-grid { gap: 35px 25px; }
    .photo-frame:nth-child(n) { margin-top: 0; }
}

@media (max-width: 576px) {
    .factory-hero { height: 550px; }
    .factory-hero-title { font-size: 28px; }
    .factory-hero-subtitle { font-size: 16px; }
    .factory-breadcrumb { top: 10px; left: 10px; }
    .breadcrumb-list { font-size: 11px; padding: 5px 10px; }
    .category-btn { min-width: 90px; max-width: 100px; flex: 0 0 calc(50% - 8px); margin-bottom: 8px; }
    .category-btn .btn-icon { font-size: 16px; margin-bottom: 5px; }
    .category-btn .btn-title { font-size: 12px; }
    .category-btn .btn-desc { font-size: 9px; }
    .gallery-grid { grid-template-columns: 1fr; gap: 40px; }
    .photo-frame.size-xlarge .photo-frame-inner,
    .photo-frame.size-large .photo-frame-inner,
    .photo-frame.size-medium .photo-frame-inner,
    .photo-frame.size-small .photo-frame-inner,
    .photo-frame.size-xsmall .photo-frame-inner {
        width: 85%;
        height: 260px;
    }
}

/* ===== 打印样式优化 ===== */
@media print {
    .factory-page { background: white; }
    .factory-hero, .factory-breadcrumb { background: white; color: black; border: none; box-shadow: none; }
    .factory-hero-title, .factory-hero-subtitle, .factory-hero-desc { color: black; text-shadow: none; }
    .factory-gallery-wall { background: white; padding: 0; }
    .gallery-title { color: black; }
    .photo-frame-inner { box-shadow: 0 0 0 2px #ddd; break-inside: avoid; height: 200px; }
    .photo-frame::before, .photo-frame::after { display: none; }
    .photo-caption { opacity: 1; color: black; background: white; position: static; padding: 8px 0; }
}