@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

* { box-sizing: border-box; font-family: 'Noto Sans KR', sans-serif; }
body { background-color: #f5f6f7; margin: 0; padding: 40px 10px; color: #333; }

.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 8px solid #03c75a; 
}

.form-header { text-align: center; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.form-header h1 { font-size: 24px; margin: 0 0 10px 0; color: #222; }
.form-header p { color: #666; font-size: 14px; margin: 0; }

.form-group { margin-bottom: 25px; }
.form-group label {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 500; margin-bottom: 8px; font-size: 15px;
}

input[type="text"], input[type="tel"], input[type="number"], select, textarea {
    width: 100%; padding: 12px;
    border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; outline: none; transition: border 0.2s;
    background-color: #fafafa;
}
input:focus, select:focus, textarea:focus { border-color: #03c75a; background-color: #fff; }
textarea { resize: none; overflow: hidden; } 

/* --- [신규 추가] 길이 직접 입력창 전용 스타일 --- */
input[type="number"]#barLength {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px; /* 모바일 기기 터치 시 화면 자동 확대(줌) 현상 방지 */
    font-weight: bold;
    color: #333;
    background-color: #fff;
}

input[type="number"]#barLength:focus {
    border-color: #03c75a;
    box-shadow: 0 0 5px rgba(3, 199, 90, 0.2);
    outline: none;
}
/* ------------------------------------------------- */

.guide-btn {
    background: #eff3f6; color: #4b5a6c; border: 1px solid #d2dbe2;
    padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer;
}
.guide-btn:hover { background: #e1e8ed; }

.flex-row { display: flex; gap: 10px; }
.qty-control { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button {
    background: #f8f9fa; border: none; width: 40px; height: 100%; cursor: pointer; font-size: 18px; color:#555;
}
.qty-control button:hover { background: #e9ecef; }
.qty-control input { border: none; border-radius: 0; text-align: center; width: 100%; padding: 0; }

.email-input-group { display: flex; align-items: center; gap: 5px; }
.email-input-group span { font-weight: bold; color: #777; }

.section-title { font-size: 18px; font-weight: bold; margin: 40px 0 15px 0; border-bottom: 2px solid #333; padding-bottom: 10px; }
.privacy-box {
    background: #f8f9fa; border: 1px solid #eee; padding: 15px; border-radius: 6px;
    font-size: 13px; color: #555; margin-bottom: 20px;
}
.privacy-box ul { padding-left: 20px; margin: 10px 0; }
.checkbox-label { font-weight: bold; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap:8px;}
.checkbox-label input { width: 18px; height: 18px; cursor: pointer; accent-color: #03c75a; }

.btn-secondary { background: #fff; border: 1px solid #ccc; padding: 12px 15px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-secondary:hover { background: #f8f9fa; }
.submit-btn {
    width: 100%; background: #03c75a; color: #fff; font-size: 18px;
    font-weight: bold; padding: 16px; border: none; border-radius: 6px;
    cursor: pointer; margin-top: 20px; transition: background 0.3s;
}
.submit-btn:hover { background: #02b350; }

.admin-trigger { width: 20px; height: 20px; border-radius: 50%; background: transparent; margin: 30px auto 0; cursor: default; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); justify-content: center; align-items: center; }
/* --- 팝업창(모달) 닫기 버튼 개선 스타일 --- */

.modal-content {
    background: #fff;
    padding: 15px; /* 내부 여백 조정 */
    border-radius: 8px;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto; /* 세로 스크롤 허용 */
    text-align: center;
}

.close {
    /* 스크롤을 내려도 상단에 고정되도록 설정 */
    position: sticky; 
    top: 0; 
    float: right; 
    z-index: 1001; /* 이미지보다 위에 표시 */
    
    /* 시인성 개선: 검정색 원형 배경에 흰색 X */
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.6); /* 반투명 검정 배경 */
    color: #ffffff; /* 순백색 X 표시 */
    border-radius: 50%; /* 원형 모양 */
    
    /* 중앙 정렬 */
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    margin-bottom: -36px; /* 이미지 영역을 가리지 않기 위한 음수 마진 */
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* 입체감 추가 */
}

.close:hover {
    background-color: #03c75a; /* 마우스 올리면 네이버 포인트 색상(초록색)으로 변경 */
    color: #fff;
    transform: scale(1.1); /* 약간 커지는 효과 */
}

/* 이미지 하단 여백 확보 */
.modal-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 10px; /* 버튼과의 간격 */
}
/* 장바구니 관련 스타일 */
.item-input-section { background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 20px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.btn-add-cart { width: 100%; background: #fff; color: #03c75a; border: 2px solid #03c75a; font-size: 16px; font-weight: bold; padding: 14px; border-radius: 6px; cursor: pointer; margin-bottom: 30px; transition: 0.2s; }
.btn-add-cart:hover { background: #eefaf2; }
.cart-container { background: #fff; border: 1px solid #ddd; padding: 15px; border-radius: 8px; margin-bottom: 40px; min-height: 80px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding: 12px 0; }
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; font-size: 13px; line-height: 1.6; color: #555; padding-right: 15px; }
.cart-item-info strong { font-size: 15px; color: #111; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-qty { width: 28px; height: 28px; background: #fff; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1; }
.btn-qty:hover { background: #f0f0f0; }
.cart-qty-text { font-weight: bold; width: 30px; text-align: center; font-size: 14px;}
.btn-edit { background: #fff; color: #0066cc; border: 1px solid #0066cc; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-del { background: #fff; color: #cc0000; border: 1px solid #cc0000; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }

@media (max-width: 600px) {
    .email-input-group { flex-direction: column; align-items: stretch; }
    .email-input-group span { display: none; }
    .form-container { padding: 20px; border-radius: 0; }
}