/* ─────────────────────────────────────────────
   header.css — Header, GNB, Mega Menu, Breadcrumb
   ───────────────────────────────────────────── */

/* Transparent Header with Fixed Black Text */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s, box-shadow 0.4s, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
header.header-hidden {
    transform: translateY(-100%);
}
header.active { background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
header.active .gnb-wrap { color: #111; }
header.active .util-menu { color: #333; }
header.active .search-btn, header.active .all-menu, header.active .hamburger { color: var(--main-brand); }

.nav-container {
    width: 100%; max-width: clamp(1800px, calc(400px + 72.917vw), 3200px); margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 65px;
    padding: 0 50px;
}

/* Original Logo */
.logo-img { height: 50px; }

.gnb-wrap {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: flex; align-items: center; gap: 60px; height: 100%;
    color: #111;
}

.gnb { display: flex; gap: 65px; height: 100%; align-items: center; }
.gnb > li { height: 100%; display: flex; align-items: center; position: relative; }
.gnb > li > a {
    font-size: 1.3rem; font-weight: 700; color: inherit;
    position: relative;
}
.gnb > li > a::after {
    content: ''; position: absolute; bottom: -8px; left: 0; width: 0; height: 3px; background: var(--main-brand); transition: 0.3s;
}
.gnb > li:hover > a::after { width: 100%; }
header.active .gnb > li > a:hover { color: var(--main-brand); }

.header-right {
    height: 100%; display: flex; align-items: center; gap: 35px; margin-left: 20px;
    color: #111;
}
.util-menu { display: flex; gap: 20px; font-size: 0.9rem; font-weight: 600; align-items: center; color: #333; }
.util-menu a:hover { opacity: 0.7; color: var(--main-brand); }
.header-right .search-btn, .header-right .all-menu, .hamburger {
    font-size: 1.6rem; cursor: pointer; transition: 0.3s;
    color: var(--main-brand);
}
.hamburger { display: none; }

/* Mega Menu Panel */
.mega-menu-panel {
    position: absolute; top: 65px; left: 0; width: 100%;
    background: #fff; border-top: 1px solid #eee;
    overflow: hidden; max-height: 0; opacity: 0; visibility: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* Global Header Background Utility */
header.bg-white {
    background-color: #ffffff !important;
    opacity: 1 !important;
}
header.bg-white.shadow-active {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
header.bg-white .gnb-wrap { color: #111; }
header.bg-white .util-menu { color: #333; }
header.bg-white .header-right .search-btn,
header.bg-white .header-right .all-menu,
header.bg-white .hamburger { color: var(--main-brand); }

header.active .mega-menu-panel { max-height: 1400px; padding-bottom: 30px; opacity: 1; visibility: visible; }

.mega-container {
    max-width: clamp(1800px, calc(400px + 72.917vw), 3200px); margin: 0 auto; height: 100%;
    display: flex; padding: 40px; gap: 40px;
}

/* Left Aside: Certification */
.mega-aside-left {
    flex: 1.1; border-right: 1px solid #f0f0f0; padding-right: 40px;
    display: flex; flex-direction: column; justify-content: center;
}
.mega-cert-header { text-align: center; padding-bottom: 25px; border-bottom: 1px solid #eee; margin-bottom: 25px; }
.cert-img { width: 90px; margin-bottom: 15px; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.05)); }
.mega-cert-header h5 { font-size: 1.1rem; font-weight: 700; color: #111; line-height: 1.5; letter-spacing: -0.3px; }
.mega-cert-header h5 .cert-small { font-size: 0.78rem; color: #aaa; font-weight: 400; display: block; margin-top: 5px; }

.mega-cert-footer { text-align: center; }
.mega-cert-footer p.phone-label { font-size: 0.85rem; color: #888; font-weight: 500; margin-bottom: 5px; text-align: center; }
.mega-cert-footer p.phone-num { font-size: 1.3rem; color: var(--main-brand); font-weight: 800; font-family: 'GmarketSansBold'; text-align: center; justify-content: center; }

/* Center Content: Sub Menus */
.mega-content { flex: 3; position: relative; }
.mega-content-block {
    display: none;
    gap: 40px;
    width: 100%; height: 100%; animation: fadeIn 0.3s forwards;
}
.mega-content-block.active {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.mega-sub-col {
    flex: 0 1 260px;
    min-width: 0;
    margin-bottom: 40px;
    padding-right: 40px;
    border-right: 1px solid #f0f0f0;
}
.mega-sub-col:last-child {
    padding-right: 0;
    border-right: none;
}
.mega-sub-section {
    margin-bottom: 32px;
}
.mega-sub-section:last-child {
    margin-bottom: 0;
}
.mega-sub-title {
    font-size: 1.15rem; font-weight: 800; color: #111; margin-bottom: 25px;
    position: relative; display: block;
}
.mega-sub-title::after {
    content: ''; position: absolute; bottom: -8px; left: 0; width: 20px; height: 2px; background: var(--main-brand);
}
.mega-sub-list li { margin-bottom: 15px; }
.mega-sub-list a { font-size: 1rem; color: #666; font-weight: 500; transition: 0.3s; display: block; }
.mega-sub-list a:hover { color: var(--main-brand); padding-left: 5px; }

/* Right Aside: Banner */
.mega-aside-right {
    flex: 1; border-left: 1px solid #f0f0f0; padding-left: 40px;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; min-width: 260px; max-width: 340px;
}
.mega-banner-item {
    display: none !important;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(8px);
}
.mega-banner-item.active {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    opacity: 1;
    transform: translateX(0);
}
.mega-banner {
    width: 100%;
    position: relative;
    overflow: hidden;
}
/* 1. 텍스트 배너 */
.mega-banner--text {
    background: linear-gradient(135deg, #fef4ec 0%, #ffffff 100%);
    border: 1px solid #fce6d2;
    border-radius: 18px; padding: 32px 28px; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: 0 4px 20px rgba(234, 84, 0, 0.05);
    transition: all 0.3s ease;
}
.mega-banner--text:hover {
    border-color: var(--main-brand);
    box-shadow: 0 8px 25px rgba(234, 84, 0, 0.12);
    transform: translateY(-2px);
}
.mega-banner-text h6 {
    font-size: 0.88rem;
    color: var(--main-brand);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-family: 'GmarketSansBold', sans-serif;
}
.mega-banner-text p {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111;
    line-height: 1.45;
    word-break: keep-all;
    font-family: 'GmarketSansBold', 'Pretendard', sans-serif;
}
.mega-banner-link {
    position: relative; z-index: 1; font-size: 0.92rem; font-weight: 700; color: #444;
    display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
    transition: color 0.2s, gap 0.2s;
}
.mega-banner--text:hover .mega-banner-link { color: var(--main-brand); gap: 12px; }

/* 2. 이미지 배너 — 정방형 1:1, 브랜드 오렌지 테두리, 앰비언트 섀도우 & 액션 큐 */
.mega-banner--image {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}
.mega-banner--image a {
    display: block;
    width: 250px;
    height: 250px;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    border: 1.5px solid rgba(234, 84, 0, 0.22);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(234, 84, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    background: #fdfaf8;
}
.mega-banner--image a:hover {
    transform: translateY(-5px);
    border-color: var(--main-brand);
    box-shadow: 0 16px 36px rgba(234, 84, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
}
.mega-banner--image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.mega-banner--image a:hover img {
    transform: scale(1.05);
}

/* 우측 하단 플로팅 바로가기 미니 뱃지 */
.mega-banner-cue {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--main-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}
.mega-banner--image a:hover .mega-banner-cue {
    background: var(--main-brand);
    color: #ffffff;
    transform: scale(1.1) rotate(-45deg);
    box-shadow: 0 6px 16px rgba(234, 84, 0, 0.4);
}

/* Breadcrumb Navigation - Minimal Inline Architecture */
.breadcrumb-nav {
    display: none;
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    text-align: center;
}
.breadcrumb-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.86rem;
    color: #555;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    white-space: nowrap;
    max-width: 100%;
}
.breadcrumb-inner a.bc-home {
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    padding: 1px 2px;
    background: transparent;
    border-radius: 0;
    transition: color 0.2s ease;
}
.breadcrumb-inner a.bc-home:hover {
    color: var(--main-brand);
    background: transparent;
    transform: none;
}
.breadcrumb-inner .bc-sep {
    color: #bbb;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    margin: 0 1px;
}
.breadcrumb-inner .bc-current {
    color: #555;
    font-weight: 500;
    font-size: 0.86rem;
    line-height: 1.4;
}
.breadcrumb-inner .bc-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    font-size: 0.86rem;
    font-family: inherit;
    color: #222;
    font-weight: 600;
    line-height: 1.4;
    padding: 1px 14px 1px 2px;
    cursor: pointer;
    box-sizing: border-box;
    transition: color 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23ea5400'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
}
.breadcrumb-inner .bc-select:hover {
    color: var(--main-brand);
}
.breadcrumb-inner .bc-select:focus {
    outline: none;
    color: var(--main-brand);
}

/* Mobile Optimization */
@media (max-width: 1024px) {
    .gnb-wrap > .gnb, .header-right .search-btn, .header-right .all-menu { display: none; }
    .util-menu { display: none; }
    .gnb-wrap { position: static; transform: none; }
    .hamburger { display: block; }
    .nav-container { padding: 0 20px; height: 54px; }
    .logo-img { height: 28px; }
}

@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0 8px;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        text-align: center;
    }
    .breadcrumb-nav::-webkit-scrollbar {
        display: none;
    }
    .breadcrumb-inner {
        display: inline-flex;
        justify-content: center;
        width: auto;
        max-width: 100%;
        gap: 3px;
        white-space: nowrap;
    }
    .breadcrumb-inner,
    .breadcrumb-inner a,
    .breadcrumb-inner span,
    .breadcrumb-inner .bc-current,
    .breadcrumb-inner .bc-select {
        font-size: 0.78rem !important;
        line-height: 1.4 !important;
        font-family: inherit !important;
    }
    .breadcrumb-inner .bc-current {
        font-weight: 500 !important;
        color: #555;
    }
    .breadcrumb-inner a.bc-home {
        font-size: 0.78rem !important;
        padding: 1px 2px;
    }
    .breadcrumb-inner .bc-sep {
        font-size: 0.6rem !important;
        margin: 0 1px;
    }
    .breadcrumb-inner .bc-select {
        font-weight: 600 !important;
        color: #222;
        padding: 1px 12px 1px 2px;
    }
}
