@font-face {
    font-family: 'jalnan';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_four@1.2/JalnanOTF00.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* --- 공통 스타일 --- */
body {
    font-family: sans-serif;
    padding: 20px;
    max-width: 960px;
    margin: 0 auto;
}

h1,
h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* --- 이미지 그리드 스타일 (admin, view 공통) --- */
.image-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* hunter/static/css/style.css */

.grid-item {
    border-radius: 8px;
    /* padding: 5px;  <-- 이 줄을 아래와 같이 수정 */
    padding: 0px 0px 10px;
    /* 위: 5px, 좌우: 5px, 아래: 40px */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


.grid-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}


/* hunter/static/css/style.css */

.grid-item .item-name {
    font-family: 'jalnan', sans-serif;
    /* font-size: 25px;  <-- 이 줄을 아래 코드로 변경 */
    font-size: clamp(16px, 2.5vw, 28px);
    /* 최소 16px, 최대 28px, 평소엔 화면너비의 2.5% */
    color: white;
    text-align: center;
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;

    /* ... text-shadow 속성은 그대로 ... */
    text-shadow:
        -2px -2px 0 #000,
        0 -2px 0 #000,
        2px -2px 0 #000,
        2px 0 0 #000,
        2px 2px 0 #000,
        0 2px 0 #000,
        -2px 2px 0 #000,
        -2px 0 0 #000;
}

/* 이 부분을 아래 코드로 교체 */
.grid-item .item-price {
    /* --- 상품명과 거의 동일하게 스타일 변경 --- */
    font-family: 'jalnan', sans-serif;
    font-size: clamp(16px, 4.5vw, 50px);
    /* 상품명과 같은 크기 */
    color: red;
    /* 글씨는 빨간색 */
    text-align: center;
    /* 가운데 정렬 */

    position: absolute;
    top: 0px;
    /* 위쪽 위치는 유지 */
    left: 0;
    right: 0;

    /* 기존 배경, 패딩 등은 모두 초기화 */
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-weight: normal;

    /* 흰색 테두리 효과 (text-shadow) */
    text-shadow:
        -2.5px -2.5px 0 #FFF,
        0 -2.5px 0 #FFF,
        2.5px -2.5px 0 #FFF,
        2.5px 0 0 #FFF,
        2.5px 2.5px 0 #FFF,
        0 2.5px 0 #FFF,
        -2.5px 2.5px 0 #FFF,
        -2.5px 0 0 #FFF;
}







/* --- 'SOLD OUT' 스타일 (admin, view 공통) --- */
.grid-item.sold-out img {
    opacity: 0.4;
    filter: grayscale(80%);
}

.grid-item.sold-out {
    cursor: not-allowed;
}

.grid-item.sold-out .item-name,
.grid-item.sold-out .item-price {
    color: #888 !important;
    /* 글자색을 회색으로 변경 */
    text-shadow:
        -2px -2px 0 #333,
        0 -2px 0 #333,
        2px -2px 0 #333,
        2px 0 0 #333,
        2px 2px 0 #333,
        0 2px 0 #333,
        -2px 2px 0 #333,
        -2px 0 0 #333;
    /* 테두리도 어둡게 변경 */
}

.grid-item.sold-out::after {
    content: 'SOLD OUT';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    padding: 8px 15px;
    border-radius: 5px;
    pointer-events: none;
    text-align: center;
    /* 글씨를 박스 안에서 가운데 정렬 */
    white-space: nowrap;
    /* 'SOLD OUT'이 두 줄로 나뉘는 것 방지 */
}

/* --- 관리자 페이지 전용 스타일 --- */
.controller-section {
    margin-bottom: 40px;
}

.grid-item:hover {
    border-color: #3498db;
    transform: scale(1.05);
}

textarea {
    width: 100%;
    height: 200px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
}

button.reset-btn {
    background-color: #95a5a6;
}

/* --- 뷰 페이지 전용 스타일 --- */
#html-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 뷰 페이지에서는 body 스타일 일부를 덮어씀 */
body.view-page {
    max-width: none;
    padding: 0;
}

.view-page .image-grid-container {
    padding: 15px;
}


/* --- 뷰 페이지 전용 호버/클릭 효과 비활성화 --- */

/* 뷰 페이지에서는 그리드 아이템의 커서를 기본 모양으로 변경 */
.view-page .grid-item {
    cursor: default;
}

/* 뷰 페이지에서는 그리드 아이템에 마우스를 올려도 아무 효과 없도록 설정 */
.view-page .grid-item:hover {
    transform: none;
}

#page-title {
    /* 17. 새 ID 선택자 추가 */
    font-family: 'jalnan', sans-serif;
    font-size: clamp(20px, 5vw, 30px);
    color: white;
    text-align: center;
    margin-top: 0px;
    margin-bottom: -15px;

    text-shadow:
        -2px -2px 0 #000,
        0 -2px 0 #000,
        2px -2px 0 #000,
        2px 0 0 #000,
        2px 2px 0 #000,
        0 2px 0 #000,
        -2px 2px 0 #000,
        -2px 0 0 #000;
}