/* BASIC css start */
/* =====================================================================
   NAILMALL RENEWAL · PC 메인  (디자이너 시안 "메인페이지.jpg" 기준)
   색·글꼴 변수(--nr-*)와 .nm-inner, .nm-img-slot 은 상단 CSS 에 정의되어 있다.
   ===================================================================== */

.nm-main { padding-bottom: 20px; }
.nm-main a { color: inherit; text-decoration: none; }
.nm-main ul { margin: 0; padding: 0; list-style: none; }
.nm-main p { margin: 0; }

/* ---------- 메인 배너: 화면 전체 폭 ---------- */
/* .nm-main 을 붙인 이유: 상단 CSS 의 ":is(.nm-main, …) section { margin-left: 0 }" 이
   .nm-hero 하나만 쓴 선택자보다 우선해서 배너가 가운데 칸 기준으로 밀려 있었다 */
.nm-main .nm-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: #f2f2f2;
}
.nm-hero img { display: block; width: 100%; height: auto; }
.nm-hero-nav {
    position: absolute;
    right: max(24px, calc(50vw - 640px));
    bottom: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    color: #fff;
}
.nm-hero-nav button {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.nm-hero-nav svg { width: 16px; height: 16px; }
.nm-hero .nm-hero-page.swiper-pagination {
    position: static;
    width: auto;
    min-width: 44px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #fff;
}
.nm-hero .swiper-pagination-total { opacity: .6; }

/* ---------- 섹션 공통 ---------- */
.nm-sec { margin-top: 96px; }
.nm-sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.nm-sec-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--nr-ink); line-height: 1.2; }
.nm-sec-title.is-en { font-family: var(--nr-font-en); font-weight: 700; letter-spacing: 0; }
.nm-sec-title small { font-size: .8em; }
.nm-sec-title .nm-sec-sub { margin-left: 8px; font-family: var(--nr-font); font-size: 15px; font-weight: 500; color: var(--nr-sub); }

/* ---------- 빈 진열 구역 숨기기 ----------
   상품이 0개인 진열 구역(data-hide-empty)은 빈 상자를 보이지 않게 통째로 숨긴다.
   두 규칙으로 나눈 까닭: 선택자 목록에 :has() 가 하나라도 있으면 :has() 를 모르는 브라우저는 그 규칙 전체를 버린다.
   그래서 script.js 가 붙이는 .is-empty (모든 브라우저) 와 :has() (스크립트 전에도 바로 숨김) 를 따로 둔다 */
.nm-main [data-hide-empty].is-empty,
.nm-focus-col.is-empty { display: none; }
.nm-main [data-hide-empty]:not(:has(.nm-card, .nm-focus-list li)),
.nm-focus-col:not(:has(.nm-focus-list li)) { display: none; }

/* ---------- 자동 진열 기다리기 (BEST ITEM) ----------
   자동 순위 피드를 기다리는 동안 BEST ITEM 상품 줄은 자리는 그대로 차지한 채 투명하게 둔다 (순서가 바뀌는 모습이 보이지 않고,
   아래 구역도 밀리지 않는다). script.js 가 순서를 정하면 .is-auto-done 으로 보이고, 스크립트가 없거나 늦어도
   3초 뒤에는 CSS 만으로 보인다 (script.js FEED_TIMEOUT_MS 와 같은 3초) */
.nm-main [data-auto="best"] { opacity: 0; animation: nm-auto-reveal .2s ease-out 3s forwards; }
.nm-main [data-auto="best"].is-auto-done { opacity: 1; animation: none; transition: opacity .2s ease-out; }
@keyframes nm-auto-reveal { to { opacity: 1; } }
/* 자동 진열 목록은 카드 차례가 바뀌어도 줄 높이가 같도록 상품명 자리를 늘 두 줄(1.45 × 2)로 잡는다.
   그래도 낮아지면 script.js 가 처음 높이를 min-height 로 잡아 둔다 */
.nm-main .nm-grid[data-auto] .nm-card-name { min-height: 2.9em; }
.nm-sec-more { font-size: 13px; color: var(--nr-sub) !important; }
.nm-moreview { margin-top: 44px; text-align: center; }
.nm-moreview a {
    display: inline-block;
    padding: 8px 12px;
    font-family: var(--nr-font-en);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--nr-ink) !important;
}

/* 상품 그리드 · 카드(.nm-grid, .nm-card)는 목록 페이지와 함께 쓰므로 상단 CSS 에 있다 */

/* ---------- 혜택 배너 2개 · 알림 배너 ---------- */
.nm-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.nm-duo-item, .nm-notice-bnr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 36px;
    overflow: hidden;
}
.nm-duo-item { height: 160px; }
.nm-duo-item.is-mint { background: #e3f1e8; }
.nm-duo-item.is-lilac { background: #f1e6f6; }
.nm-duo-item .nm-img-slot { width: 200px; height: 130px; flex: none; }
.nm-duo-text { font-size: 13px; line-height: 1.6; color: var(--nr-sub); }
.nm-duo-text strong { display: block; margin-bottom: 8px; font-size: 21px; font-weight: 800; color: var(--nr-ink); letter-spacing: -.02em; }
.nm-notice-bnr { height: 96px; margin-top: 96px; background: #fde8e3; }
.nm-notice-bnr .nm-img-slot { width: 320px; height: 76px; flex: none; }
.nm-notice-bnr strong { margin-bottom: 4px; }

/* ---------- 기획전 타일 ---------- */
.nm-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 96px; }
.nm-tile {
    display: flex;
    height: 150px;
    overflow: hidden;
    background: #f6f5f3;
}
.nm-tile-text { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 22px; font-size: 12px; line-height: 1.5; color: var(--nr-sub); }
.nm-tile-text em { font-style: normal; font-family: var(--nr-font-en); font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--nr-ink); }
.nm-tile-text strong { margin: 6px 0 4px; font-size: 17px; font-weight: 800; color: var(--nr-ink); letter-spacing: -.02em; }
.nm-tile img { width: 46%; height: 100%; object-fit: cover; flex: none; transition: transform .4s ease; }
.nm-tile:hover img { transform: scale(1.05); }

/* ---------- 와이드 배너 ---------- */
.nm-wide-bnr { position: relative; display: block; height: 240px; margin-top: 24px; overflow: hidden; }
.nm-wide-bnr .nm-img-slot { width: 100%; height: 100%; background-color: #dfe8d6; }
.nm-wide-text {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--nr-sub);
    text-align: left;
}
.nm-wide-text em { display: block; font-style: normal; font-family: var(--nr-font-en); font-size: 11px; letter-spacing: .2em; }
.nm-wide-text strong { display: block; margin: 4px 0 10px; font-family: var(--nr-font-en); font-size: 34px; font-weight: 600; letter-spacing: .06em; color: var(--nr-ink); }

/* ---------- FOCUS on Nails ---------- */
/* 칸이 숨으면(상품 없음) 남은 칸이 폭을 나눠 쓴다 */
.nm-focus { display: flex; gap: 16px; }
.nm-focus-col { flex: 1 1 0; min-width: 0; }
.nm-focus-visual { position: relative; display: block; height: 300px; overflow: hidden; }
.nm-focus-visual .nm-img-slot { width: 100%; height: 100%; align-items: flex-end; justify-content: flex-end; padding: 10px; box-sizing: border-box; }
.nm-focus-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .28);
    color: #fff;
    font-size: 13px;
}
.nm-focus-caption strong { margin-bottom: 4px; font-family: var(--nr-font-en); font-size: 22px; font-weight: 600; }
/* 대표 이미지가 없는 동안: 이미지 자리 없이 제목 글자만 (검정 글씨 + 아래 선) */
.nm-focus-visual.is-noimg { height: auto; }
.nm-focus-visual.is-noimg .nm-focus-caption {
    position: static;
    align-items: flex-start;
    padding: 0 0 14px;
    border-bottom: 2px solid var(--nr-ink);
    background: none;
    color: var(--nr-sub);
}
.nm-focus-visual.is-noimg .nm-focus-caption strong { font-size: 20px; color: var(--nr-ink); }
.nm-focus-list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--nr-line); }
.nm-focus-thumb { flex: none; width: 72px; height: 72px; overflow: hidden; background: #f4f4f4; }
.nm-focus-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nm-focus-list .nm-card-name { font-size: 13px; }
.nm-focus-list .nm-card-price { margin-top: 6px !important; }
.nm-focus-list .nm-card-price strong { font-size: 14px; }
.nm-focus-list .nm-price-pct { color: var(--nr-pink); }

/* ---------- REAL REVIEW (자리) ---------- */
.nm-review { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.nm-review-card { padding: 16px; border: 1px solid var(--nr-line); }
.nm-review-card .nm-img-slot { aspect-ratio: 1 / 1; margin-bottom: 14px; }
.nm-review-name { font-size: 13px; color: var(--nr-text); }
.nm-review-score { margin: 8px 0 !important; font-size: 13px; font-weight: 700; color: var(--nr-ink); }
.nm-review-score span { color: var(--nr-ink); letter-spacing: 1px; }
.nm-review-score em { float: right; font-style: normal; font-weight: 400; color: var(--nr-muted); }
.nm-review-text { font-size: 12px; color: var(--nr-muted); }

@media (prefers-reduced-motion: reduce) {
    .nm-card-thumb img, .nm-tile img { transition: none; }
    .nm-main [data-auto="best"] { animation-duration: .01s; }
    .nm-main [data-auto="best"].is-auto-done { transition: none; }
}

/* ---------- EVENT: 정사각형 이벤트 슬라이드 (원본 #subBnr) ---------- */
.nm-slide-nav { display: flex; align-items: center; gap: 6px; }
.nm-slide-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--nr-line);
    border-radius: 50%;
    background: #fff;
    color: var(--nr-ink);
    cursor: pointer;
}
.nm-slide-nav button:hover { border-color: var(--nr-ink); }
.nm-slide-nav svg { width: 16px; height: 16px; }
.nm-event-page { min-width: 52px; font-family: var(--nr-font-en); font-size: 13px; font-weight: 600; color: var(--nr-ink); text-align: center; }
.nm-event-page .swiper-pagination-total { color: var(--nr-muted); }
.nm-event { overflow: hidden; }
.nm-event .swiper-wrapper { margin: 0; padding: 0; list-style: none; }
.nm-event-item { display: block; }
.nm-event-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #f4f4f4; }
.nm-event-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.nm-event-item:hover .nm-event-thumb img { transform: scale(1.04); }
.nm-event-sub { display: block; margin-top: 16px; font-size: 13px; color: var(--nr-accent); font-weight: 600; }
.nm-event-title { display: block; margin-top: 4px; font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--nr-ink); }

/* 창고정리 SALE 카드: 운영 메인 이벤트 슬라이드의 nmws 카드 (사진 대신 글자). 크기는 썸네일 칸(정사각형)을 따른다.
   운영의 둥근 모서리만 빼고(리뉴얼 썸네일은 각진 모서리) 글자 비율·색은 그대로 */
.nmws-box { position: relative; container-type: inline-size; }
.nmws { position: absolute; inset: 0; overflow: hidden; background: #f3efe9; font-family: 'Pretendard', 'Noto Sans KR', sans-serif; text-align: left; }
.nmws::before { content: 'SALE'; position: absolute; right: -4%; top: 8%; font-family: 'Montserrat', 'Pretendard', sans-serif; font-size: 34cqw; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px #ddd3c6; }
.nmws-in { position: relative; display: block; padding: 9cqw 8cqw 0; }
.nmws-tag { display: flex; align-items: center; gap: 2.5cqw; margin: 0; font-family: 'Montserrat', 'Pretendard', sans-serif; font-size: 3.6cqw; font-weight: 700; letter-spacing: .18em; color: #ff6b2c; }
.nmws-tag::before { content: ''; width: 7cqw; height: 2px; background: #ff6b2c; }
.nmws-pct { display: flex; align-items: flex-end; gap: 2.5cqw; margin: 6cqw 0 0; font-family: 'Montserrat', 'Pretendard', sans-serif; line-height: .8; }
.nmws-pct b { font-size: 30cqw; font-weight: 800; letter-spacing: -.05em; color: #ff6b2c; }
.nmws-pct span { display: flex; flex-direction: column; gap: 1.5cqw; padding-bottom: 1cqw; font-size: 4.4cqw; font-weight: 700; line-height: 1; color: #111; }
.nmws-pct i { font-style: normal; font-size: 12cqw; font-weight: 800; color: #ff6b2c; }

/* ---------- RECOMMEND: 추천상품 전체 피드 (원본 HOT 추천상품) ---------- */
.nm-feed .nm-card.is-hidden { display: none; }
.nm-feed-more[hidden] { display: none; }
/* 공통 CSS 의 "button span { visibility: hidden }" 을 되돌린다 */
.nm-feed-more button span { visibility: visible; }
.nm-feed-more button {
    padding: 8px 12px;
    border: 0;
    background: transparent;
    font-family: var(--nr-font-en);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--nr-ink);
    cursor: pointer;
}

/* ---------- INSTAGRAM (원본 #insta, SnapWidget) ---------- */
.nm-insta { position: relative; aspect-ratio: 3 / 1; overflow: hidden; background: #f4f4f4; }
.nm-insta iframe { display: block; width: 100%; height: 100%; border: 0; }
.nm-insta-link { position: absolute; inset: 0; z-index: 2; }
#nm-insta { margin-bottom: 24px; }

/* BASIC css end */

