/* ============================================
   BTL English 사용자단 스타일
   주색: #5a1c89 (보라) / 밝고 친근한 키즈 교재몰 톤
   ============================================ */

:root {
    --primary:        #5a1c89;
    --primary-dark:   #45156a;
    --primary-deep:   #3a1158;
    --primary-soft:   #8b5cf6;
    --primary-bg:     #f6f2fb;   /* 연보라 배경 */
    --primary-tint:   #ede5f7;   /* 연보라 강조 배경 */
    --primary-border: #ddcfee;
    --accent:         #f76707;   /* 가격·포인트용 따뜻한 오렌지 */
    --accent-soft:    #fff4e6;
    --text:           #2d2236;
    --text-muted:     #8b8395;
    --line:           #e9e2f2;
    --white:          #ffffff;
    --radius:         12px;
    --radius-sm:      8px;
    --shadow:         0 2px 12px rgba(90, 28, 137, 0.08);
    --shadow-hover:   0 8px 24px rgba(90, 28, 137, 0.16);
}

/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Apple SD Gothic Neo', '맑은 고딕', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--primary-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 */
header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(90, 28, 137, 0.08);
}

/* 상단 바: 로고 + 유틸리티 메뉴 */
.header-top {
    border-bottom: 1px solid var(--line);
}

.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}

.header-top-inner h1 {
    margin: 0;
    font-size: 1.8rem;
}

.header-top-inner h1 a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
}

.header-logo {
    height: 44px;
    width: auto;
    display: block;
}

.util-nav {
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.util-nav li a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.util-nav li a:hover {
    background-color: var(--primary-tint);
    color: var(--primary);
}

.util-nav li a.active {
    background-color: var(--primary);
    color: var(--white);
}

/* 하단 메인 메뉴 */
.main-nav {
    background: linear-gradient(90deg, var(--primary) 0%, #7b2cbf 100%);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-nav ul li a {
    display: block;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    padding: 13px 36px;
    font-size: 0.98rem;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background-color: rgba(255,255,255,0.16);
    color: var(--white);
}

/* 메인 콘텐츠 */
main {
    background-color: var(--white);
    margin: 24px auto;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 500px;
}

/* 히어로 섹션 */
.hero {
    text-align: center;
    padding: 48px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, var(--primary) 60%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.05rem;
    opacity: 0.9;
}

/* 상품 그리드 */
.products {
    margin-top: 30px;
}

.products h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 800;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-item {
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-border);
}

.product-item img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.product-item h4 {
    margin: 15px 0 10px;
    font-size: 1.15rem;
    color: var(--text);
}

.product-item .product-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.5;
}

.product-item .price {
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: bold;
    margin: 10px 0;
}

/* 상품 상세 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-image img {
    width: 100%;
    border-radius: var(--radius);
}

.product-info h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.category {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.price-info {
    background-color: var(--primary-bg);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
}

.price-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.price-value {
    font-size: 2rem;
    color: var(--accent);
    font-weight: bold;
    margin: 5px 0;
}

.price-original {
    font-size: 0.9rem;
    color: #95a5a6;
    text-decoration: line-through;
}

.product-options {
    margin: 20px 0;
}

.product-options label {
    display: inline-block;
    margin-right: 10px;
}

.product-options input {
    width: 80px;
    padding: 5px;
    font-size: 1rem;
}

.product-actions {
    margin: 20px 0;
}

.product-description {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color 0.25s, box-shadow 0.25s;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    line-height: normal;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn-primary {
    background-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #b1a8be;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #978cab;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-disabled {
    background-color: #cfc8d8;
    cursor: not-allowed;
}

/* 폼 스타일 */
.form-style {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d8d0e4;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 28, 137, 0.12);
}

.form-group input[type="radio"] {
    margin-right: 5px;
    accent-color: var(--primary);
}

.form-group input[type="radio"] + label {
    display: inline;
    margin-right: 20px;
    font-weight: normal;
}

.hidden {
    display: none !important;
}

hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 30px 0;
}

/* 로그인 컨테이너 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}

.form-links {
    text-align: center;
    margin-top: 20px;
}

.form-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-links a:hover {
    text-decoration: underline;
}

.test-login {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--primary-bg);
    border-radius: var(--radius);
    text-align: center;
}

.test-login h3 {
    margin-bottom: 10px;
}

.test-login p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.test-login .btn {
    margin: 5px;
}

/* 푸터 */
footer {
    background-color: var(--primary-deep);
    color: rgba(255,255,255,0.85);
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
}

/* 반응형 */
@media (max-width: 768px) {
    .header-top-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .util-nav {
        flex-wrap: wrap;
        gap: 4px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .main-nav ul li a {
        padding: 12px 22px;
    }
}

/* 비밀번호 표시 토글 */
.pw-field {
    position: relative;
}
.pw-field input {
    padding-right: 42px;
    width: 100%;
    box-sizing: border-box;
}
.btn-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a99fc0;
    padding: 4px;
    display: flex;
    align-items: center;
    line-height: 1;
}
.btn-pw-toggle:hover {
    color: var(--primary);
}
