/* ============================================
   WooriMiracle B2B Store — Light Theme CSS
   밝은 쇼핑몰 디자인 시스템
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Colors */
    --bg-body: #ffffff;
    --bg-white: #ffffff;
    --bg-light: #f8f9fb;
    --bg-hover: #e8ebf2;
    --text-dark: #1a1d2e;
    --text-body: #3a3f56;
    --text-muted: #8890a7;
    --text-light: #adb5c7;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: rgba(37,99,235,.08);
    --primary-bg: rgba(37,99,235,.05);
    --success: #10b981;
    --success-light: rgba(16,185,129,.08);
    --warning: #f59e0b;
    --warning-light: rgba(245,158,11,.08);
    --danger: #ef4444;
    --danger-light: rgba(239,68,68,.08);
    --info: #6366f1;
    --border: #e2e5ee;
    --border-light: #edf0f7;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 36px rgba(0,0,0,.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --navy: #0f172a;
    --navy-light: #1e293b;
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Pretendard', -apple-system, system-ui, sans-serif;
    background: var(--bg-body);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
    0% { background-color: var(--border-light); }
    50% { background-color: var(--border); }
    100% { background-color: var(--border-light); }
}
.skeleton-box {
    animation: skeleton-pulse 1.5s infinite ease-in-out;
    border-radius: var(--radius-sm);
}


/* ==================== HEADER — 3단 레이아웃 (폰옥션 스타일) ==================== */
.store-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}
.store-header.header-hidden {
    transform: translateY(-100%);
}

/* 헤더 숨김 시 하위 sticky 요소들 top 값 보정 (0.3s 동기화) */
#breadcrumb-bar,
.sidebar-cart-wrapper,
#leftSidebarWrapper > div {
    transition: top 0.3s ease;
}
body.header-is-hidden #breadcrumb-bar {
    top: 10px !important;
}
body.header-is-hidden .sidebar-cart-wrapper {
    top: 10px !important;
    max-height: calc(100vh - 30px) !important;
}
body.header-is-hidden #leftSidebarWrapper > div:first-child {
    top: 10px !important;
}
body.header-is-hidden #leftSidebarWrapper > div:nth-child(2) {
    top: 190px !important;
}

/* --- 1단: 유틸리티 바 (인기검색어 + 로그인/회원가입) --- */
.header-utility-bar {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
}
.header-utility-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 6px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.utility-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.utility-label {
    font-weight: 700;
    color: var(--primary);
    font-size: 11px;
    white-space: nowrap;
}
.popular-keywords {
    display: flex;
    align-items: center;
    gap: 6px;
}
.popular-keyword {
    color: var(--text-body);
    font-size: 12px;
    transition: color .2s;
    white-space: nowrap;
}
.popular-keyword:hover {
    color: var(--primary);
}
.keyword-sep {
    color: var(--border);
    font-size: 10px;
}
.utility-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.top-link {
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 8px;
    transition: color .2s;
    white-space: nowrap;
    position: relative;
}
.top-link:hover {
    color: var(--text-dark);
}
.top-link + .top-link::before {
    content: '|';
    position: absolute;
    left: -2px;
    color: var(--border);
    font-size: 10px;
}
.top-user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-right: 4px;
}
.top-link-cart {
    position: relative;
}
.cart-badge-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-left: 2px;
    vertical-align: middle;
}
.top-points {
    font-size: 12px;
    color: var(--text-body);
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}
.top-points strong {
    color: var(--primary);
    font-weight: 700;
}

/* --- 2단: 메인 행 (로고 / 검색 / 아이콘) --- */
.header-main {
    background: var(--bg-white);
}
.header-main-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.header-logo img {
    height: 40px;
}
.header-logo .logo-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -.5px;
}
.header-search {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
}
.header-search input {
    width: 100%;
    padding: 12px 52px 12px 20px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: all .2s;
}
.header-search input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}
.header-search input::placeholder {
    color: var(--text-light);
}
.search-submit {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: var(--primary);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.search-submit:hover {
    background: var(--primary-dark);
}
.search-submit .material-symbols-outlined {
    color: #fff;
    font-size: 22px;
}
.search-submit svg { width: 22px; height: 22px; color: #fff; }
/* 아이콘 액션 버튼 */
.header-icon-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.header-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: color .2s;
    color: var(--text-body);
    position: relative;
    padding: 4px;
}
.header-icon-btn:hover {
    color: var(--primary);
}
.header-icon-btn .material-symbols-outlined {
    font-size: 26px;
}
.header-icon-btn .icon-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.cart-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 스마트발주 액션 버튼 */
.header-action-btn.smart-order {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: #fff;
    padding: 0 32px;
    height: 64px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 900;
    white-space: nowrap;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    letter-spacing: -0.5px;
}
.header-action-btn.smart-order:hover {
    background: var(--primary-dark);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}
.header-action-btn.smart-order .material-symbols-outlined {
    font-size: 30px;
}

/* ===== 3-1단: 서브 네비 (드롭다운 필터 + 퀵 링크) ===== */
.header-subnav {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
}
.subnav-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
}
.subnav-filters {
    display: flex;
    align-items: center;
    gap: 4px;
}
.subnav-dropdown {
    position: relative;
}
.subnav-filter-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.subnav-filter-btn:hover, .subnav-filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
}
/* 메가 드롭다운 패널 */
.mega-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 280px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    border: 1px solid var(--border-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
    z-index: 300;
    padding: 12px;
    display: none;
}
/* 기종별 상품 드롭다운이 화면 우측을 넘어가지 않도록 하는 클래스 (JS에서 제어) */
.mega-dropdown-panel.align-right {
    left: auto;
    right: 0;
    border-radius: var(--radius-sm) 0 var(--radius-sm) var(--radius-sm);
}

.mega-dropdown-panel.show {
    display: flex;
    gap: 0;
    animation: fadeIn 0.15s ease;
}
.mega-col {
    min-width: 120px;
    max-width: 220px;
    flex: 1 1 0;
    border-right: 1px solid var(--border-light);
    padding: 0 10px;
}
.mega-col:last-child { border-right: none; }
.mega-col-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    padding: 6px 0 8px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 6px;
    white-space: nowrap;
}
.mega-col-list {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.mega-col-list::-webkit-scrollbar { width: 4px; }
.mega-col-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.mega-col-list a {
    display: block;
    padding: 5px 4px;
    font-size: 12px;
    color: var(--text-body);
    font-weight: 500;
    transition: background .15s;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mega-col-list a:hover {
    background: var(--bg-light);
    color: var(--primary);
}
/* 퀵 링크 (우측) */
.subnav-links {
    display: flex;
    align-items: center;
    gap: 0;
}
.subnav-link {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    white-space: nowrap;
    transition: color .2s;
}
.subnav-link:hover {
    color: var(--primary);
}

/* ===== 3-2단: 카테고리 바 (녹색) ===== */
.header-catbar {
    background: var(--primary);
}
.catbar-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 0;
    overflow-x: auto;
}
.catbar-item {
    padding: 10px 20px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
    transition: all .2s;
    border-bottom: 2px solid transparent;
}
.catbar-item:hover, .catbar-item.active {
    color: #fff;
    background: rgba(255,255,255,.12);
    border-bottom-color: #fff;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== CONTAINER ==================== */
.store-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px;
}

/* ==================== HERO CAROUSEL (풀 블리드) ==================== */
.hero-carousel {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: none;
}
.hero-track {
    display: flex;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.hero-slide {
    min-width: 100%;
    position: relative;
    aspect-ratio: 2.4 / 1;
}
.hero-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hero-position, center center);
    display: block;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    color: #fff;
}
.hero-tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255,255,255,.15);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
    width: fit-content;
}
.hero-title {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 12px;
}
.hero-desc {
    font-size: 15px;
    opacity: .85;
    max-width: 480px;
    margin-bottom: 28px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 12px;
}
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all .2s;
}
.hero-btn.white {
    background: #fff;
    color: var(--navy);
}
.hero-btn.white:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
}
.hero-btn.outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.4);
}
.hero-btn.outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
}
/* 좌우 화살표 */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
    z-index: 5;
    opacity: 0;
}
.hero-carousel:hover .hero-nav { opacity: 1; }
.hero-nav:hover { background: rgba(255,255,255,.4); transform: translateY(-50%) scale(1.1); }
.hero-nav-prev { left: 16px; }
.hero-nav-next { right: 16px; }
/* 인디케이터 */
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    transition: all .3s;
}
.hero-dot.active {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255,255,255,.5);
}

/* ==================== SECTION ==================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
}
.section-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-more:hover {
    text-decoration: underline;
}

/* ==================== NEW ARRIVALS (신규입고) ==================== */
.new-arrivals-section {
    margin-bottom: 56px;
}
.new-arrivals-section .section-header {
    margin-bottom: 24px;
}
.new-arrivals-section .section-title {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.new-arrivals-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.new-arrival-card {
    background: var(--bg-white);
    border: none;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    flex-direction: column;
}
.new-arrival-card:hover {
    transform: translateY(-2px);
}
.new-arrival-card-img {
    aspect-ratio: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.new-arrival-card-img img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}
.new-arrival-card-body {
    padding: 12px 14px 14px;
}
.new-arrival-card-body .na-brand {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}
.new-arrival-card-body .na-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 2px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* for 1 line, or use multiple lines */
}
.new-arrival-card-body .na-model {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.new-arrival-card-body .na-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
}

/* ==================== BEST SELLER (베스트셀러) - 이노펀 스타일 ==================== */
.bestseller-section {
    margin-bottom: 56px;
}
.bestseller-section .section-title {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* 카테고리 탭과 그리드를 감싸는 래퍼 */
.bestseller-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bestseller-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}
.bestseller-tabs {
    display: flex;
    gap: 20px;
    align-items: center;
}
.bs-tab {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .2s;
    position: relative;
}
.bs-tab:hover {
    color: var(--text-dark);
}
.bs-tab.active {
    color: var(--primary);
}
/* 좌측 배너 + 우측 3단 그리드 */
.bestseller-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}
.bestseller-banner {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    aspect-ratio: 5 / 6;
}
.bestseller-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bestseller-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 16px;
}
/* PC(≥1025px): 좌측 배너 숨기고 그리드가 전체 폭 사용 — 모바일/태블릿은 기존 그대로 */
@media (min-width: 1025px) {
    .bestseller-layout {
        grid-template-columns: 1fr;
    }
    .bestseller-banner {
        display: none;
    }
}
.bestseller-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    flex-direction: column;
}
.bestseller-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.bestseller-card-img {
    aspect-ratio: 4/3;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.bestseller-card-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.bestseller-card-body {
    padding: 12px 14px 14px;
}
.bestseller-card-body .bs-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bestseller-card-body .bs-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bestseller-card-body .bs-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
}

/* ==================== MD PICK (MD추천) ==================== */
.mdpick-section {
    margin-bottom: 56px;
}
.mdpick-section .section-title {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mdpick-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
/* PC(≥1025px): 카테고리가 3개 미만이면 카테고리 카드를 풀폭으로 펴고
   내부 상품 리스트를 BEST SELLER 스타일(가로 3-카드 그리드)로 노출 */
@media (min-width: 1025px) {
    /* 1개 또는 2개 카테고리: 컨테이너 풀폭, 카테고리당 1행 차지 */
    .mdpick-columns:has(> .mdpick-col:only-child),
    .mdpick-columns:has(> .mdpick-col:nth-child(2):last-child) {
        grid-template-columns: 1fr;
    }
    /* 카테고리가 풀폭일 때만 내부 상품을 가로 그리드로 (BEST SELLER 스타일) */
    .mdpick-columns:has(> .mdpick-col:only-child) .mdpick-list,
    .mdpick-columns:has(> .mdpick-col:nth-child(2):last-child) .mdpick-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        padding: 20px 24px 24px;
    }
    .mdpick-columns:has(> .mdpick-col:only-child) .mdpick-list-item,
    .mdpick-columns:has(> .mdpick-col:nth-child(2):last-child) .mdpick-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        border-bottom: none;
        background: var(--bg-white);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        overflow: hidden;
        transition: all .2s;
    }
    .mdpick-columns:has(> .mdpick-col:only-child) .mdpick-list-item:hover,
    .mdpick-columns:has(> .mdpick-col:nth-child(2):last-child) .mdpick-list-item:hover {
        background: var(--bg-white);
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .mdpick-columns:has(> .mdpick-col:only-child) .mdpick-item-img,
    .mdpick-columns:has(> .mdpick-col:nth-child(2):last-child) .mdpick-item-img {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
        border: none;
        border-radius: 0;
        padding: 12px;
    }
    .mdpick-columns:has(> .mdpick-col:only-child) .mdpick-item-info,
    .mdpick-columns:has(> .mdpick-col:nth-child(2):last-child) .mdpick-item-info {
        padding: 0 14px 14px;
        gap: 4px;
    }
}
.mdpick-col {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.mdpick-col-header {
    background: var(--bg-light);
    padding: 20px 24px;
    border-bottom: 3px solid var(--border);
}
.mdpick-col-header .cat-num {
    font-size: 13px;
    color: var(--primary);
    font-weight: 800;
}
.mdpick-col-header .cat-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin-top: 2px;
}
.mdpick-col-header .cat-desc {
    font-size: 13px;
    color: var(--text-body);
    margin-top: 6px;
    line-height: 1.5;
}

/* Specific borders for aesthetic based on image */
.mdpick-col:nth-child(1) .mdpick-col-header { border-bottom-color: #5d3523; } /* 프리미엄 가죽 다이어리 */
.mdpick-col:nth-child(2) .mdpick-col-header { border-bottom-color: #0f172a; } /* Z-폴드 전용 케이스 */
.mdpick-col:nth-child(3) .mdpick-col-header { border-bottom-color: #728469; } /* 실용만점 지갑 다이어리 */

.mdpick-list {
    display: flex;
    flex-direction: column;
}
.mdpick-list-item {
    display: flex;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    gap: 20px;
    cursor: pointer;
    transition: all .2s;
    align-items: center;
}
.mdpick-list-item:last-child {
    border-bottom: none;
}
.mdpick-list-item:hover {
    background: var(--bg-light);
}
.mdpick-item-img {
    width: 100px;
    height: 120px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px;
}
.mdpick-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.mdpick-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.mdpick-item-info .item-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.mdpick-item-info .item-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
}
.mdpick-item-info .item-desc {
    font-size: 12px;
    color: var(--text-body);
    line-height: 1.4;
    word-break: keep-all;
}
.mdpick-item-info .item-comment {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
}

/* ==================== PRODUCT CARD ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .25s;
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.product-card-img {
    aspect-ratio: 1;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}
.product-card-img img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
}
.badge-new { background: var(--primary); color: #fff; }
.badge-best { background: var(--success); color: #fff; }
.badge-hot { background: #f97316; color: #fff; }
.badge-soldout { background: var(--text-muted); color: #fff; }
.badge-low { background: var(--warning); color: #fff; }
.product-card-body {
    padding: 14px 16px 16px;
}
.product-model {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}
.product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-colors {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border);
}
.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.price-current {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}
.price-original {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}
/* 비로그인 가격 숨김 */
.price-login-required {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    border: 1px dashed var(--primary);
}
.product-card-action {
    padding: 0 16px 16px;
}
.product-card-action button {
    width: 100%;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-white);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-body);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.product-card-action button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ==================== BRAND TABS ==================== */
.brand-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.brand-tab {
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-body);
    cursor: pointer;
    transition: all .2s;
}
.brand-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.brand-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ==================== FILTER BAR ==================== */
.store-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.store-select, .store-input {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: border-color .2s;
}
.store-select:focus, .store-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-outline { background: var(--bg-white); color: var(--text-body); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ==================== FOOTER ==================== */
.store-footer {
    background: var(--navy);
    color: rgba(255,255,255,.6);
    padding: 40px 24px 28px;
    margin-top: 60px;
}
.footer-inner {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.footer-brand {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.footer-info {
    font-size: 12px;
    line-height: 2;
}
.footer-bottom {
    max-width: 100%;
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 11px;
    text-align: center;
}

/* ==================== CARD / BOX ==================== */
.box {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--text-dark); }

/* ==================== TABLE ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    text-align: left;
}
.data-table tbody td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}
.data-table tbody tr:hover {
    background: var(--primary-bg);
}
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-confirmed { background: var(--primary-light); color: var(--primary); }
.badge-shipping { background: rgba(99,102,241,.1); color: var(--info); }
.badge-completed { background: var(--success-light); color: var(--success); }

/* ==================== LOGIN REQUIRED CTA ==================== */
.login-cta {
    text-align: center;
    padding: 28px;
    background: var(--primary-bg);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-lg);
}
.login-cta h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.login-cta p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ==================== MYPAGE LAYOUT ==================== */
.mypage-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}
.mypage-sidebar {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 0;
    height: fit-content;
    position: sticky;
    top: 120px;
}
.mypage-sidebar-title {
    padding: 0 20px 12px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}
.mypage-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-body);
    transition: all .2s;
    border-left: 3px solid transparent;
}
.mypage-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}
.mypage-link.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 700;
    border-left-color: var(--primary);
}
.mypage-link .material-symbols-outlined {
    font-size: 20px;
}

/* ==================== RESPONSIVE ==================== */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
    .tablet-hide { display: none !important; }
    .header-search { max-width: 400px; }
    .popular-keywords { display: none; }
    .utility-label { display: none; }
    .hero-title { font-size: 28px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .mypage-layout { grid-template-columns: 1fr; }
    .mypage-sidebar {
        position: static;
        display: flex;
        gap: 0;
        padding: 0;
        border-radius: var(--radius-lg);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .mypage-sidebar-title { display: none; }
    .mypage-link {
        white-space: nowrap;
        padding: 10px 16px;
        border-left: none;
        border-bottom: 3px solid transparent;
        font-size: 13px;
        flex-shrink: 0;
    }
    .mypage-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary);
    }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {
    /* 유틸리티 바 */
    .header-utility-bar { display: none; }

    /* 마이페이지의 데스크톱 탭은 하단 내비게이션과 중복되므로 숨김 */
    .mypage-sidebar { display: none; }

    /* 헤더 상단 바 (유틸리티) */
    .header-top { display: none; }

    /* 3단: 서브내비 (필터 버튼 줄) — 모바일에서 숨김 (하단 네비의 전체상품으로 대체) */
    .header-subnav { display: none !important; }

    /* 메가 드롭다운 — 모바일에서 전폭 표시 */
    .mega-dropdown-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 20px 20px 0 0 !important;
        border: none !important;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.15) !important;
        z-index: 10001 !important;
        padding: 16px !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        animation: slideUpSheet 0.3s ease-out !important;
        flex-wrap: wrap !important;
    }
    .mega-col {
        min-width: 45%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding: 8px 0;
    }
    .mega-col:last-child { border-bottom: none; }

    /* 스마트발주 버튼 — 모바일에서 숨김 (하단 네비바로 대체) */
    .header-action-btn.smart-order { display: none !important; }

    /* 헤더 아이콘 액션 — 모바일에서 숨김 (하단 네비바로 대체) */
    .header-icon-actions { display: none !important; }

    /* 메인 헤더 */
    .header-main-inner {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 10px;
    }
    .header-logo img { height: 28px; }
    .header-logo .logo-text { font-size: 11px; }
    .header-search {
        order: 3;
        max-width: 100%;
        flex: 1 1 100%;
    }
    .header-search input {
        padding: 10px 44px 10px 14px;
        font-size: 13px;
        min-height: 44px;
    }
    .search-submit {
        width: 40px;
        min-height: 44px;
    }
    .search-submit .material-symbols-outlined { font-size: 18px; }
    .header-icon-actions { gap: 8px; }
    .header-icon-btn .material-symbols-outlined { font-size: 20px; }
    .header-icon-btn .icon-label { display: none; }

    /* 네비 */
    .nav-inner {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 12px;
        scrollbar-width: none;
    }
    .nav-inner::-webkit-scrollbar { display: none; }
    .nav-link {
        padding: 10px 14px;
        font-size: 12px;
    }

    /* 컨테이너 */
    .store-container { padding: 16px; }

    /* 히어로 캐러셀 */
    .hero-carousel { border-radius: 0; margin-bottom: 0; }
    .hero-slide { aspect-ratio: 1.5 / 1; }
    .hero-slide img { object-position: var(--hero-mobile-position, center center); }
    .hero-slide:not(.has-mobile-image) { background: #0b1730; }
    .hero-slide:not(.has-mobile-image) img { object-fit: contain; }
    .hero-overlay { padding: 24px 20px; }
    .hero-tag { font-size: 11px; padding: 4px 10px; margin-bottom: 12px; }
    .hero-title { font-size: 20px; }
    .hero-desc { font-size: 12px; margin-bottom: 16px; line-height: 1.5; }
    .hero-actions { flex-direction: column; gap: 8px; }
    .hero-btn { padding: 10px 18px; font-size: 12px; justify-content: center; }
    .hero-nav { width: 32px; height: 32px; }
    .hero-dots { bottom: 10px; }
    .hero-dot { width: 8px; height: 8px; padding: 8px; background-clip: content-box; box-sizing: content-box; }
    .hero-dot.active { background-clip: content-box; }

    /* 섹션 */
    .section-title { font-size: 17px; }

    /* 상품 그리드 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-card-img { padding: 12px; }
    .product-card-img .material-symbols-outlined { font-size: 48px !important; }
    .product-card-body { padding: 10px 12px 12px; }
    .product-model { font-size: 10px; }
    .product-name { font-size: 12px; margin-bottom: 6px; }
    .color-dot { width: 10px; height: 10px; }
    .price-current { font-size: 14px; }
    .price-original { font-size: 10px; }
    .price-login-required { font-size: 10px; padding: 3px 8px; }

    /* 브랜드 탭 */
    .brand-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .brand-tabs::-webkit-scrollbar { display: none; }
    .brand-tab {
        padding: 6px 14px;
        font-size: 12px;
        flex-shrink: 0;
    }

    /* 필터 바 */
    .store-filter-bar {
        gap: 8px;
    }
    .store-select, .store-input {
        padding: 7px 10px;
        font-size: 12px;
    }

    /* 버튼 */
    .btn-lg { padding: 12px 20px; font-size: 14px; }

    /* 푸터 — 모바일 간소화 */
    .store-footer {
        padding: 24px 16px 20px;
        margin-top: 36px;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .footer-brand { font-size: 14px; margin-bottom: 8px; }
    .footer-info {
        font-size: 11px;
        line-height: 1.8;
    }
    .footer-inner > div:last-child {
        text-align: left !important;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,.08);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .footer-inner > div:last-child .footer-info {
        line-height: 1.7;
    }
    .footer-bottom {
        margin-top: 14px;
        padding-top: 12px;
        font-size: 10px;
    }

    /* 박스/KPI */
    .box { padding: 16px; }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .kpi-card { padding: 14px; }
    .kpi-label { font-size: 10px; }
    .kpi-value { font-size: 20px; }

    /* 테이블 — 가로 스크롤 */
    .data-table { display: block; overflow-x: auto; white-space: nowrap; }
    .data-table thead th { padding: 8px 10px; font-size: 10px; }
    .data-table tbody td { padding: 10px; font-size: 12px; }

    /* 대시보드: 테이블 → 카드형 (모바일) */
    .data-table.mobile-cards { display: block; overflow-x: visible; white-space: normal; }
    .data-table.mobile-cards thead { display: none; }
    .data-table.mobile-cards tbody { display: flex; flex-direction: column; gap: 10px; }
    .data-table.mobile-cards tr {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 12px;
        padding: 14px 16px;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        background: var(--bg-white);
        align-items: center;
    }
    .data-table.mobile-cards td {
        padding: 0;
        border: none;
        font-size: 13px;
    }
    .data-table.mobile-cards td:first-child {
        width: 100%;
        font-weight: 800;
        font-size: 14px;
        color: var(--text-dark);
        margin-bottom: 4px;
    }

    /* 모바일 전용 숨김 */
    .mobile-hide { display: none !important; }
    /* 모바일 전용 표시 (flex) */
    .mobile-only-flex { display: flex !important; }
    /* 스마트발주: 매트릭스/엑셀 탭 숨김 */
    .tab-btn.mobile-hide { display: none !important; }
    /* 스마트발주: 리스트 발주 아이템 모바일 레이아웃 */
    .product-list-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }
    .product-list-options {
        width: 100%;
    }
    .product-list-options select,
    .product-list-options .store-select {
        width: 100% !important;
    }
    .product-list-action {
        width: 100%;
        margin-left: 0 !important;
    }
    .product-list-action .btn {
        width: 100%;
        flex-direction: row !important;
        padding: 12px !important;
    }
    .chk-col { display: none !important; }
    .product-list-header { flex-direction: column; gap: 8px; align-items: stretch !important; }
    .product-list-header label { font-size: 12px; }
    .product-list-header .btn { width: 100%; text-align: center; justify-content: center; }

    /* 모바일: 드롭다운 → 바텀시트 스타일 */
    /* 바텀시트가 열리면 header z-index를 오버레이 위로 올림 */
    .store-header:has(.nav-item-dropdown.open) {
        z-index: 10002;
    }
    .nav-item-dropdown.open .dropdown-content {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-width: unset;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 20px 20px 0 0;
        border: none;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
        z-index: 10001;
        padding: 12px 0;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        animation: slideUpSheet 0.3s ease-out;
    }
    .nav-item-dropdown.open .dropdown-content a {
        padding: 16px 24px;
        font-size: 15px;
        font-weight: 600;
        border-bottom: 1px solid var(--border-light);
    }
    .nav-item-dropdown.open .dropdown-content a:last-child {
        border-bottom: none;
    }
    .nav-item-dropdown.open .dropdown-content a.active-sub {
        color: var(--primary);
        background: rgba(37, 99, 235, 0.06);
    }
    /* 바텀시트 배경 오버레이 */
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 10000;
        animation: fadeIn 0.2s ease;
    }
    .mobile-overlay.show {
        display: block;
    }

    /* 로그인 CTA */
    .login-cta { padding: 20px; }
    .login-cta h3 { font-size: 14px; }
    .login-cta p { font-size: 12px; }
}

/* --- Small Mobile (≤480px) --- */
@media (max-width: 480px) {
    .store-container { padding: 12px; }
    .hero-carousel { border-radius: 0; margin-bottom: 0; }
    .hero-slide { aspect-ratio: 1.5 / 1; }
    .hero-overlay { padding: 16px; }
    .hero-title { font-size: 20px; }
    .hero-desc { display: none; }
    .hero-nav { display: none; }
    .product-grid { gap: 8px; }
    .product-card-body { padding: 8px 10px 10px; }
    .product-name { font-size: 11px; }
    .price-current { font-size: 13px; }
}

/* --- Responsive: New Arrivals --- */
@media (max-width: 768px) {
    .new-arrivals-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .new-arrivals-section { margin-bottom: 36px; }
    .new-arrivals-section .section-header { margin-bottom: 14px; }
    .new-arrival-card { border: 1px solid var(--border-light); border-radius: var(--radius-md); }
    .new-arrival-card-img { padding: 6px; }
    .new-arrival-card-body { padding: 9px 10px 11px; min-width: 0; }
    .new-arrival-card-body .na-brand { font-size: 10px; }
    .new-arrival-card-body .na-name { font-size: 12px; }
    .new-arrival-card-body .na-model { font-size: 10px; margin-bottom: 6px; }
    .new-arrival-card-body .na-price { font-size: 13px; }
    .new-arrivals-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .new-arrival-thumb-info { padding: 6px 8px; }
    .new-arrival-thumb-info .thumb-name { font-size: 11px; }
    .new-arrival-thumb-info .thumb-price { font-size: 12px; }
}
@media (max-width: 480px) {
    .new-arrivals-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Responsive: Best Seller --- */
@media (max-width: 768px) {
    .bestseller-categories {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .bestseller-categories::-webkit-scrollbar { display: none; }
    .bestseller-cat-tab {
        padding: 10px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }
    .bestseller-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .bestseller-banner {
        aspect-ratio: 16 / 9;
        max-height: 220px;
    }
    .bestseller-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .bestseller-card-body .bs-name { font-size: 12px; }
    .bestseller-card-body .bs-price { font-size: 14px; }
}

/* --- Responsive: MD Pick --- */
@media (max-width: 1024px) {
    .mdpick-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (max-width: 768px) {
    .mdpick-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .mdpick-section { margin-bottom: 32px; }
    .mdpick-section .section-title { font-size: 18px; letter-spacing: .5px; }
    .mdpick-col-header { padding: 14px 16px; }
    .mdpick-col-header .cat-num { font-size: 12px; }
    .mdpick-col-header .cat-title { font-size: 16px; }
    .mdpick-col-header .cat-desc { font-size: 12px; }
    .mdpick-list-item {
        padding: 14px 16px;
        gap: 14px;
    }
    .mdpick-item-img {
        width: 76px;
        height: 92px;
        padding: 6px;
    }
    .mdpick-item-info { gap: 2px; min-width: 0; }
    .mdpick-item-info .item-subtitle { font-size: 10px; }
    .mdpick-item-info .item-title { font-size: 14px; }
    .mdpick-item-info .item-desc { font-size: 11px; }
    .mdpick-item-info .item-comment { font-size: 11px; }
}

/* =========================================
   Quick Menu (Right Floating Sidebar & Horizontal Mode)
   ========================================= */
.quick-menu {
    position: fixed;
    right: 40px;
    bottom: 58px;
    width: 65px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.quick-menu-horizontal {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    flex-direction: row;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 4px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    border-bottom: 1px solid #edf2f7;
    transition: all 0.2s ease;
    text-align: center;
    word-break: keep-all;
    line-height: 1.3;
}

.quick-menu-horizontal .quick-item {
    flex: 1;
    border-bottom: none;
    border-right: 1px solid #edf2f7;
    padding: 10px 0;
}

.quick-item:last-child,
.quick-menu-horizontal .quick-item:last-child {
    border-bottom: none;
    border-right: none;
}

.quick-item:hover {
    background-color: #f7fafc;
    color: var(--primary-color, #1e3a8a);
}

.quick-item .material-symbols-outlined {
    font-size: 1.3rem;
    margin-bottom: 4px;
    color: #718096;
    transition: color 0.2s ease;
}

.quick-item:hover .material-symbols-outlined {
    color: var(--primary-color, #1e3a8a);
}

.quick-item.top-btn,
.quick-item.bottom-btn {
    background-color: #f8fafc;
}
.quick-item.top-btn:hover,
.quick-item.bottom-btn:hover {
    background-color: #e2e8f0;
}

/* 반응형 처리: 모바일에서는 숨기거나 작게 표시 */
@media (max-width: 768px) {
    .quick-menu {
        display: none; /* 모바일에서는 화면을 너무 가리므로 기본적으로 숨김 처리 (요청에 따라 변경 가능) */
    }
}

/* ==================== PRODUCT LIST VIEW (products.html) ==================== */
.product-list {
    display: flex;
    flex-direction: column;
}
.product-list-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    /* overflow:hidden 제거 — 내부 #productListHeader / .expand-footer 의 position:sticky 를 깨뜨림 */
    overflow: visible;
}
.product-list-item {
    transition: background .2s;
}
.product-list-item:hover {
    background: var(--bg-light) !important;
}

/* 체크박스 및 장바구니 리스트 커스텀 */
input[type="checkbox"].row-chk {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* 옵션 선택 인라인 드롭다운 */
.inline-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 13px;
    width: 130px;
    background-color: var(--bg-white);
    color: var(--text-dark);
    outline: none;
    transition: border-color .2s;
}
.inline-select:focus {
    border-color: var(--primary);
}
.inline-select:disabled {
    background-color: var(--bg-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Swatch 형태 컬러 변경 */
.color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 0 2px rgba(0,0,0,0.05);
}

/* ===== MOBILE BOTTOM NAVIGATION BAR ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    z-index: 9999;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-nav .bnav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    max-width: 500px;
    margin: 0 auto;
}
.mobile-bottom-nav .bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all .2s;
    position: relative;
    min-width: 52px;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
}
.mobile-bottom-nav .bnav-item:active {
    transform: scale(0.9);
}
.mobile-bottom-nav .bnav-item.active {
    color: var(--primary);
}
.mobile-bottom-nav .bnav-item .material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
}
.mobile-bottom-nav .bnav-icon { width: 23px; height: 23px; display: block; }
.mobile-bottom-nav .bnav-item .bnav-badge {
    position: absolute;
    top: 0;
    right: 2px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block;
    }
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    }
    /* 모바일에서 헤더 액션 버튼 숨기기 — 하단 네비로 대체 */
    .header-actions {
        display: none !important;
    }
    /* 푸터 — 하단 네비바가 있으므로 여백 조정 */
    .store-footer {
        padding-bottom: 80px;
    }
}

/* 바텀시트 슬라이드업 애니메이션 */
@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== 간편 발주 전용 상단 메뉴 — 항목이 많아도 줄바꿈되어 잘리지 않는다 ===== */
.header-simple-nav {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
}
.simple-nav-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 4px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
    min-height: 42px;
}
.simple-nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-body);
    white-space: nowrap;
}
.simple-nav-link:hover { color: var(--primary); }
.simple-nav-link.active { color: var(--primary); background: var(--bg-light, #f3f6f4); }
@media (max-width: 768px) {
    .simple-nav-inner { padding: 4px 12px; }
    .simple-nav-link { padding: 7px 10px; font-size: 13px; }
}
