/**
 * Mublo Front High-end Skin - CSS
 * 기존 레이아웃 시스템 스타일 통합 버전
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    color-scheme: light;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-secondary: #64748b;
    --color-text: #000000; /* 하이엔드 감성을 위한 Pure Black */
    --color-text-muted: #64748b;
    --color-bg: #ffffff;
    --color-bg-secondary: #f8fafc;
    --color-border: #f0f0f0; /* 더 연하고 세련된 보더 */
    --site-max-width: none;
    --content-max-width: var(--site-max-width);
    --header-height: 80px;
    --sidebar-left-width: 250px;
    --sidebar-right-width: 250px;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* ========================================
   Layout
   ======================================== */
.mublo-container {
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.mublo-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.mublo-content--wide {
    max-width: none;
    padding: 0;
}

.mublo-main {
    flex: 1;
    position: relative;
}

.mublo-layout {
    display: flex;
    gap: 2rem;
}

.mublo-layout__content {
    flex: 1;
    min-width: 0;
}

.mublo-layout__sidebar--left {
    width: var(--sidebar-left-width);
    flex-shrink: 0;
}

.mublo-layout__sidebar--right {
    width: var(--sidebar-right-width);
    flex-shrink: 0;
}

/* ========================================
   Header
   ======================================== */
.mublo-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
}

.mublo-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

/* 로고 */
.mublo-header__logo {
    flex-shrink: 0;
}
.mublo-header__logo .logo-link {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}
.mublo-header__logo .logo-img {
    max-height: 40px;
    width: auto;
    display: block;
}
.mublo-header__logo .logo-pc { display: block; }
.mublo-header__logo .logo-mobile { display: none; }

.logo-text--dot {
    color: var(--color-primary);
    margin-left: 2px;
}

/* GNB */
.mublo-header__nav {
    flex: 1;
    min-width: 0;
}
.mublo-header__nav .mublo-menu__list--depth-1 {
    display: flex;
    list-style: none;
    gap: 1rem;
}

/* 검색 */
.mublo-header__search {
    flex-shrink: 0;
}
.header-search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--color-bg-secondary);
    transition: border-color 0.2s;
}
.header-search-form:focus-within {
    border-color: var(--color-primary);
}
.header-search-input {
    border: none;
    background: transparent;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    width: 160px;
    outline: none;
    color: var(--color-text);
}
.header-search-btn {
    border: none;
    background: transparent;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}
.header-search-btn:hover {
    color: var(--color-primary);
}

/* 유틸리티 메뉴 (PC) */
.mublo-header__utility {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}
.mublo-header__utility li a {
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    color: var(--color-text);
    transition: color 0.15s;
}
.mublo-header__utility li a:hover {
    color: var(--color-primary);
}
.mublo-header__utility li a i {
    font-size: 1rem;
}

/* 모바일 토글 */
.mublo-header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}
.mublo-header__toggle .line {
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
}

/* ========================================
   모바일 패널 (Offcanvas)
   ======================================== */
.mublo-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--color-bg, #fff);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mublo-panel.is-open {
    transform: translateX(0);
}
.mublo-panel__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
}
.mublo-panel__backdrop.is-open {
    display: block;
}
.mublo-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.mublo-panel__title {
    font-size: 1.1rem;
    font-weight: 700;
}
.mublo-panel__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
    padding: 0;
}
.mublo-panel__body {
    padding: 1rem 1.25rem;
}

/* 패널 검색 */
.mublo-panel__search {
    margin-bottom: 1.25rem;
}
.panel-search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-secondary, #f5f5f5);
}
.panel-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    outline: none;
    color: var(--color-text);
}
.panel-search-btn {
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

/* 패널 GNB (세로) */
.mublo-panel__nav {
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}
.mublo-panel__nav .mublo-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mublo-panel__nav .mublo-menu__list--depth-1 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}
.mublo-panel__nav .mublo-menu__link {
    display: block;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}
.mublo-panel__nav .mublo-menu__link--depth-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    border-radius: 0.375rem;
}
.mublo-panel__nav .mublo-menu__link--depth-1:hover {
    background: var(--color-bg-secondary, #f5f5f5);
    color: var(--color-primary);
}
.mublo-panel__nav .mublo-menu__item--active > .mublo-menu__link--depth-1 {
    color: var(--color-primary);
    background: var(--color-bg-secondary, #f5f5f5);
}
/* 패널: 하위메뉴 화살표 → 아래 방향, 우측 중앙 */
.mublo-panel__nav .mublo-menu__item--has-children > .mublo-menu__link--depth-1::after {
    content: '';
    display: inline-block;
    width: 0.375rem;
    height: 0.375rem;
    border-right: 1.5px solid var(--color-text-muted);
    border-bottom: 1.5px solid var(--color-text-muted);
    transform: rotate(45deg);
    margin-top: -0.125rem;
    flex-shrink: 0;
}
.mublo-panel__nav .mublo-menu__list--depth-2 {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: none;
    padding: 0 0 0.25rem 1rem;
    min-width: auto;
}
.mublo-panel__nav .mublo-menu__link--depth-2 {
    font-size: 0.875rem;
    font-weight: 400;
    padding: 0.4rem 0.75rem;
    color: var(--color-text-muted);
    border-radius: 0.25rem;
}
.mublo-panel__nav .mublo-menu__link--depth-2:hover {
    color: var(--color-primary);
    background: var(--color-bg-secondary, #f5f5f5);
}
.mublo-panel__nav .mublo-menu__item--active > .mublo-menu__link--depth-2 {
    color: var(--color-primary);
}
.mublo-panel__nav .mublo-menu__list--depth-3 {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: none;
    padding: 0 0 0 1.5rem;
    min-width: auto;
}
.mublo-panel__nav .mublo-menu__link--depth-3 {
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
    color: var(--color-text-muted);
}
.mublo-panel__nav .mublo-menu__link--depth-3:hover {
    color: var(--color-primary);
}

/* 패널 유틸리티 */
.mublo-panel__utility {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.mublo-panel__utility-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    border-radius: 0.375rem;
    transition: color 0.15s, background-color 0.15s;
}
.mublo-panel__utility-link:hover {
    color: var(--color-primary);
    background: var(--color-bg-secondary, #f5f5f5);
}
.mublo-panel__utility-link i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}



/* ========================================
   Mublo Menu (Header Nav)
   ======================================== */
.mublo-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Depth 1: 가로 배열 */
.mublo-menu__list--depth-1 {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.mublo-menu__link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s, background-color 0.15s;
}

.mublo-menu__link:hover {
    text-decoration: none;
}

/* Depth 1 링크 */
.mublo-menu__link--depth-1 {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

.mublo-menu__link--depth-1:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-primary);
}

.mublo-menu__item--active > .mublo-menu__link--depth-1,
.mublo-menu__item--ancestor > .mublo-menu__link--depth-1 {
    color: var(--color-primary);
    background-color: var(--color-bg-secondary);
}

/* 하위 메뉴 화살표 (depth 1) */
.mublo-menu__item--has-children > .mublo-menu__link--depth-1::after {
    content: '';
    display: inline-block;
    width: 0.375rem;
    height: 0.375rem;
    border-right: 1.5px solid var(--color-text-muted);
    border-bottom: 1.5px solid var(--color-text-muted);
    transform: rotate(45deg);
    margin-top: -0.125rem;
    margin-left: 0.125rem;
}

/* Depth 2: 드롭다운 */
.mublo-menu__item--depth-1 {
    position: relative;
}

.mublo-menu__list--depth-2 {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.375rem 0;
    z-index: 110;
}

.mublo-menu__item--depth-1:hover > .mublo-menu__list--depth-2 {
    display: block;
}

.mublo-menu__link--depth-2 {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
}

.mublo-menu__link--depth-2:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-primary);
}

.mublo-menu__item--active > .mublo-menu__link--depth-2,
.mublo-menu__item--ancestor > .mublo-menu__link--depth-2 {
    color: var(--color-primary);
    background-color: var(--color-bg-secondary);
}

/* 하위 메뉴 화살표 (depth 2) */
.mublo-menu__item--has-children > .mublo-menu__link--depth-2::after {
    content: '';
    display: inline-block;
    width: 0.3125rem;
    height: 0.3125rem;
    border-right: 1.5px solid var(--color-text-muted);
    border-bottom: 1.5px solid var(--color-text-muted);
    transform: rotate(-45deg);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Depth 3: 플라이아웃 (오른쪽) */
.mublo-menu__item--depth-2 {
    position: relative;
}

.mublo-menu__list--depth-3 {
    display: none;
    position: absolute;
    top: -0.375rem;
    left: 100%;
    min-width: 160px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.375rem 0;
    z-index: 120;
}

.mublo-menu__item--depth-2:hover > .mublo-menu__list--depth-3 {
    display: block;
}

.mublo-menu__link--depth-3 {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.mublo-menu__link--depth-3:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-primary);
}

.mublo-menu__item--active > .mublo-menu__link--depth-3,
.mublo-menu__item--ancestor > .mublo-menu__link--depth-3 {
    color: var(--color-primary);
    background-color: var(--color-bg-secondary);
}

/* ========================================
   Footer
   ======================================== */
.mublo-footer {
    position: relative;
    z-index: 1;
    background: #111827;
    color: #9ca3af;
    padding: 25px 0 15px;
    margin-top: auto;
}

/* 푸터 메뉴 */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 20px 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 28px;
}
.footer-nav a {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: none;
    padding: 2px 24px 2px 0;
    white-space: nowrap;
    transition: color 0.15s;
}
.footer-nav a:last-child { padding-right: 0; }
.footer-nav a:hover { color: #f1f5f9; }

/* 본문: 왼쪽(로고+회사정보) / 오른쪽(SNS+고객센터) */
.footer-body {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 24px;
}
.footer-left { flex: 1; min-width: 0; }
.footer-right {
    flex-shrink: 0;
    text-align: right;
}

/* 로고/브랜드 */
.footer-brand { margin-bottom: 16px; }
.footer-logo { display: inline-block; }
.footer-logo img { max-height: 36px; max-width: 160px; }
.footer-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    text-decoration: none;
}

/* 회사 정보 (왼쪽) */
.footer-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 20px;
    font-size: 0.8rem;
    color: #6b7280;
}
.footer-info-company {
    width: 100%;
    font-size: 0.875rem;
    color: #d1d5db;
    font-weight: 500;
    margin-bottom: 6px;
}
.footer-info-line {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}
.footer-info em {
    font-style: normal;
    color: #4b5563;
    margin-right: 2px;
}
.footer-info span { white-space: nowrap; }
.footer-info a {
    color: #9ca3af;
    text-decoration: none;
}
.footer-info a:hover { color: #e5e7eb; }

/* SNS 아이콘 (오른쪽) */
.footer-sns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.footer-sns-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #6b7280;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.footer-sns-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.footer-sns-btn:hover {
    background: var(--sns-color, var(--color-primary));
    color: #fff;
}

/* 고객센터 (오른쪽, SNS 아래) */
.footer-cs-tel {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    text-decoration: none;
    text-align: right;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.footer-cs-tel:hover { color: #fff; }
.footer-cs-time {
    font-size: 0.813rem;
    color: #6b7280;
    line-height: 1.6;
    text-align: right;
}

/* 하단 바 */
.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-copy {
    font-size: 0.8rem;
    color: #374151;
    margin: 0;
}

/* 반응형 */
@media (max-width: 767.98px) {
    .mublo-footer { padding-top: 40px; }
    .footer-body {
        flex-direction: column;
        gap: 24px;
    }
    .footer-right { text-align: left; }
    .footer-sns { justify-content: flex-start; }
    .footer-cs-tel,
    .footer-cs-time { text-align: left; }
    .footer-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ========================================
   Page
   ======================================== */
.page-index__empty,
.page-view__empty {
    padding: 3rem 0;
    text-align: center;
    color: var(--color-text-muted);
}

/* ========================================
   Block Section
   ======================================== */
.block-section {
    padding: 0;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.5;
}

.btn--primary {
    background: var(--color-primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
    text-decoration: none;
}

.btn--outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}

.btn--outline:hover {
    background: var(--color-bg-secondary);
    text-decoration: none;
}

.btn--sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .mublo-header__nav,
    .mublo-header__search,
    .mublo-header__utility {
        display: none;
    }

    .mublo-header__toggle {
        display: flex;
    }

    .mublo-header__inner {
        justify-content: space-between;
    }

    .mublo-header__logo .logo-pc { display: none; }
    .mublo-header__logo .logo-mobile { display: block; }

    .mublo-layout {
        flex-direction: column;
    }

    .mublo-layout__sidebar--left,
    .mublo-layout__sidebar--right {
        width: 100%;
    }

    .mublo-layout__sidebar--mobile-hidden {
        display: none;
    }

    .mublo-container,
    .mublo-content {
        padding: 0 10px;
    }
}

/* ========================================
   MubloItemLayout — 공용 아이템 레이아웃
   ======================================== */
.mublo-item-layout > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* List 모드: CSS Grid */
.mublo-item-layout.is-list > ul {
    display: grid;
    gap: 1rem;
}

/* PC 열 수 */
.mublo-item-layout.is-list[data-pc-cols="1"] > ul { grid-template-columns: 1fr; }
.mublo-item-layout.is-list[data-pc-cols="2"] > ul { grid-template-columns: repeat(2, 1fr); }
.mublo-item-layout.is-list[data-pc-cols="3"] > ul { grid-template-columns: repeat(3, 1fr); }
.mublo-item-layout.is-list[data-pc-cols="4"] > ul { grid-template-columns: repeat(4, 1fr); }
.mublo-item-layout.is-list[data-pc-cols="5"] > ul { grid-template-columns: repeat(5, 1fr); }

/* Mobile 열 수 */
@media (max-width: 768px) {
    .mublo-item-layout.is-list[data-mo-cols="1"] > ul { grid-template-columns: 1fr; }
    .mublo-item-layout.is-list[data-mo-cols="2"] > ul { grid-template-columns: repeat(2, 1fr); }
    .mublo-item-layout.is-list[data-mo-cols="3"] > ul { grid-template-columns: repeat(3, 1fr); }
}

/* Slide 모드: 컨테이너에 overflow 제어 (Swiper CDN CSS 로드 전 보호) */
.mublo-item-layout.is-slide {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* ========================================
   SNS 로그인 버튼 (SnsLogin 플러그인)
   ======================================== */
.sns-login-section { margin-top: 20px; }
.sns-login-divider {
    position: relative; text-align: center;
    margin: 16px 0; color: #aaa; font-size: 0.8rem;
}
.sns-login-divider::before, .sns-login-divider::after {
    content: ''; position: absolute; top: 50%;
    width: calc(50% - 24px); height: 1px; background: #e5e7eb;
}
.sns-login-divider::before { left: 0; }
.sns-login-divider::after  { right: 0; }
.sns-login-buttons { display: flex; flex-direction: column; gap: 10px; }
.btn-sns {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 10px 16px; border-radius: 6px;
    font-size: 0.9rem; font-weight: 500; text-decoration: none;
    border: 1px solid transparent; cursor: pointer; transition: opacity 0.15s;
}
.btn-sns:hover { opacity: 0.88; text-decoration: none; }
.btn-sns--naver  { background: #03C75A; color: #fff; border-color: #03C75A; }
.btn-sns--kakao  { background: #FEE500; color: #191919; border-color: #FEE500; }
.btn-sns--google { background: #fff; color: #3c4043; border-color: #dadce0; }
