/* Base Variables */
:root {
    --primary-color: #2D3436;
    --accent-color: #00B894;
    --accent-hover: #019E7F;
    --bg-color: #FAFAFA;
    --text-color: #636E72;
    --heading-color: #2D3436;
    --light-gray: #DFE6E9;
    --white: #FFFFFF;
    --dark-bg: #2D3436;

    --font-heading: "PingFang SC", "Microsoft YaHei", "SimHei", sans-serif;
    --font-body: "PingFang SC", "Microsoft YaHei", "SimHei", sans-serif;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);

    --transition: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-color);
    letter-spacing: -0.5px;
}

.logo img {
    display: block;
}

.logo span {
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 40px;
    margin-left: auto;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--heading-color);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    text-align: center;
    color: var(--white);
    margin-top: -80px;
    /* Offset navbar */
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: clamp(40px, 5vw, 64px);
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: var(--white);
}

.hero p {
    font-size: clamp(18px, 2.5vw, 24px);
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}



/* Section Common */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.subtitle {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.section-header h2 {
    font-size: 40px;
    margin-bottom: 24px;
}

.line {
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

.section-desc {
    color: var(--text-color);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-text {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    font-size: 18px;
}

.about-text p {
    margin-bottom: 24px;
}

.features-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.features-list li {
    font-weight: 500;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .about-text {
        text-align: left;
        padding: 0 20px;
        font-size: 16px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .features-list {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .features-list li {
        justify-content: center;
        font-size: 25px;
        font-weight: 700;
    }

    .features-list .icon {
        font-size: 25px;
    }
}

.features-list .icon {
    font-size: 24px;
}

/* Appliances Section */
.dark-section {
    background-color: #F0F2F5;
}

.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s var(--transition);
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 240px;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-info {
    padding: 30px;
    position: relative;
    background: var(--white);
}

.card-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.card-info p {
    font-size: 14px;
    color: #999;
}

/* Appliance Masonry Layout */
.app-masonry-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background-color: #E0E0E0;
    background-size: cover;
    background-position: center;
}

.app-masonry-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.app-masonry-item:hover .overlay {
    opacity: 0.8;
}

.app-masonry-item:hover .showcase-content {
    transform: translateY(0);
    opacity: 1;
}

/* Specific Appliance Items */
/* 智能电视 */
.app-tv {
    grid-column: span 2;
    grid-row: span 2;
}

/* 节能冰箱 */
.app-fridge {
    grid-column: span 1;
    grid-row: span 2;
}

/* 变频空调 */
.app-ac {
    grid-column: span 1;
}

/* 洗烘一体 */
.app-washer {
    grid-column: span 1;
}

/* 取暖桌 */
.app-heater {
    grid-column: span 2;
}

/* 厨电套装 */
.app-kitchen {
    grid-column: span 2;
}

/* Mobile Reset for Appliances */
@media (max-width: 768px) {

    .app-tv,
    .app-fridge,
    .app-ac,
    .app-washer,
    .app-heater,
    .app-kitchen {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

/* Store Placeholders */
/* 长虹美菱专卖店 */
/* 门店图片样式已移至 images.css */

.store-showcase .card-info {
    text-align: center;
}

/* Furniture generic */

/* Furniture Section */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}

.masonry-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background-color: #E0E0E0;
    background-size: cover;
    background-position: center;
}

/* 现代沙发 */
.masonry-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

/* 定制衣柜 */
.masonry-item:nth-child(2) {
    grid-column: span 1;
    grid-row: span 2;
}

/* 梳妆台 */
.masonry-item:nth-child(5) {
    grid-column: span 2;
}

/* 家具图片样式已移至 images.css */

.masonry-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.masonry-item:hover .overlay {
    opacity: 0.8;
}

.showcase-content {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 2;
    color: var(--white);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s var(--transition);
}

.masonry-item:hover .showcase-content {
    transform: translateY(0);
    opacity: 1;
}

.showcase-content h3 {
    color: var(--white);
    font-size: 24px;
    margin-bottom: 4px;
}

/* Contact Section */
.contact-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h2 {
    color: var(--white);
    font-size: 48px;
    margin-bottom: 16px;
}

.contact-info>p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 18px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item .label {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.info-item .value {
    font-weight: 500;
}

.map-placeholder {
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
}

/* Footer */
footer {
    background-color: #262b2d;
    padding: 40px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

footer p {
    margin-bottom: 10px;
}

footer p:last-child {
    margin-bottom: 0;
}

footer a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Animations & Utilities */
.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

.cursor {
    display: inline-block;
    margin-left: 2px;
    font-weight: 100;
    animation: blink 1s step-end infinite;
    color: var(--white);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease forwards;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 100%;
    max-height: 90vh;
    /* Ensure it fits viewport height */
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
    background: transparent;
    border: none;
    outline: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* Responsive */
@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .masonry-item:nth-child(1) {
        grid-column: span 2;
    }

    .masonry-item:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .masonry-item:nth-child(5) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        justify-content: center;
    }

    .hamburger {
        position: absolute;
        right: 20px;
    }

    .logo {
        font-size: 20px;
    }

    .nav-links {
        display: none;
    }

    footer a {
        white-space: nowrap;
        display: block;
        margin-top: 5px;
    }

    .footer-sep {
        display: none;
    }

    /* Add hamburger menu JS later if needed, for now desktop focus */
    .hero h1 {
        font-size: clamp(24px, 8vw, 40px);
        white-space: nowrap;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }


    /* 确保容器有内边距，防止内容溢出 */
    .container {
        padding: 0 20px;
    }

    /* 重置masonry网格 */
    .masonry-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
        gap: 20px;
    }

    /* 重置所有masonry-item的样式，确保不重叠 */
    .masonry-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: 300px;
    }

    /* 明确覆盖每个nth-child的样式 */
    .masonry-item:nth-child(1),
    .masonry-item:nth-child(2),
    .masonry-item:nth-child(5) {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    /* 默认显示文字内容 */
    .showcase-content {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Interactive Map Styles */
#map-container {
    height: 350px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.map-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-wrapper:active {
    cursor: grabbing;
}

#interactive-map {
    max-width: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.map-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    z-index: 5;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#map-container:hover .map-hint {
    opacity: 0;
}

/* Hero Title Spans */
