/* CSS Document */

:root { --primary-red: #e53935; --light-bg: #f4f6f8; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei"; background: #f4f6f8; color: #333; padding-bottom: 90px; }

/* 顶部导航 */
header { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 0 40px; height: 60px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.logo { font-size: 22px; font-weight: bold; color: var(--primary-red); }
nav a { margin-left: 25px; text-decoration: none; color: #333; font-size: 14px; }
nav a:hover { color: var(--primary-red); }

/* 主体容器 - 改为垂直排列 */
.main-container { max-width: 1200px; margin: 20px auto; padding: 0 20px; }

/* 计算器区域 */
.calculator { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.08); margin-bottom: 20px; }
.calculator h2 { text-align: center; color: var(--primary-red); font-size: 20px; margin-bottom: 20px; }
.calc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.calc-block label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 14px; }
.calc-block select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
#crafts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eee; }
#crafts div { display: flex; align-items: center; padding: 8px 12px; border: 1px solid #eee; border-radius: 20px; font-size: 13px; background: #fafafa; }

/* 纸样区域 */
.gallery { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.gallery h3 { margin-bottom: 20px; color: #333; font-size: 18px; text-align: center; }
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
.sample-item { border: 1px solid #eee; border-radius: 8px; overflow: hidden; cursor: pointer; transition: all .2s; }
.sample-item:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,.1); border-color: var(--primary-red); }
.sample-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.sample-item span { display: block; padding: 8px; font-size: 13px; text-align: center; background: #fafafa; font-weight: bold; }

/* 底部结果 */
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(135deg, #ff416c, #ff4b2b); color: #fff; padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 -2px 20px rgba(0,0,0,.2); }
.total-box .label { font-size: 14px; opacity: .9; }
.total-box .price { font-size: 32px; font-weight: bold; }
.contact-btn { background: #fff; color: var(--primary-red); padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: bold; font-size: 16px; }

/* 弹窗图片 */
.modal { display: none; position: fixed; z-index: 999; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); }
.modal-content { margin: auto; display: block; max-width: 80%; max-height: 80%; border-radius: 8px; }
.close { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; }

/* 响应式 */
@media (max-width: 768px) {
    header { padding: 0 15px; }
    nav a { margin-left: 10px; font-size: 13px; }
    .calc-row { grid-template-columns: 1fr; }
    .sample-grid { grid-template-columns: repeat(2, 1fr); }
}

.wx-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; padding: 10px 20px; border-radius: 20px; font-size: 14px; display: none; z-index: 9999; }
.wx-btn { display: block; margin-top: 16px; text-align: center; background: linear-gradient(135deg,#07c160,#09bb07); color: #fff; padding: 12px; border-radius: 30px; font-size: 14px; font-weight: bold; cursor: pointer; border: none; width: 100%; }