/* Mobile override: ensure H5 carousel images fully visible */
@media (max-width: 720px) {
  .carousel { height: 44vh; min-height: 220px; }
  .carousel .slide {
    background-size: contain !important;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fff;
  }
}
:root {
    --bg: #ffffff;
    /* 页面背景 */
    --surface: #ffffff;
    /* 卡片/表单等表面 */
    --text: #1f2937;
    /* 主要文字 */
    --muted: #6b7280;
    /* 次要文字 */
    --brand: #2563eb;
    /* 品牌主色 */
    --brand-600: #1d4ed8;
    /* 品牌深色 */
    --border: #e5e7eb;
    /* 边框色 */
    --soft: #f8fafc;
    /* 柔和浅灰背景 */
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Noto Sans SC', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
}

.site-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--muted);
    padding: 8px 10px;
    border-radius: 8px;
    transition: color .2s, background .2s;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--brand-600);
    background: #eff6ff;
}

.nav-toggle {
    display: none;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
}

/* Sections */
.section {
    padding: 72px 0;
}

.section.alt {
    background: var(--soft);
}

.hero {
    padding-top: 96px;
    text-align: center;
}

.hero h1 {
    font-size: 40px;
    margin: 0 0 12px;
}

.hero p {
    color: var(--muted);
    margin: 0 0 20px;
}

/* Layout helpers */
.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.two-col.two-col-center {
    align-items: center;
    justify-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.feature-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gallery img {
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
}

.btn:hover {
    background: #f3f4f6;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand-600);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    background: var(--brand-600);
}

/* Form */
.message-form {
    max-width: 640px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

label {
    color: var(--muted);
    font-size: 14px;
}

input,
textarea {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-tip {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

/* Sticky footer */
main {
    flex: 1;
}

/* Modal (light theme) */
.modal {
    position: fixed;
    inset: 0;
    display: none;
}

.modal.open {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    max-width: 520px;
    margin: 10vh auto;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 16px;
    z-index: 1;
    color: var(--text);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.modal-close {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
}

.modal-body {
    color: var(--text);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 960px) {
    .two-col {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {

    .grid-3,
    .gallery {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        background: #ffffff;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .site-nav li {
        border-top: 1px solid var(--border);
    }

    .site-nav a {
        display: block;
        padding: 14px 16px;
    }

    /* Mobile carousel: 优化为完整显示且更适配首屏高度 */
    .carousel {
        height: 44vh;
        min-height: 220px;
    }
    .slide {
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        background-color: #fff;
    }
    .carousel-btn {
        padding: 10px 14px;
    }
    .carousel-dots button {
        width: 10px;
        height: 10px;
    }
}

/* Carousel */
.carousel {
    position: relative;
    height: 60vh;
    min-height: 360px;
    border-bottom: 1px solid var(--border);
    background: #e5e7eb;
}

.carousel-inner {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .6s ease;
}

.slide.is-active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    color: #111827;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: var(--shadow);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    padding: 0;
}

.carousel-dots button.is-active {
    background: var(--brand);
    border-color: var(--brand-600);
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.product {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    padding-top: 240px;
}

.product img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 240px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    background: #ffffff;
}

.product h3 {
    font-size: 14px;
    margin: 12px 12px 14px;
    color: var(--text);
    text-align: center;
}

@media (max-width: 960px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product {
        padding-top: 220px;
    }

    .product img {
        height: 220px;
        object-fit: cover;
    }
}

@media (max-width: 720px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product {
        padding-top: 200px;
    }

    .product img {
        height: 200px;
        object-fit: cover;
    }
}