/* style.css - 최종 통합 버전 (배경 흰색, PC 메인 배너 전체 너비, 유튜브 높이 축소) */

/* 1. 기본 설정 및 초기화 */
:root {
    --primary-color: #007bff; /* 주 색상 (파란색) */
    --accent-color: #ffc107; /* 강조 색상 (노란색) */
    --text-color: #333;
    --bg-color: #ffffff; /* ⭐️⭐️⭐️ 흰색 배경으로 변경 ⭐️⭐️⭐️ */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color); /* 흰색 배경 적용 */
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}


/* 2. 헤더 및 내비게이션 스타일 (PC/모바일 햄버거 메뉴 통합 버전) */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    border-top: 5px solid var(--accent-color);
}

.header .container {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 15px;
}

/* 1. 햄버거 버튼 스타일 (PC에서는 숨김) */
.menu-toggle {
    display: none; 
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--primary-color);
    order: 3; 
}

/* 2. 로고 스타일 */
.header-logo {
    order: 1;
}
.header-logo a {
    /* ⭐️ PC 타이틀 크기 증가 ⭐️ */
    font-size: 1.8em; 
    font-weight: 900;
    color: var(--text-color);
    white-space: nowrap;
}

/* 3. 메뉴 (NAV) 스타일 (PC에서는 항상 보임) */
.header-nav {
    order: 3; 
}
.header-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* PC에서는 가로로 배치 */
    flex-wrap: nowrap;
    gap: 20px; /* 메뉴 항목 간격 추가 */
}
.header-nav li {
    margin-left: 0;
}
.header-nav a {
    text-decoration: none;
    color: var(--primary-color); 
    font-weight: bold;
    font-size: 1em;
    padding: 5px 0;
    transition: color 0.2s;
}
.header-nav a:hover {
    color: var(--accent-color); 
}

/* 4. 사용자 지정 문구 스타일 */
.header-text {
    /* ⭐️ PC에서 중앙에 크게 보이도록 수정 ⭐️ */
    flex-grow: 1; /* 로고와 메뉴 사이의 공간을 채움 */
    text-align: center; 
    margin: 0 30px; /* 로고/메뉴와 간격 추가 */
    font-size: 1.0em; /* PC 가독성 높임 */
    color: #555;
    order: 2; 
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ========================================= */
/* ⭐️⭐️⭐️ 미디어 쿼리: 모바일 (767px 이하) 전용 스타일 ⭐️⭐️⭐️ */
/* ========================================= */
@media (max-width: 767px) {
    
    .header .container {
        /* 로고, 햄버거, 텍스트가 세로로 깔끔하게 배치되도록 flex-direction을 유지하며 레이아웃 변경 */
        display: grid;
        grid-template-columns: auto 1fr auto; /* 햄버거 | 로고/문구 | 햄버거 */
        gap: 10px;
        align-items: center;
        padding: 10px 15px;
    }
    
    /* 1. 햄버거 버튼 보임 */
    .menu-toggle {
        display: block; 
        order: 1;
        grid-column: 1;
    }
    
    /* 2. 로고 크기 조정 및 위치 조정 */
    .header-logo {
        order: 2;
        grid-column: 2;
        text-align: center;
    }
    .header-logo a {
        font-size: 1.5em;
    }
    
    /* 3. 메뉴를 기본적으로 숨김 (JS가 is-open을 토글) */
    .header-nav {
        width: 100%; 
        order: 4; /* 메뉴를 가장 아래에 배치 */
        grid-column: 1 / 4; /* 전체 너비 차지 */
        display: none; 
    }
    .header-nav.is-open {
        display: block; 
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.05);
        border-top: 1px solid #eee;
    }
    .header-nav ul {
        display: block; 
        padding: 10px 0;
    }
    .header-nav li {
        border-bottom: 1px solid #f5f5f5;
    }
    .header-nav a {
        display: block;
        padding: 10px 15px;
        font-size: 1em;
        font-weight: normal;
    }
    
    /* 4. 사용자 지정 문구 (⭐️ 로고 아래 전체 너비 차지 ⭐️) */
    .header-text {
        order: 3;
        grid-column: 3; /* 햄버거 자리 유지 */
        text-align: right; /* 메뉴 토글 버튼 옆에 배치 */
        margin: 0;
        font-size: 0.85em;
        /* 모바일에서는 문구가 길어도 한 줄로 표시하고 ... 처리 */
        white-space: nowrap;
        overflow: hidden; 
        text-overflow: ellipsis;
    }
}

/* ========================================= */
/* ⭐️⭐️⭐️ 미디어 쿼리: 태블릿 (992px 이하) 전용 스타일 ⭐️⭐️⭐️ */
/* ========================================= */
@media (max-width: 992px) {
    /* 태블릿에서는 메뉴 항목 간격을 좀 더 줄임 */
    .header-nav ul {
        gap: 15px;
    }
    
    /* .detail-images-gallery는 PC 설정(2열)을 상속받습니다. */
}


/* 3. 섹션 및 상품 카드 스타일 */
.product-section {
    padding: 30px 0;
}

.section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color); /* 색상 강조 */
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #ddd;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.2em;
    margin: 0 0 10px 0;
    color: var(--text-color);
    text-align: center;
}


/* ================================== */
/* 추가: 특장점 섹션 스타일링 (Features) */
/* ================================== */

/* 특장점 그리드 (기존 card-grid 스타일 활용) */
.feature-grid {
    text-align: center;
}

/* 개별 특장점 아이템 (기존 product-card 스타일 활용) */
.feature-item {
    padding: 25px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* 옅은 그림자 */
    transition: transform 0.2s;
}

.feature-item:hover {
    /* 마우스 오버 시 살짝 떠오르는 효과 유지 */
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 아이콘 스타일 */
.feature-icon {
    font-size: 3em; /* 아이콘 크기 키우기 */
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1; /* 줄 간격 제거 */
}

.feature-item .card-title {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color); /* 제목을 주 색상으로 강조 */
}

.feature-item p {
    font-size: 0.95em;
    color: #555;
    margin-top: 0;
}


.inquiry-button {
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.inquiry-button:hover {
    background-color: #e0a800;
}


/* 4. 유튜브 영상 섹션 스타일 */
.video-section {
    padding: 30px 0;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    /* ⭐️⭐️⭐️ 유튜브 높이 더 줄임 (40% 비율) ⭐️⭐️⭐️ */
    padding-bottom: 40%; 
    height: 0;
    overflow: hidden;
    margin: 0 auto;
    max-width: 800px; 
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}


/* 5. 플로팅 버튼 및 푸터 섹션에서 수정 */

.float-inquiry-button {
    /* ⭐️ 중복 없이 하나의 블록으로 통합 ⭐️ */
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ffeb3b; 
    color: #3c1e1e;
    padding: 15px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    z-index: 1000; 
    transition: transform 0.2s;
}

.float-inquiry-button:hover {
    transform: scale(1.05);
}


/* 6. 상세 페이지 및 기타 */

/* 이전에 누락되었거나 수정되어야 할 상세 페이지 기본 카드 스타일 */
.product-detail-card {
    padding: 40px 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

/* ⭐️⭐️⭐️ 이미지 간격, 크기, 테두리 설정 (PC/태블릿 2열 정렬) ⭐️⭐️⭐️ */
.detail-images-gallery {
    display: grid;
    /* ⭐️ PC/태블릿: 2열 고정 ⭐️ */
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    margin-bottom: 30px;
}

.detail-image {
    width: 100%;
    height: 300px; /* ⭐️ 2열에 맞게 이미지 높이를 좀 더 키웠습니다. ⭐️ */
    border-radius: 8px; /* 둥근 테두리 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover; /* 이미지가 잘리지 않게 영역 채우기 */
    border: 1px solid #eee; /* 얇은 테두리 */
    transition: transform 0.2s;
}

.detail-image:hover {
     transform: scale(1.02);
}

/* 상세 페이지 제목/내용 스타일 (이전에 누락되었을 수 있습니다) */
.detail-title {
    font-size: 2.5em;
    color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.detail-content h2 {
    font-size: 1.5em;
    color: var(--text-color);
    margin-top: 25px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.detail-overview, .detail-description {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
}

.detail-inquiry-box {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border: 2px dashed var(--accent-color);
    border-radius: 10px;
}

.large-button {
    font-size: 1.2em;
    padding: 15px 30px;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-weight: 700;
}
/* -------------------------------------- */

.detail-container {
    padding-top: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.loading-message, .no-products, .error-message {
    text-align: center;
    padding: 30px;
    font-size: 1.1em;
    color: #555;
    background-color: #fff;
    border-radius: 8px;
    margin: 20px 0;
}

/* ================================== */
/* 7. 메인 슬라이드 스타일 (Fade In/Out 전환용) */
/* ================================== */

/* ⭐️⭐️⭐️ 슬라이더 섹션: 양쪽 여백 없이 전체 너비 사용 ⭐️⭐️⭐️ */
.main-slider-section {
    width: 100%;
    margin-bottom: 40px; 
    padding: 0;
    /* 추가: 컨테이너의 max-width에 영향을 받지 않도록 처리 */
    margin-left: auto;
    margin-right: auto;
}

.slider-container {
    overflow: hidden; 
    position: relative;
    width: 100%; /* 전체 너비 사용 */
    max-width: none; /* 최대 너비 제한 해제 */
    margin: 0; /* 중앙 정렬용 margin 제거 */
    border-radius: 0; /* 양쪽 여백 제거를 위해 둥근 모서리 제거 */
    box-shadow: none; /* 그림자 제거 */
    height: 500px; 
}

/* 슬라이드 아이템들을 담는 트랙 (#slider-track) */
.slider-track {
    width: 100%;
    height: 100%;
    position: relative; 
}

/* 개별 슬라이드 아이템 */
.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    opacity: 0; 
    z-index: 1; 
    transition: opacity 1s ease-in-out; 
    background-size: cover;
    background-position: center;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slider-title {
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
    color: #fff; 
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.9); 
}

.slider-text {
    font-size: 1.1em;
    font-weight: 400;
    color: #e0e0e0; 
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); 
}

/* ★ 핵심: 현재 보여야 할 활성화된 아이템에만 적용되는 스타일 */
.slider-item.active {
    opacity: 1; 
    z-index: 2; 
}

/* 페이지네이션 점 */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10; 
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: white;
}

/* 반응형 디자인 수정 (모바일) */
@media (max-width: 768px) {
    /* 모바일에서는 높이를 유지 */
    .slider-container {
        height: 250px; 
    }

    .slider-title {
        font-size: 1.8em;
    }

    .slider-text {
        font-size: 1em;
    }
    
    /* 디테일 이미지 갤러리 1열 전환 */
    .detail-images-gallery {
        grid-template-columns: 1fr; 
    }
    
    .detail-image {
        height: 250px; /* 모바일에서 이미지를 좀 더 크게 */
    }
    
    /* 유튜브 높이 (모바일) - 모바일은 16:9 비율 유지 */
    .video-container {
        padding-bottom: 56.25%; 
    }
}


/* 8. 실시간 상담 팝업 (Modal) 스타일 - 개선 버전 */
.inquiry-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.inquiry-modal-overlay.is-open {
    display: flex;
    opacity: 1;
}

.inquiry-modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    max-width: 320px; 
    width: 90%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    text-align: center;
    overflow-y: auto; 
    max-height: 90vh; 
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #555;
    z-index: 2010; 
}

.modal-title {
    color: var(--primary-color, #007bff); 
    margin-top: 5px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.5em; 
}

.contact-info {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 5px;
    text-align: left; 
}

.contact-info h4 {
    color: #333;
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.contact-info p {
    margin: 5px 0;
    font-size: 0.95em;
}

.contact-info .highlight-info {
    display: block;
    font-size: 1.3em; 
    color: #000; 
    margin: 5px 0 10px 0;
    font-weight: 700;
    background-color: #e6f7ff; 
    padding: 5px;
    border-radius: 3px;
    text-align: center; 
}

.qr-code-desc {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
    text-align: center;
}

.qr-code-box {
    padding: 10px 0;
    text-align: center;
}
.kakaotalk-qr {
    width: 180px; 
    height: 180px;
    border: 4px solid #f9f9f9; 
    border-radius: 5px;
}

@media (max-width: 400px) {
    .inquiry-modal-content {
        padding: 15px;
    }
    .kakaotalk-qr {
        width: 150px; 
        height: 150px;
    }
}

.inquiry-modal-overlay.is-open {
    display: flex; 
    opacity: 1; 
}


/* =================================================== */
/* 특장점 (Features) 섹션 스타일링 */
/* PC 화면에서 4열로 고정하는 미디어 쿼리 포함 */
/* =================================================== */

/* 1. 특장점 컨테이너 기본 설정 (모바일/태블릿 대응) */
.feature-grid {
    /* 특장점 카드를 유연하게 정렬하는 Grid 설정 */
    display: grid;
    /* 화면 크기에 따라 최소 200px 크기로 1개~2개 유연하게 표시 */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

/* 2. PC 화면 (768px 이상)에서 4열 고정 */
@media (min-width: 768px) {
    .feature-grid {
        /* PC에서 4개 카드가 한 줄에 나오도록 열을 4개로 고정 */
        grid-template-columns: repeat(4, 1fr); 
    }
}

/* ------------------------------------------- */
/* 1. Header 고정 및 스타일 */
/* ------------------------------------------- */

/* .header를 화면 상단에 고정하고 Z-index를 높여 다른 요소 위에 표시합니다. */
.header {
    position: fixed !important; /* <<< 여기 수정! */
    top: 0 !important;          /* <<< 여기 수정! */
    left: 0;
    width: 100%;
    z-index: 1000; /* 콘텐츠 위에 표시 */
    background-color: #ffffff; /* 배경색을 흰색으로 설정하여 스크롤 시 콘텐츠 비침 방지 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* 약간의 그림자 추가 */
}


/* ------------------------------------------- */
/* 2. 메인 콘텐츠 상단 여백 추가 */
/* ------------------------------------------- */

/* 메인 콘텐츠 영역(<main class="container">)에 헤더 높이만큼 상단 여백을 추가하여 콘텐츠가 헤더 아래에 가려지지 않도록 합니다. */
/* 모바일 기본값 (헤더 높이 약 60px 가정) */
main.container {
    padding-top: 60px; 
}

/* PC 환경 (769px 이상, 헤더 높이 약 70px 가정) */
@media (min-width: 769px) {
    main.container {
        padding-top: 70px;
    }
}


/* ---- 푸터 스타일 수정: index.html에 맞춰 간격 조정 ---- */

/* 1. 푸터 전체 스타일 */
footer {
    /* 전체 푸터의 상하 패딩(여백)을 줄여 전체 높이를 낮춥니다. */
    padding-top: 25px; 
    padding-bottom: 25px;
    background-color: #374151; /* 예시 색상: gray-700 */
    color: #ffffff;
    font-size: 0.9rem; /* 텍스트 크기를 살짝 줄여 조밀하게 만듭니다. */
    line-height: 1.5; /* 전체 줄 간격을 조절합니다. */
    text-align: center; /* 텍스트 중앙 정렬 */
}

/* 2. 회사 정보 (company-info) 섹션의 간격 조정 */
.company-info p {
    /* <p> 태그의 기본 상하 마진(간격)을 최소화합니다. */
    margin-top: 0;
    margin-bottom: 5px; /* 각 정보 줄 아래에 작은 간격(5px)만 남깁니다. */
    line-height: 1.4; /* 줄 간격도 좁힙니다. */
}

/* 3. 전화번호 링크 스타일 (선택 사항) */
.company-info a {
    color: #a5f3fc; /* 연한 하늘색 */
    text-decoration: none;
}

.company-info a:hover {
    text-decoration: underline;
}

/* 4. 저작권 (copyright) 섹션 스타일 */
.copyright {
    /* 회사 정보와 저작권 사이의 간격을 추가합니다. */
    margin-top: 15px; 
    margin-bottom: 0; /* 불필요한 하단 마진 제거 */
    font-size: 0.75rem; /* 더 작은 폰트 크기 */
    opacity: 0.7; /* 약간 투명하게 처리 */
}