/* 기본 설정 & 변수 */
:root {
    --primary-color: #5d4037; /* 진한 브라운 */
    --primary-light: #8d6e63; /* 부드러운 브라운 */
    --primary-dark: #3e2723; /* 가장 진한 우드톤 */
    --accent-color: #bcaaa4; /* 악센트 연한 브라운 */
    
    --bg-white: #ffffff;
    --bg-light: #fdfbf7; /* 약간 따뜻한 톤의 밝은 배경 */
    --bg-wood: #eae3dc;
    
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #ffffff;
    
    --border-color: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* 유틸리티 클래스 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-white { background-color: var(--bg-white); }
.bg-light { background-color: var(--bg-light); }

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* 폰트/타이틀 */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

.section-title {
    margin-bottom: 50px;
}

.section-title .subtitle {
    color: var(--primary-light);
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 20px 0;
}

.divider.center {
    margin: 20px auto;
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(62, 39, 35, 0.15);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-3px);
}

/* 헤더 (Navigation) */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
    padding: 20px 0;
}

#header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    backdrop-filter: blur(5px);
}

#header.scrolled .logo a {
    color: var(--primary-dark);
}

#header.scrolled .nav-links li a {
    color: var(--text-main);
}

#header.scrolled .nav-links li a:hover {
    color: var(--primary-color);
}

#header.scrolled .mobile-menu-btn {
    color: var(--primary-dark);
}

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

.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-color);
}

#header.scrolled .logo span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.shop-btn {
    background-color: var(--primary-light);
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px;
    transition: var(--transition);
}

.shop-btn::after {
    display: none;
}

.shop-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
}

/* 히어로 배너 */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: url('images/bg.png'); /* 제공된 나뭇결 이미지 사용 */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* 우드 질감을 더 살리기 위해 짙은 브라운 톤의 그라데이션 오버레이 */
    background: linear-gradient(to right, rgba(62, 39, 35, 0.8), rgba(62, 39, 35, 0.4));
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--text-light);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h1 strong {
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-buttons .btn-outline {
    color: var(--text-light);
    border-color: rgba(255,255,255,0.5);
}

.hero-buttons .btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-dark);
}

/* 회사소개 (About) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    line-height: 1.4;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-features {
    margin-top: 30px;
}

.about-features li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
}

.about-features i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1;
}

.about-image::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(141, 110, 99, 0.3);
    top: 20px;
    left: 20px;
    border-radius: 8px;
    z-index: 0;
}

/* 제품안내 (Products) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(93, 64, 55, 0.1);
}

.product-img {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.7);
    position: relative;
    overflow: hidden;
}

/* Hover 효과로 약간의 스케일 무빙 */
.product-card:hover .product-img i,
.product-card:hover .product-img img {
    transform: scale(1.1);
    transition: var(--transition);
}
.product-img i,
.product-img img {
    transition: var(--transition);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 30px;
}

.product-info h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.product-info p {
    color: var(--text-muted);
    margin-bottom: 20px;
    height: 48px; /* 통일성 유지 */
}

/* 커스텀 SNS 이미지 아이콘 스타일 */
.custom-sns-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    mix-blend-mode: screen; /* 검정 배경이 있을 경우 투명하게 날리고 흰색 그래픽만 표시 */
}


.more-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.more-link i {
    margin-left: 8px;
    transition: var(--transition);
}

.more-link:hover {
    color: var(--primary-dark);
}

.more-link:hover i {
    transform: translateX(5px);
}

/* 갤러리 (Gallery) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(93, 64, 55, 0.1);
}

.gallery-img {
    height: 230px;
    position: relative;
    overflow: hidden;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-img .placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--bg-wood);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-color);
    transition: var(--transition);
}

.gallery-item:hover .gallery-img img {
    transform: scale(1.08);
}

.gallery-item:hover .placeholder {
    background-color: var(--primary-light);
    color: var(--bg-white);
}

.gallery-title {
    padding: 18px 20px;
    text-align: center;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.gallery-title h4 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    font-weight: 500;
    margin: 0;
    /* 텍스트가 너무 길 경우 한 줄로 처리 (... 표시) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* SNS 영역 */
.sns-section {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.sns-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.sns-section p {
    opacity: 0.8;
    margin-bottom: 40px;
}

.sns-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.sns-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-light);
    transition: var(--transition);
}

.sns-link:hover {
    background-color: var(--primary-light);
    transform: translateY(-5px);
}

/* 문의하기 (Contact) */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3, .contact-form h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.info-list {
    margin: 30px 0;
}

.info-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    color: var(--text-muted);
}

.info-list i {
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.map-container {
    width: 100%;
    height: 320px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    position: relative;
    border: 1px solid var(--border-color);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

.submit-btn {
    width: 100%;
    border: none;
}

/* 푸터 (Footer) */
.footer {
    background-color: #1a1a1a;
    color: rgba(255,255,255,0.7);
    padding: 80px 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo h2 {
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-logo h2 span {
    color: var(--primary-light);
}

.footer-links h4, .footer-customer h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-customer .tel {
    font-size: 1.8rem;
    color: var(--primary-light);
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.copyright {
    margin-top: 20px;
    color: rgba(255,255,255,0.5);
}

/* 애니메이션 */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 (Responsive) */
@media screen and (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .about-grid, .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr; gap: 30px; }
}

@media screen and (max-width: 768px) {
    .section { padding: 70px 0; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    
    /* 모바일 네비게이션 */
    .mobile-menu-btn { display: block; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease-in-out;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 25px;
    }
    
    .nav-links li a {
        color: var(--primary-dark);
        font-size: 1.2rem;
    }
    
    .products-grid, .gallery-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
}

/* Lightbox Modal Styles */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-img-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.spinner {
    position: absolute;
    color: #fff;
    font-size: 2rem;
    display: none;
}

/* 모바일 Lightbox 호환성 */
@media screen and (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 10px; right: 15px; font-size: 35px; }
    #lightbox-img { max-height: 70vh; }
}

/* Pagination Styles (gallery.html) */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-main);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.page-btn:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: var(--border-color);
}
