﻿@charset "utf-8";

/* 
 * Korea1700 Responsive Overrides 
 * Implements 6-Section Custom Main Page Layout
 */

/* ==========================================================================
   0. Base Visibility & Reset
   ========================================================================== */
.mobile-header-wrap,
#mobile_bottom_nav,
.mobile-only {
    display: none;
}

/* Desktop: Category dropdown hidden by default - initial state handled by premium.css */
/* JavaScript toggles visibility via inline style */

/* Common Container Fluidity */
@media (max-width: 75rem) {

    .inner-container,
    #hd_wrapper,
    #tnb .inner,
    #gnb .gnb_wrap,
    #container_wr,
    #ft_wr,
    #container,
    #hd,
    #wrapper,
    #ft,
    #hd_main .inner {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #container {
        padding-left: 0.9375rem;
        padding-right: 0.9375rem;
    }
}

/* ==========================================================================
   1. Mobile View (Max 61.9375rem)
   ========================================================================== */
@media (max-width: 62rem) {

    /* 1.1 Header Visibility */
    .desktop-header-wrap {
        display: none;
    }

    .mobile-header-wrap {
        display: block;
    }

    .mobile-only {
        display: block;
    }

    /* 1.2 Mobile Header Styling */
    .mobile-header-wrap {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        background: #fff;
        z-index: 1000;
        box-shadow: 0 1px 0.1875rem rgba(0, 0, 0, 0.05);
        height: 3.75rem;
    }

    .mh-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        padding: 0 0.9375rem;
    }

    .mh-logo-wrap {
        flex: 1;
        text-align: left;
    }

    .mh-logo img {
        height: 1.625rem;
        width: auto;
        vertical-align: middle;
    }

    /* Right Icons */
    .mh-icons {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mh-icons li {
        position: relative;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mh-icons a {
        display: block;
        width: 1.875rem;
        height: 1.875rem;
        position: relative;
    }

    .bt_search_open {
        background: url('../img/btn_search.png') no-repeat center center;
        background-size: contain;
    }

    .bt_search_close {
        background: url('../img/popup_btn_close.png') no-repeat center center;
        background-size: contain;
    }

    .bt_cart {
        background: url('../img/btn_cart.png') no-repeat center center;
        background-size: contain;
    }

    .mh-icons .num {
        position: absolute;
        top: -0.3125rem;
        right: -0.3125rem;
        background: #10069f;
        color: #fff;
        font-size: 0.625rem;
        width: 1rem;
        height: 1rem;
        line-height: 1rem;
        border-radius: 50%;
        text-align: center;
    }

    /* Hamburger Menu Icon */
    .menu-trigger {
        display: block;
        width: 1.5rem;
        height: 1.5rem;
        position: relative;
        margin: auto;
    }

    .menu-icon {
        display: block;
        width: 1.375rem;
        height: 1rem;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .menu-line {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #000;
        transition: all 0.3s ease-in-out;
    }

    .menu-line1 {
        top: 0;
    }

    .menu-line2 {
        top: 0.4375rem;
        opacity: 1;
    }

    .menu-line3 {
        top: 0.875rem;
    }

    .btn_aside.open .menu-line1 {
        transform: rotate(45deg);
        top: 0.4375rem;
    }

    .btn_aside.open .menu-line2 {
        opacity: 0;
        transform: translateX(-0.625rem);
    }

    .btn_aside.open .menu-line3 {
        transform: rotate(-45deg);
        top: 0.4375rem;
    }

    /* Search Bar Overlay */
    #mobile_search_bar {
        position: absolute;
        top: 3.75rem;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 0.9375rem;
        border-bottom: 1px solid #eee;
        z-index: 900;
    }

    .ms-inner {
        position: relative;
        border: 1px solid #ddd;
        border-radius: 0;
    }

    .ms-input {
        width: 100%;
        height: 2.5rem;
        border: none;
        padding: 0 3.125rem 0 0.625rem;
        font-size: 0.875rem;
    }

    .ms-btn {
        position: absolute;
        right: 0;
        top: 0;
        width: 2.5rem;
        height: 2.5rem;
        background: none;
        border: none;
        color: #333;
    }

    /* 1.3 Drawer Menu (LNB) */
    #hd_menu.hd_menu_drawer {
        display: none;
        position: fixed;
        top: 3.75rem;
        left: 0;
        width: 100%;
        height: calc(100vh - 3.75rem);
        background: #fff;
        z-index: 1000;
        overflow-y: auto;
        padding-bottom: 5rem;
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    /* Category List Styling */
    #hd_menu #category {
        display: flex;
        position: static;
        width: 100%;
        height: max-content;
        box-shadow: inherit;
    }

    #hd_menu #category h2 {
        display: none;
    }

    #category .cate {
        width: 100%;
        padding: 0;
        margin: 0;
        background: #fff;
    }

    #category .cate_li_1 {
        display: block;
        width: 100%;
        border-bottom: 1px solid #e9e9e9;
        position: relative;
        background: #f9f9f9;
    }

    #category .cate_li_1_a {
        display: block;
        padding: 0.9375rem 1.25rem;
        font-size: 0.9375rem;
        font-weight: 500;
        color: #1b1b1c;
        text-decoration: none;
    }

    #category .toggle_arrow {
        position: absolute;
        top: 1.6875rem;
        right: 0.9375rem;
        margin-top: -0.625rem;
        width: 1.25rem;
        height: 1.25rem;
        background: url('../img/btn_aside_arrow.png') no-repeat center center;
        background-size: contain;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    #category .toggle_arrow.on {
        transform: rotate(90deg);
    }

    #category .sub_cate {
        border-top: 1px solid #f2f2f2;
        display: none;
    }

    #category .cate_li_2 {
        width: 50%;
    }

    #category .cate_li_2 a {
        padding: 0 0 0 2rem;
        line-height: 2.5rem;
    }

    #category .close_btn,
    #category_all_bg,
    /* #side_menu, /* 사이드 메뉴 겹침 방지를 위해 주석 해제 고려 */
    #aside,
    #mobile_bottom_nav {
        display: none;
    }

    /* 사이드 퀵메뉴 태블릿에서 위치 조정 */
    #side_menu {
        right: -3.125rem;
        /* 화면 밖으로 밀어내거나 위치 조정 */
        transition: right 0.3s ease;
    }

    #side_menu.active {
        right: 0;
    }
}

/* ==========================================================================
   2. Footer Styles (Conran Style)
   ========================================================================== */
#ft {
    border-top: 1px solid #eee;
    background: #fff;
    padding: 0;
    margin-top: 0;
}

#ft .footer_top {
    padding: 3.125rem 0;
    /* border-bottom: 1px solid #e5e5e5; */
    /* background: #fff; */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#ft .ft-col {
    width: 20%;
    padding: 0 0.9375rem;
    box-sizing: border-box;
}

#ft .ft-col h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    font-family: inherit;
}

#ft .footer_link {
    margin: 0;
    padding: 0;
    list-style: none;
}

#ft .footer_link li {
    margin-bottom: 0.625rem;
}

#ft .footer_link a {
    font-size: 0.8125rem;
    color: #666;
    text-decoration: none;
}

#ft .footer_link a:hover {
    color: #000;
    text-decoration: underline;
}

.social-links img {
    height: 1.125rem;
    width: auto;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.social-links img:hover {
    opacity: 1;
}

#ft .footer_bottom {
    padding: 2.5rem 0;
    text-align: left;
    font-size: 0.6875rem;
    color: #888;
    line-height: 1.6;
}

#ft .fb-section {
    margin-bottom: 0.9375rem;
}

#ft .fb-section span {
    margin-right: 0.75rem;
    display: inline-block;
}

#ft .bold {
    font-weight: 700;
    color: #333;
}

#ft .dark {
    color: #333;
}

#ft p {
    margin: 0 0 0.625rem;
}

@media (max-width: 62rem) {

    /* footer_top: footer-grid媛 ?덉쑝硫?grid ?좎?, ?놁쑝硫?block */
    #ft .footer_top:not(:has(.footer-grid)) {
        display: block;
        padding: 1.875rem 0.9375rem;
    }

    /* footer-grid ?대? ft-col? grid ?꾩씠?쒖쑝濡??좎? */
    #ft .footer-grid .ft-col {
        width: auto;
        /* grid媛 ?덈퉬 愿由?*/
        margin-bottom: 0;
        padding: 0;
    }

    /* ?쇰컲 ft-col (footer-grid 諛? */
    #ft .footer_top>.ft-col {
        width: 100%;
        margin-bottom: 1.875rem;
        padding: 0;
    }

    #ft .ft-col h3 {
        font-size: 0.9375rem;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 0.625rem;
        margin-bottom: 0.9375rem;
    }

    #ft .footer_bottom,
    #ft .footer-bottom {
        padding: 1.25rem 0.9375rem;
    }

    #ft .fb-section span {
        display: block;
        margin-right: 0;
        margin-bottom: 0.3125rem;
    }

    /* 모바일 드로어 배경 오버레이 */
    #hd_drawer_bg {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        /* 암전 효과 */
        z-index: 998;
        display: none;
        transition: opacity 0.3s ease;
    }
}


/* ==========================================================================
   3. Main Page Layout (6 Sections)
   ========================================================================== */

/* 3.1 Section 1: Tile Banners (Image Links) */
.sec-tile-banners ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sec-tile-banners li {
    position: relative;
    width: 25%;
    /* PC: 4 cols */
    padding-bottom: 25%;
    height: 0;
    overflow: hidden;
    float: left;
}

.sec-tile-banners .bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

.sec-tile-banners li:hover .bg {
    transform: scale(1.05);
}

.sec-tile-banners .txt {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    color: #fff;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sec-tile-banners .txt h3 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 0.3125rem;
}

.sec-tile-banners .txt p {
    font-size: 0.75rem;
    margin: 0;
    opacity: 0.9;
}

.sec-tile-banners .link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* 3.2 Section 2: Category Quick Links */
.sec-category-icons {
    padding: 1.875rem 0;
    text-align: center;
    background: #fdfdfd;
    border-bottom: 1px solid #eee;
}

.sec-category-icons .cate-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9375rem;
}

.sec-category-icons li {
    width: calc(12.5% - 0.9375rem);
    text-align: center;
}

/* PC: 8 cols */
.sec-category-icons a {
    display: block;
    text-decoration: none;
    color: #333;
}

.sec-category-icons .icon-circle {
    width: 3.75rem;
    height: 3.75rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 1.25rem;
    margin: 0 auto 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #555;
    transition: all 0.2s;
    box-shadow: 0 2px 0.3125rem rgba(0, 0, 0, 0.05);
}

.sec-category-icons li:hover .icon-circle {
    border-color: #333;
    color: #000;
    transform: translateY(-0.1875rem);
}

.sec-category-icons span {
    font-size: 0.8125rem;
    font-weight: 500;
    display: block;
}

/* 3.3~3.5 Common Product Grid Styles */
.sec-products-horizontal,
.sec-products-vertical {
    padding: 2.5rem 0;
    border-bottom: 1px solid #eee;
}

.sec-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0 0.625rem;
}

.sec-head h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.sec-head .more {
    font-size: 0.8125rem;
    color: #777;
    text-decoration: none;
}

.prod-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.625rem;
    padding: 0;
    list-style: none;
}

.prod-grid li {
    padding: 0 0.625rem;
    margin-bottom: 1.25rem;
    box-sizing: border-box;
}

.prod-card {
    display: block;
    text-decoration: none;
    color: #333;
}

.prod-card:hover .name {
    text-decoration: underline;
}

/* Horizontal Card (Section 3 & 4) */
.horizontal-grid li {
    width: 33.3333%;
}

/* PC: 3x2 */
.prod-card.horizontal {
    display: block;
    /* Stack vertically as requested */
    border: 1px solid #eee;
    background: #fff;
    transition: box-shadow 0.2s;
    height: 100%;
}

.prod-card.horizontal:hover {
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.08);
}

.prod-card.horizontal .thumb {
    width: 100%;
    overflow: hidden;
}

.prod-card.horizontal .thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.prod-card.horizontal .info {
    padding: 0.9375rem;
}

.prod-card.horizontal .name {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.prod-card.horizontal .size {
    display: block;
    font-size: 0.8125rem;
    color: #888;
    margin-bottom: 0.3125rem;
}

/* Added Size */
.prod-card.horizontal .price {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111;
}

/* Vertical Card (Section 5) */
.vertical-grid li {
    width: 16.6666%;
}

/* PC: 6x1 */
.prod-card.vertical {
    text-align: left;
}

.prod-card.vertical .thumb {
    width: 100%;
    margin-bottom: 0.625rem;
    overflow: hidden;
    border: 1px solid #eee;
}

.prod-card.vertical .thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.prod-card.vertical:hover .thumb img {
    transform: scale(1.05);
}

.prod-card.vertical .info {
    padding: 0 0.3125rem;
}

.prod-card.vertical .name {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.3125rem;
    height: 2.6em;
    overflow: hidden;
    font-weight: 500;
}

.prod-card.vertical .size {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.1875rem;
}

/* Added Size */
.prod-card.vertical .price {
    font-size: 0.8125rem;
    font-weight: 700;
}

/* 3.6 Section 6: Service Widgets */
.sec-services {
    padding: 2.5rem 0;
    background: #fdfdfd;
}

.svc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.svc-item {
    flex: 1;
    /* PC: 3 equal cols */
    background: #fff;
    border: 1px solid #eee;
    padding: 1.5625rem;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 0.625rem rgba(0, 0, 0, 0.03);
}

.svc-item:hover {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.3125rem 1.25rem rgba(0, 0, 0, 0.08);
}

.svc-content h4 {
    font-size: 1.125rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: #000;
}

.svc-content p {
    font-size: 0.8125rem;
    color: #666;
    margin: 0 0 0.9375rem;
    line-height: 1.4;
}

.btn-svc {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #333;
    text-decoration: none;
    background: #f9f9f9;
    transition: all 0.2s;
}

.btn-svc:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.svc-icon {
    font-size: 2.5rem;
    color: #eee;
    transform: rotate(-10deg);
}

.svc-item:hover .svc-icon {
    color: #ddd;
    transform: rotate(0deg) scale(1.1);
    transition: all 0.3s;
}

/* NOTE: Global Category Layer Styles section removed to fix desktop layout.
   Category visibility is now handled by:
   - Desktop: display:none by default (top of this file), JavaScript toggles on click
   - Mobile: @media (max-width: 62rem) rules in earlier section
*/

/* ==========================================================================
   4. Mobile Responsive Overrides (Max 61.9375rem)
   ========================================================================== */
@media (max-width: 62rem) {

    /* 4.1 Section 1: Tile Banners - Mobile: 2 Columns x 4 Rows */
    .sec-tile-banners li {
        width: 50%;
        padding-bottom: 50%;
    }

    /* 2 cols */
    .sec-tile-banners .txt h3 {
        font-size: 0.875rem;
    }

    .sec-tile-banners .txt p {
        display: none;
    }

    /* 4.2 Section 2: Category Icons - Mobile: 4 Cols x 2 Rows */
    .sec-category-icons li {
        width: calc(25% - 0.9375rem);
    }

    /* 4 cols */
    .sec-category-icons .icon-circle {
        width: 3.125rem;
        height: 3.125rem;
        font-size: 1.25rem;
        border-radius: 1rem;
    }

    .sec-category-icons span {
        font-size: 0.75rem;
        letter-spacing: -0.5px;
    }

    /* 4.3 Section 3 & 4: Products Horizontal - Mobile: 1 Col x 6 Row (Stack) */
    .sec-products-horizontal {
        padding: 1.5625rem 0;
    }

    .horizontal-grid li {
        width: 100%;
        margin-bottom: 0.625rem;
    }

    /* Stack */
    .prod-card.horizontal {
        padding: 0;
        border: none;
        border-bottom: 1px solid #f5f5f5;
    }

    .prod-card.horizontal .thumb {
        width: 100%;
        max-width: none;
        height: auto;
        border-radius: 0.25rem;
    }

    .prod-card.horizontal .info {
        padding: 0.625rem 0;
    }

    .prod-card.horizontal .name {
        font-size: 0.875rem;
        white-space: normal;
        height: auto;
        margin-bottom: 0.3125rem;
    }

    /* 4.4 Section 5: Products Vertical - Mobile: 3 Cols x 2 Rows */
    .sec-products-vertical {
        padding: 1.5625rem 0;
    }

    .vertical-grid {
        gap: 0.625rem;
        margin: 0;
    }

    .vertical-grid li {
        width: calc(33.333% - 0.4375rem);
        padding: 0;
        margin-bottom: 0.9375rem;
    }

    /* 3 Cols */
    .prod-card.vertical .thumb {
        margin-bottom: 0.5rem;
    }

    .prod-card.vertical .name {
        font-size: 0.75rem;
        height: 3em;
        line-height: 1.4;
    }

    .prod-card.vertical .price {
        font-size: 0.75rem;
    }

    /* 4.5 Section 6: Service Widgets - Mobile: Stack */
    .sec-services {
        padding: 1.5625rem 0;
    }

    .svc-grid {
        flex-direction: column;
        gap: 0.9375rem;
    }

    .svc-item {
        padding: 1.25rem;
    }

    .svc-content h4 {
        font-size: 1rem;
    }

    .svc-icon {
        font-size: 2rem;
    }
}

/* ==========================================================================
   5. Desktop Mega Menu (Min 62rem)
   ========================================================================== */
@media (min-width: 62rem) {
    #hd {
        position: relative;
    }

    /* Ensure absolute positioning works relative to Header */

    #hd_menu.hd_menu_drawer {
        position: absolute;
        top: 100%;
        /* Below header */
        left: 0;
        width: 100%;
        background: #fff;
        border-bottom: 1px solid #ddd;
        box-shadow: 0 0.3125rem 1.25rem rgba(0, 0, 0, 0.1);
        z-index: 1001;
        display: none;
        /* Toggled by JS */
    }

    /* Mega Menu Container */
    #hd_menu .drawer-content {
        max-width: 75rem;
        /* Match inner-container */
        margin: 0 auto;
        padding: 2.5rem 1.25rem;
        box-sizing: border-box;
    }

    /* Hide Mobile Utils */
    #hd_menu .mobile-utils {
        display: none;
    }

    /* Category Grid Layout - Base styles (visibility handled by JS) */
    /* #category display is controlled by shop.head.php JavaScript */
    #category {
        width: 100%;
    }

    #category ul.cate {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 1.875rem;
        visibility: visible;
        /* Ensure visibility */
        opacity: 1;
    }

    #category .cate_li_1 {
        width: calc(20% - 1.5rem);
        /* 5 Columns */
        border-bottom: none;
        background: none;
        margin-bottom: 1.25rem;
    }

    #category .cate_li_1_a {
        font-size: 1rem;
        font-weight: 800;
        color: #000;
        padding: 0 0 0.625rem 0;
        border-bottom: 2px solid #000;
        margin-bottom: 0.9375rem;
        display: block;
        text-transform: uppercase;
    }

    #category .cate_li_1_a:hover {
        color: #ef4444;
    }

    #category .toggle_arrow {
        display: none;
    }

    /* Always show subcategories on Desktop */
    #category .sub_cate {
        display: block;
        border: none;
        padding: 0;
        margin: 0;
        background: none;
    }

    #category .cate_li_2 {
        width: 100%;
        padding-left: 0;
        margin-bottom: 0.3125rem;
    }

    #category .cate_li_2 a {
        padding: 0.3125rem 0;
        font-size: 0.875rem;
        color: #555;
        display: block;
        line-height: 1.4;
        transition: color 0.2s;
    }

    #category .cate_li_2 a:hover {
        color: #ef4444;
        text-decoration: underline;
        font-weight: 600;
    }

    /* Background Overlay when menu is open */
    .drawer-open #hd_menu::before {
        content: '';
        position: fixed;
        top: 10rem;
        /* Approx header height */
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        pointer-events: none;
    }
}