@charset "utf-8";
/* ==========================================================================
   영카트 쇼핑몰 리뉴얼 - 반응형 스타일
   Breakpoints: 1280 / 840 / 480
   ========================================================================== */

/* ----- ~1280px : 래퍼 내부 여백 ----- */
@media (max-width: 1280px) {
    #hd .wrap { padding:0 20px; }

    #main .swiper-pagination-bullets { bottom:18px; }
    #main .swiper-button-next:after, #main .swiper-button-prev:after { padding:20px 26px; }

    /* BEST 카테고리 (~1280) */
    #wrapper.is_index .wrap { padding:0 20px; }
    section#fav { padding:80px 0 20px; }
    section#fav .wrap { padding:0 20px; }

    /* 푸터 */
    footer#w_footer .wrap { padding:0 20px; }
    footer#w_footer .top article { width:auto; max-width:none; }

    /* 카테고리 리스트 */
    #container { padding-left:20px; padding-right:20px; }

    /* 사이트맵 패널 (~1280) */
    #hd #sitemap_panel .sitemap_grid { grid-template-columns:repeat(4, 1fr); }
}

/* ----- ~840px : 태블릿/모바일 — 3단 레이아웃 ----- */
@media (max-width: 840px) {
    /* 모바일 슬라이드 드로어 활성화 */
    #m_drawer { display:block; }

    /* 콘텐츠 박스 공통 좌우 여백 3% */
    #hd .wrap { padding:0 3%; }
    #hd .bot .wrap { padding:0 3%; }
    #container { padding-left:3%; padding-right:3%; }
    #wrapper.is_index .wrap { padding:0 3%; }
    section#fav .wrap { padding:0 3%; }
    footer#w_footer .wrap { padding:0 3%; }
    footer#w_footer nav ul.wrap { padding:4px 3%; }
    footer#w_footer .top { padding:28px 3%; }
    footer#w_footer .bot { padding:26px 3% 36px; }

    /* (1) 최상단: 스마트강국 몰 배너 — 100% 풀폭 */
    #hd .tnb { background:var(--theme-primary); border:none; }
    #hd .tnb .wrap { padding:0; max-width:none; width:100%; display:block; line-height:0; }
    #hd .tnb .hd_top_menu { display:block; line-height:0; }
    #hd .tnb .hd_top_menu li { display:none; }
    #hd .tnb .hd_top_menu li.mall { display:block; margin:0; }
    #hd .tnb .hd_top_menu li.mall:after { display:none; }
    #hd .tnb .hd_top_menu li.mall a { display:block; width:100%; color:#fff; text-align:center; line-height:40px; font-size:13px; font-weight:500; padding:0; border-radius:0; letter-spacing:.02em; }
    #hd .tnb .hd_top_menu li.mall a:hover { opacity:.92; }

    /* (2) 중단: 아이콘 + 로고 (flex row) — .wrap padding 리셋 */
    #hd .mid.wrap { padding:0; }
    #hd .mid { position:relative; height:56px; margin:0; padding:0; max-width:none; width:100%; display:flex; align-items:center; justify-content:space-between; background:#fff; border-bottom:1px solid #eee; }
    #hd .mid .hd_logo { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); padding:0; display:block; }
    #hd .mid .hd_logo img { height:34px; width:auto; display:block; }

    /* 모바일 아이콘바 노출 */
    #hd #hd_btn.hd_m_btn { display:flex; align-items:center; gap:0; position:static; width:100%; height:56px; pointer-events:auto; }
    #hd #hd_btn.hd_m_btn > * { position:static; height:56px; width:48px; line-height:56px; text-align:center; font-size:24px; color:#333; background:none; border:0; text-decoration:none; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; padding:0; }
    #hd #btn_hdcate { order:1; margin-left:4px; }
    #hd #btn_hdsch  { order:2; }
    #hd #btn_hduser { order:3; margin-left:auto; }
    #hd #btn_hdcart { order:4; position:relative; margin-right:4px; }
    #hd #btn_hdcart .cart-count { position:absolute; top:10px; right:-2px; min-width:18px; height:18px; line-height:18px; padding:0 5px; border-radius:9px; background:var(--theme-primary); color:#fff; font-size:10px; font-weight:700; display:inline-block; }
    #hd .hd_m_btn > *:hover { color:var(--theme-primary); }

    /* PC 검색박스: 오버레이로 전환 */
    #hd .mid #schBox { position:absolute; top:100%; left:0; right:0; width:100%; height:auto; margin:0; padding:10px 12px; background:#fff; border:0; border-bottom:1px solid #ddd; display:none; z-index:20; box-sizing:border-box; box-shadow:0 8px 16px -8px rgba(0,0,0,.15); }
    #hd.m_sch_open .mid #schBox { display:block; }
    #hd .mid #schBox legend { position:absolute; left:-9999px; top:-9999px; }
    #hd .mid #schBox form { position:relative; display:flex; width:100%; height:38px; border:1px solid #ddd; border-radius:4px; overflow:hidden; }
    #hd .mid #schBox input#sch_str { flex:1; height:38px; width:auto; background:#fff; border:0; padding:0 3%; color:#222; font-size:13px; }
    #hd .mid #schBox #sch_submit { width:44px; height:38px; border:0; border-left:1px solid #eee; border-radius:0; background:#fff; font-size:15px; color:#666; cursor:pointer; }

    /* (3) GNB: 흰 배경 + 검정 글자로 전환 (태블릿 이하) */
    #hd .bot { display:block; background:#fff; color:#222; border-top:1px solid #eee; border-bottom:1px solid #eee; }
    #hd .bot #nav_btn { display:none; }
    #hd .bot #w_category { margin-left:0; }
    #hd .bot #w_category .cate_li_1 > a { color:#222; }
    #hd .bot #w_category .cate_li_1:hover > a { color:var(--theme-primary); }
    /* 태블릿 이하: 서브메뉴 비활성, 메인 링크 바로 이동 */
    #hd .bot #w_category .cate_li_1 > ul.sub_cate,
    #hd .bot #w_category .cate_li_1:hover > ul.sub_cate { display:none; }
    /* 스와이퍼 버튼도 라이트 테마로 */
    #hd .bot .wrap > .gnb-nav-btn { background:#fff; color:#333; }
    #hd .bot .wrap > .gnb-nav-btn:hover { background:#f5f5f5; color:var(--theme-primary); }
    #hd .bot .wrap > .swiper-button-prev { left:0; }
    #hd .bot .wrap > .swiper-button-prev:before { background:linear-gradient(to right, #fff, rgba(255,255,255,0)); }
    #hd .bot .wrap > .swiper-button-next:before { background:linear-gradient(to left, #fff, rgba(255,255,255,0)); }

    /* 사이트맵 패널 (~840) - 3열 */
    #hd #sitemap_panel .wrap { padding:24px 3%; }
    #hd #sitemap_panel .sitemap_grid { grid-template-columns:repeat(3, 1fr); gap:18px 20px; }
    #hd #sitemap_panel .sitemap_col h3 { font-size:13px; padding-bottom:8px; margin-bottom:10px; }
    #hd #sitemap_panel .sitemap_sub li a { font-size:12px; padding:4px 0; }

    #main .swiper-button-next:after, #main .swiper-button-prev:after { padding:16px 18px; font-size:14px; }
    #main .swiper-button-prev { left:0; }
    #main .swiper-button-next { right:0; }
    #main .swiper-pagination-bullets { bottom:14px; }
    #main .swiper-pagination-bullets .swiper-pagination-bullet { width:8px; height:8px; }

    /* BEST 카테고리 (~840) */
    /* 메인 상품 섹션 (~840) - 3열 */
    #wrapper .sct_wrap.idx-grid ul.smt,
    #wrapper .sct_wrap.idx-grid ul.smt.smt_10 { grid-template-columns:repeat(3, 1fr) !important; gap:16px; }
    .sct_wrap.idx-grid > header h2 { font-size:20px; }
    .sct_wrap.idx-grid { margin-bottom:48px; }

    /* BEST 카테고리 (~840) - 6개 한 줄, 아이콘 축소 */
    section#fav { padding:56px 0 20px; }
    section#fav h2 { font-size:20px; }
    section#fav ul.fl { margin-top:28px; gap:10px; flex-wrap:nowrap; justify-content:space-between; }
    section#fav ul.fl li { width:calc((100% - 50px) / 6); max-width:110px; margin:0; }
    section#fav ul.fl li figure { width:100%; height:auto; aspect-ratio:1 / 1; }
    section#fav ul.fl li p { font-size:13px; margin-top:8px; }

    /* 카테고리 리스트 (~840) - 3단 그리드 */
    #container .lists-row .col-row-4 { width:33.3333%; }
    #container h2.category-title { margin:8px 0 40px; font-size:19px; }
    #container #sct_sortlst { margin-top:40px; }
    #container #ssch_sort li a { padding-right:0; margin-right:14px; font-size:12px; }
    #container #sct_lst { display:none; }

    /* 푸터 */
    footer#w_footer { margin-top:40px; font-size:12.5px; }
    footer#w_footer .top { flex-direction:column; gap:22px; padding:28px 20px; }
    footer#w_footer .top article { width:100%; max-width:none; }
    footer#w_footer .top article h2 { font-size:13px; line-height:26px; }
    footer#w_footer .top article strong.cp { font-size:17px; }
    footer#w_footer nav ul.wrap { padding:4px 20px; }
    footer#w_footer nav ul li { line-height:34px; font-size:12px; }
    footer#w_footer nav ul li a { padding:0 8px; }
    footer#w_footer .bot { flex-direction:column; gap:14px; padding:26px 20px 36px; }
    footer#w_footer .bot > img { height:34px; margin-right:0; }
    footer#w_footer .bot address { width:100%; font-size:12px; line-height:1.75; }
    footer#w_footer .bot address span { margin-right:12px; }
}

/* ----- ~480px : 모바일 ----- */
@media (max-width: 480px) {
    
    #w_aside { right:10px; bottom:20px; gap:10px; }
    #w_aside img { width: 50px; }

    /* 헤더 타이트 조정 */
    #hd .mid { height:50px; }
    #hd #hd_btn.hd_m_btn > * { width:42px; height:50px; line-height:50px; font-size:24px; }
    #hd #btn_hdcate { margin-left:2px; }
    #hd #btn_hdcart { margin-right:2px; }
    #hd #btn_hdcart .cart-count { top:8px; }
    #hd .mid #schBox { padding:8px 10px; }

    /* GNB — 카테고리 텍스트/버튼 축소 */
    #hd .bot { height:46px; }
    #hd .bot .wrap { height:44px; }
    #hd .bot #w_category .cate_li_1 > a { padding:0 16px; line-height:44px; font-size:13px; }
    #hd .bot .wrap > .gnb-nav-btn { height:44px; width:32px; font-size:12px; }

    /* 사이트맵 패널 (~480) - 2열 */
    #hd #sitemap_panel .wrap { padding:20px 3%; }
    #hd #sitemap_panel .sitemap_grid { grid-template-columns:repeat(2, 1fr); gap:14px 14px; }

    #main .swiper-button-next:after, #main .swiper-button-prev:after { padding:12px 14px; font-size:12px; }
    #main .swiper-pagination-bullets { bottom:10px; }
    #main .swiper-pagination-bullets .swiper-pagination-bullet { width:6px; height:6px; margin:0 3px; }

    /* BEST 카테고리 (~480) */
    #wrapper.is_index .wrap { padding:0 3%; }
    /* 메인 상품 섹션 (~480) - 2열 */
    #wrapper .sct_wrap.idx-grid ul.smt,
    #wrapper .sct_wrap.idx-grid ul.smt.smt_10 { grid-template-columns:repeat(2, 1fr) !important; gap:14px; }
    .sct_wrap.idx-grid > header h2 { font-size:18px; }
    .sct_wrap.idx-grid .sct_txt a { font-size:12px; }
    .sct_wrap.idx-grid .sct_basic { font-size:11px; }
    .sct_wrap.idx-grid .sct_cost { font-size:13px; }
    .sct_wrap.idx-grid .sct_ct_wrap { padding-top:10px; }

    /* BEST 카테고리 (~480) - 3개씩 2줄 */
    section#fav { padding:40px 0 10px; }
    section#fav .wrap { padding:0 3%; }
    section#fav h2 { font-size:18px; }
    section#fav ul.fl { margin-top:20px; gap:16px 12px; flex-wrap:wrap; justify-content:space-between; }
    section#fav ul.fl li { width:calc((100% - 24px) / 3); max-width:none; margin:0; }
    section#fav ul.fl li figure { width:100%; height:auto; aspect-ratio:1 / 1; }
    section#fav ul.fl li p { font-size:13px; margin-top:8px; }

    /* 카테고리 리스트 (~480) - 2단 그리드 */
    #container { padding-left:3%; padding-right:3%; }
    #container .lists-row .col-row-4 { width:50%; }
    #container h2.category-title { margin:6px 0 28px; font-size:17px; }
    #container #sct_sortlst { margin-top:24px; padding:0 4px; }
    #container #ssch_sort li { line-height:36px; }
    #container #ssch_sort li a { margin-right:10px; font-size:11px; }
    #container ul.sct.lists-row > .sct_li { margin-top:24px; }
    #container .sct .sct_ct_wrap { padding-top:12px; }
    #container .sct .sct_txt a { font-size:12px; }
    #container .sct .sct_basic { font-size:11px; }
    #container .sct .sct_cost { font-size:13px; }

    /* 푸터 */
    footer#w_footer .wrap { padding:0 3%; }
    footer#w_footer .top { padding:22px 3%; }
    footer#w_footer .top article strong.cp { font-size:16px; }
    /* 푸터 nav: 좁은 화면에서 가로 스크롤 (스크롤바 숨김) */
    footer#w_footer nav { overflow-x:auto; overflow-y:hidden; -ms-overflow-style:none; scrollbar-width:none; -webkit-overflow-scrolling:touch; touch-action:pan-x; white-space:nowrap; }
    footer#w_footer nav::-webkit-scrollbar { display:none; }
    footer#w_footer nav ul.wrap { display:inline-block; padding:2px 3%; white-space:nowrap; }
    footer#w_footer nav ul li { display:inline-block; float:none; line-height:36px; font-size:11.5px; vertical-align:middle; }
    footer#w_footer nav ul li a { padding:0 6px; }
    footer#w_footer nav:after { display:none; } /* clearfix 해제 */
    footer#w_footer .bot { padding:22px 3% 30px; }
}
