/* =========================================
   1. 기본 설정 및 초기화
   ========================================= */
:root {
    --primary-color: #E60012; 
    --contact-bg: #00904B; 
    --text-dark: #333;
    --text-light: #666;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Noto Sans KR', sans-serif; }
body { overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. 헤더
   ========================================= */
.header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: transparent; padding: 20px 0; transition: all 0.4s ease;
}
.header.scrolled { background-color: #000; padding: 10px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 40px; }
.nav-menu ul { display: flex; gap: 30px; }
.nav-menu a { color: #fff; font-size: 14px; font-weight: 500; text-transform: uppercase; transition: color 0.3s; }
.nav-menu a:hover { color: var(--primary-color); }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; }
.mobile-menu-btn span { display: block; width: 25px; height: 3px; background-color: #fff; margin: 5px 0; }

/* =========================================
   3. Hero Section
   ========================================= */
.hero { height: 760px; width: 100%; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; }
.hero-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; transition: transform 0.5s ease-in-out; z-index: 0; }
.hero-slide { min-width: 100%; height: 100%; background-size: cover; background-position: center; }
.hero .overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); z-index: 1; }
.hero-content { position: relative; z-index: 2; width: 100%; max-width: 1200px; padding: 0 20px; }
.hero-frame { display: inline-block; border: 1px solid #fff; padding: 50px 80px; position: relative; margin-top: -50px; }
.hero-frame::before, .hero-frame::after { content: '+'; position: absolute; color: #fff; font-size: 24px; font-weight: 300; line-height: 1; }
.hero-frame::before { top: -12px; left: -6px; }
.hero-frame::after { bottom: -12px; right: -6px; }
.hero-frame h2 { font-size: 64px; font-weight: 700; line-height: 1.15; color: #fff; text-shadow: 0 3px 6px rgba(0,0,0,0.3); }
.hero-indicators { position: absolute; bottom: 30px; display: flex; gap: 10px; z-index: 3; }
.dot { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255,255,255,0.5); border: 1px solid #fff; cursor: pointer; }
.dot.active { background-color: #fff; }

/* =========================================
   4. About Section
   ========================================= */
.about { display: flex; background-color: #f5f5f5; height: 600px; overflow: hidden; }
.about-image { flex: 1; height: 100%; }
.about-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.about-text { flex: 1; padding: 0 60px; display: flex; align-items: center; }
.about-content-wrap { max-width: 600px; }
.about h2 { font-size: 32px; margin-bottom: 20px; font-weight: 500; color: #000; }
.description { font-size: 15px; color: #666; line-height: 1.6; margin-bottom: 40px; }
.history-title { color: var(--primary-color); margin-bottom: 20px; font-size: 18px; font-weight: 500; }
.history-list li { display: flex; margin-bottom: 10px; font-size: 14px; }
.history-list .date { font-weight: 700; width: 80px; color: #333; flex-shrink: 0; }
.history-list .event { color: #555; }

/* =========================================
   5. Product Section
   ========================================= */
.product { background-color: #2a2a2a; padding: 80px 0; color: #fff; text-align: center; }
.section-header { margin-bottom: 50px; }
.section-header h2 { font-size: 32px; margin-bottom: 10px; font-weight: 500; }
.section-header p { color: #aaa; font-size: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.prod-item { background: #fff; overflow: hidden; cursor: pointer; }
.hidden-data { display: none; }
.prod-item img { width: 100%; height: auto; transition: transform 0.3s; }
.prod-item:hover img { transform: scale(1.05); }
.pagination { margin-top: 30px; }
.page-num { display: inline-block; width: 30px; height: 30px; line-height: 30px; background-color: #333; color: #fff; font-size: 14px; }
.page-num.active { background-color: var(--primary-color); }

/* =========================================
   6. Certification Section
   ========================================= */
.certification { padding: 80px 0; text-align: center; background-color: #fff; }
.cert-grid { display: flex; justify-content: center; gap: 30px; margin-top: 40px; }
.cert-item { width: 300px; cursor: pointer; }
.cert-item img { border: 1px solid #ddd; box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-bottom: 15px; transition: transform 0.3s; }
.cert-item img:hover { transform: scale(1.03); }

/* =========================================
   7. Contact Section
   ========================================= */
.contact { display: flex; }
.contact-info { flex: 1; background-color: var(--contact-bg); color: #fff; padding: 60px; display: flex; justify-content: center; flex-direction: column; }
.contact-wrap { max-width: 500px; margin: 0 auto; }
.contact h2 { font-size: 32px; margin-bottom: 40px; font-weight: 500; }
.info-group { margin-bottom: 30px; }
.icon-text strong { display: block; font-size: 18px; margin-bottom: 15px; }
.detail-block { margin-bottom: 15px; display: flex; }
.detail-block .label { font-weight: 700; width: 40px; flex-shrink: 0; }
.detail-block .text { font-size: 14px; line-height: 1.5; opacity: 0.9; }
.contact-map { flex: 1; min-height: 400px; background-color: #eee; }
.contact-map iframe { width: 100%; height: 100%; min-height: 400px; display: block; }

/* =========================================
   8. Footer
   ========================================= */
.footer { padding: 50px 0; background-color: #fff; border-top: 1px solid #eee; position: relative; font-size: 13px; color: #666; }
.footer-container { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-logo { margin-bottom: 20px; }
.footer-logo img { height: 30px; opacity: 0.7; }
.footer-links { margin-bottom: 15px; }
.footer-links a { margin: 0 10px; color: #666; cursor: pointer; }
.footer-links .highlight { color: var(--primary-color); font-weight: 700; }
address { font-style: normal; line-height: 1.6; margin-bottom: 10px; }
.scroll-top { position: absolute; bottom: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background-color: #ccc; color: #fff; border: none; cursor: pointer; }

/* =========================================
   [팝업 1] 제품 상세 모달
   ========================================= */
.popup-modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); justify-content: center; align-items: center; padding: 20px;
}
.popup-content {
    background-color: #fff; width: 100%; max-width: 500px; border-radius: 8px; overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); position: relative; animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.popup-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.popup-header h3 { font-size: 18px; font-weight: 700; color: #333; }
.close-popup { font-size: 24px; color: #aaa; cursor: pointer; line-height: 1; }
.close-popup:hover { color: #000; }
.popup-body { padding: 20px; max-height: 80vh; overflow-y: auto; }
.popup-img-wrap { text-align: center; margin-bottom: 20px; }
.popup-img-wrap img { max-width: 100%; max-height: 300px; display: inline-block; border-radius: 4px; }
.popup-desc-list ul { list-style: none; padding: 0; }
.popup-desc-list li { font-size: 16px; color: #333; margin-bottom: 12px; line-height: 1.5; padding-left: 15px; position: relative; }
.popup-desc-list li::before { content: '■'; position: absolute; left: 0; top: 2px; font-size: 10px; color: #333; }

/* =========================================
   [팝업 2, 3] 이용약관 / 개인정보 / 이메일거부
   ========================================= */
.policy-modal {
    display: none; position: fixed; z-index: 2500; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); justify-content: center; align-items: center; padding: 20px;
}
.policy-content {
    background-color: #fff; width: 100%; background: #fff; border-radius: 5px; overflow: hidden;
    position: relative; display: flex; flex-direction: column; animation: slideUp 0.3s ease-out;
}
.large-box { max-width: 800px; height: 80vh; } /* 약관용 큰 박스 */
.small-box { max-width: 500px; height: auto; } /* 이메일거부용 작은 박스 */

.policy-header {
    padding: 15px 20px; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center;
}
.policy-header h3 { font-size: 18px; font-weight: 700; color: #333; }
.close-policy { font-size: 28px; cursor: pointer; color: #999; }
.close-policy:hover { color: #333; }

.policy-body { padding: 20px; overflow-y: auto; font-size: 14px; line-height: 1.6; color: #444; }
.policy-body h4 { font-size: 16px; color: var(--primary-color); margin-top: 20px; margin-bottom: 10px; }
.policy-body strong { color: #222; }
.policy-body p { margin-bottom: 10px; }

/* 이메일 무단수집 거부 스타일 */
.email-alert-text { font-size: 14px; line-height: 1.6; color: #444; margin-bottom: 20px; }
.email-alert-text strong { color: #e60012; }
.email-date { text-align: right; color: #888; margin-top: 20px; font-size: 13px; }

/* =========================================
   9. 반응형 미디어 쿼리
   ========================================= */
@media (max-width: 768px) {
    .header { background: rgba(0,0,0,0.5); }
    .nav-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: #333; padding: 20px 0; }
    .nav-menu.active { display: block; }
    .nav-menu ul { flex-direction: column; align-items: center; gap: 20px; }
    .mobile-menu-btn { display: block; }

    .hero { height: auto; min-height: 500px; }
    .hero-frame { padding: 30px 20px; border-width: 1px; width: 90%; margin-top: 0; }
    .hero-frame h2 { font-size: 32px; line-height: 1.3; }
    .hero-frame::before { top: -14px; left: -6px; }
    .hero-frame::after { bottom: -14px; right: -6px; }

    .about { flex-direction: column; height: auto; }
    .about-image { height: 300px; }
    .about-text { padding: 60px 20px; }

    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .cert-grid { flex-direction: column; align-items: center; }
    .contact { flex-direction: column; }
    .contact-map { min-height: 300px; }
}