/* ═══════════════════════════════════════════
   일본제 쇼핑몰 공통 스타일 (nihonse_shop.css)
   메인(index.php)과 동일한 디자인 토큰
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Noto+Sans+KR:wght@300;400;500&display=swap');

/* ─── 기존 스킨 오버라이드 ─── */
body {
    font-family: 'Noto Sans KR', sans-serif !important;
    background: #fff !important;
    color: #111;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

#wrapper {
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 40px;
}

#container { width: 100% !important; }
.shop-content { width: 100% !important; margin: 0 !important; }

#wrapper_title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    padding: 40px 0 0;
    border: none;
    color: #111;
}

/* ─── 공지바 ─── */
.nh-announce {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 9px 16px;
    font-size: 11px;
    letter-spacing: 1.5px;
}

.nh-announce a {
    color: #c8102e;
    margin-left: 8px;
    border-bottom: 1px solid #c8102e;
    text-decoration: none;
}

/* ─── 헤더 ─── */
.nh-header {
    padding: 0 40px;
    border-bottom: 1px solid #e5e5e5;
}

.nh-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 64px;
}

.nh-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 5px;
    color: #111;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nh-logo sup {
    font-size: 10px;
    letter-spacing: 2px;
    color: #c8102e;
    vertical-align: super;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    margin-left: 2px;
}

.nh-search {
    flex: 1;
    max-width: 360px;
}

.nh-search form {
    display: flex;
    border: 1px solid #ddd;
}

.nh-search input[type=text] {
    flex: 1;
    border: none;
    padding: 9px 14px;
    font-size: 12px;
    font-family: 'Noto Sans KR', sans-serif;
    outline: none;
    background: #fff;
}

.nh-search button {
    border: none;
    background: #111;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
    font-size: 13px;
}

.nh-utils {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

.nh-utils a { color: #666; text-decoration: none; transition: color .2s; white-space: nowrap; }
.nh-utils a:hover { color: #111; }

.nh-cart {
    color: #111 !important;
    position: relative;
}

.nh-cart .count {
    background: #c8102e;
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    padding: 1px 5px;
    margin-left: 3px;
}

/* ─── 카테고리 네비 ─── */
.nh-nav {
    border-bottom: 1px solid #e5e5e5;
    padding: 0 40px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.nh-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.nh-nav-inner::-webkit-scrollbar { display: none; }

.nh-nav a {
    display: inline-block;
    padding: 13px 16px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #888;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all .2s;
    text-decoration: none;
}

.nh-nav a:first-child { padding-left: 0; }
.nh-nav a:hover { color: #111; }
.nh-nav a.made { color: #c8102e; font-weight: 500; }
.nh-nav a.made:hover, .nh-nav a.made.on { border-bottom-color: #c8102e; }
.nh-nav a.design { color: #111; font-weight: 500; }
.nh-nav a.design:hover, .nh-nav a.design.on { border-bottom-color: #111; }

/* ─── 상품 리스트 상단 (경로/정렬) 오버라이드 ─── */
#sct_location, .sct_lct {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    letter-spacing: 2px;
    border: none;
    padding: 44px 0 8px;
}

#sct_sort, .list_sort_wr {
    border-top: none !important;
    border-bottom: 1px solid #111 !important;
    background: #fff !important;
    padding: 10px 0 !important;
    margin-bottom: 32px;
}

#sct_sort a, .list_sort_wr a {
    font-size: 11px !important;
    letter-spacing: 1px;
    color: #888 !important;
}

#sct_sort a:hover, #sct_sort a.on { color: #c8102e !important; }

/* ─── 상품 그리드 (nh-grid) ─── */
.nh-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 20px;
    list-style: none;
    margin: 0 0 60px;
    padding: 0;
}

.nh-item {
    position: relative;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nh-item-imgwrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
    overflow: hidden;
    margin-bottom: 12px;
}

.nh-item-imgwrap a { display: block; width: 100%; height: 100%; }

.nh-item-imgwrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}

.nh-item:hover .nh-item-imgwrap img { transform: scale(1.04); }

.nh-badge {
    position: absolute;
    top: 0; left: 0;
    color: #fff;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 4px 9px;
    z-index: 2;
}

.nh-badge.made { background: #c8102e; }
.nh-badge.design { background: #111; }

.nh-soldout {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    letter-spacing: 3px;
    color: #111;
    z-index: 3;
}

/* hover 시 장바구니 버튼 */
.nh-item-actions {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    opacity: 0;
    transform: translateY(6px);
    transition: all .25s ease;
    z-index: 2;
}

.nh-item:hover .nh-item-actions { opacity: 1; transform: translateY(0); }

.nh-item-actions button {
    flex: 1;
    border: none;
    background: rgba(17,17,17,.92);
    color: #fff;
    font-size: 11px;
    letter-spacing: 1.5px;
    padding: 11px 0;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
    transition: background .2s;
}

.nh-item-actions button:hover { background: #c8102e; }

.nh-item-actions button + button {
    flex: 0 0 44px;
    border-left: 1px solid rgba(255,255,255,.2);
}

.nh-item-name {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.nh-item-name a { color: #111; text-decoration: none; }

.nh-item-basic {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
}

.nh-item-price { font-size: 13px; color: #111; }

.nh-item-price .nh-orig {
    font-size: 11px;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 6px;
}

.nh-item-star { margin-bottom: 4px; }
.nh-item-star img { height: 12px; width: auto; display: inline-block; }

.sct_noitem {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0;
    font-size: 12px;
    letter-spacing: 2px;
    color: #bbb;
    border: none !important;
    background: none !important;
}

/* ─── 페이징 ─── */
.pg_wrap { padding: 20px 0 60px; text-align: center; }
.pg_page, .pg_current {
    border: none !important;
    background: none !important;
    font-size: 12px;
    padding: 6px 10px;
}
.pg_current { color: #c8102e !important; font-weight: 500; }

/* ─── 푸터 ─── */
.nh-footer {
    background: #111;
    color: #555;
    padding: 56px 40px 32px;
    margin-top: 40px;
}

.nh-footer-inner { max-width: 1200px; margin: 0 auto; }

.nh-footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #222;
    margin-bottom: 28px;
}

.nh-footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 5px;
    color: #fff;
    margin-bottom: 14px;
}

.nh-footer-logo sup {
    font-size: 9px;
    color: #c8102e;
    font-family: 'Noto Sans KR', sans-serif;
    vertical-align: super;
}

.nh-footer-desc { font-size: 12px; color: #444; line-height: 1.8; }

.nh-footer-col h4 {
    font-size: 11px;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 16px;
    font-weight: 500;
}

.nh-footer-col ul { list-style: none; margin: 0; padding: 0; }
.nh-footer-col ul li { margin-bottom: 10px; }
.nh-footer-col ul li a { font-size: 12px; color: #444; text-decoration: none; transition: color .2s; }
.nh-footer-col ul li a:hover { color: #fff; }

.nh-footer-info {
    font-size: 11px;
    color: #3a3a3a;
    line-height: 1.9;
    padding-bottom: 20px;
}

.nh-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: #333;
    flex-wrap: wrap;
}

/* ═══ 반응형 — 태블릿 ═══ */
@media (max-width: 1024px) {
    #wrapper { padding: 0 24px; }
    .nh-header, .nh-nav { padding: 0 24px; }
    .nh-footer { padding: 48px 24px 28px; }
    .nh-grid { grid-template-columns: repeat(3, 1fr); gap: 32px 16px; }
    .nh-footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
    .nh-search { max-width: 240px; }
}

/* ═══ 반응형 — 모바일 ═══ */
@media (max-width: 768px) {
    #wrapper { padding: 0 16px; }
    .nh-announce { font-size: 10px; padding: 8px 12px; }
    .nh-header { padding: 0 16px; }
    .nh-header-inner { height: auto; flex-wrap: wrap; padding: 12px 0; gap: 10px; }
    .nh-logo { font-size: 20px; letter-spacing: 3px; }
    .nh-search { order: 3; flex-basis: 100%; max-width: none; }
    .nh-utils { gap: 12px; font-size: 11px; margin-left: auto; }
    .nh-nav { padding: 0 16px; }
    .nh-nav a { padding: 12px 12px; font-size: 11px; }

    .nh-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }

    /* 모바일: 터치 기기라 hover 없이 항상 버튼 노출 */
    .nh-item-actions { opacity: 1; transform: none; }
    .nh-item-actions button { font-size: 10px; padding: 9px 0; }

    #sct_location, .sct_lct { font-size: 18px; padding: 32px 0 6px; }

    .nh-footer { padding: 40px 16px 24px; }
    .nh-footer-top { grid-template-columns: 1fr; gap: 28px; padding-bottom: 32px; }
    .nh-footer-bottom { flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
    .nh-logo { font-size: 18px; letter-spacing: 2px; }
    .nh-grid { gap: 24px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ═══════════════════════════════════════════
   v2 추가: 배경 화이트 통일 + 검색페이지 정리
   ═══════════════════════════════════════════ */

/* 모든 배경 화이트 통일 */
html, body, #wrapper, #container, .shop-content,
#sct_wrap, .sct_wrap, #sidx, .idx_wrap {
    background: #fff !important;
}

.shop-content {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#container {
    border: none !important;
    padding: 0 !important;
}

/* ─── 검색 페이지 (search.php) 정리 ─── */

/* 검색 결과 타이틀 */
#sch_result, .sch_result {
    font-size: 13px;
    color: #888;
    letter-spacing: 1px;
    padding: 8px 0 24px;
}

/* 재검색 폼 박스 */
#sch_frm, .sch_frm {
    background: #f7f7f7 !important;
    border: none !important;
    padding: 24px !important;
    margin-bottom: 32px;
}

#sch_frm input[type=text],
.sch_frm input[type=text] {
    border: 1px solid #ddd !important;
    padding: 8px 12px !important;
    font-size: 12px;
    font-family: 'Noto Sans KR', sans-serif;
    background: #fff;
}

#sch_frm .btn_submit,
.sch_frm .btn_submit,
#sch_frm button[type=submit] {
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 18px !important;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
}

#sch_frm label, .sch_frm label {
    font-size: 12px;
    color: #666;
    margin-right: 10px;
}

#sch_frm input[type=checkbox] { margin-right: 3px; }

/* 검색 분류 목록 */
#sch_ct, .sch_ct {
    padding: 0 0 20px;
    font-size: 12px;
}

#sch_ct a, .sch_ct a {
    color: #888;
    text-decoration: none;
    margin-right: 14px;
}

#sch_ct a:hover { color: #c8102e; }

/* 검색페이지 정렬 링크 (ul/목록형으로 나오는 경우) */
#sch_sort, .sch_sort,
#sct_sort_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
    list-style: none;
    padding: 10px 0 !important;
    margin: 0 0 28px !important;
    border-bottom: 1px solid #111 !important;
    background: none !important;
}

#sch_sort li, .sch_sort li { list-style: none; }

#sch_sort a, .sch_sort a {
    font-size: 11px;
    letter-spacing: 1px;
    color: #888;
    text-decoration: none;
}

#sch_sort a:hover, #sch_sort a.on { color: #c8102e; }

/* 검색페이지에서 정렬이 일반 링크 나열로 나올 때 대비:
   상품검색결과 영역 내부 링크 정리 */
.is_search .shop-content > a,
.is_search #sct_sort_anchor a {
    display: inline-block;
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
    margin-right: 14px;
    text-decoration: none;
    padding: 4px 0;
}

/* 설정 톱니바퀴 아이콘 (관리자 전용 링크) 숨김보다 축소 */
.shop-content .sct_admin, .lct_admin { opacity: .4; }

/* 리스트 페이지 상단 카테고리 select/경로 영역 */
#sct_location select, .sct_lct select {
    border: 1px solid #ddd;
    padding: 5px 8px;
    font-size: 12px;
    font-family: 'Noto Sans KR', sans-serif;
    background: #fff;
}

/* 페이지 하단 여백 통일 */
.shop-content { padding-bottom: 40px !important; }
