/* =========================================
   1. 기본 설정 및 변수 (Variables & Base)
   ========================================= */
:root {
    /* Brand Colors */
    --primary-color: #3a57ff;
    --brand-orange: #e85d04; /* 바크로 오렌지 */
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    
    /* Grade Colors */
    --grade-3: #ff4757; /* Three Lips */
    --grade-2: #ffa502; /* Two Lips */
    --grade-1: #2ed573; /* One Lip */
    
    /* Master Badge Color */
    --master-gold: #FFD700;
    --master-gradient: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
}

body { 
    font-family: 'Pretendard', sans-serif; 
    background-color: #f4f6f9; 
    color: #333; 
}

a { text-decoration: none; }


/* =========================================
   2. 네비게이션 바 (Navbar)
   ========================================= */
.navbar { 
    background: rgba(26, 26, 46, 0.95); 
    backdrop-filter: blur(10px); 
    padding: 15px 0; 
}
.navbar-brand { 
    font-weight: 800; 
    font-size: 1.5rem; 
    color: #fff !important; 
    letter-spacing: -1px; 
}
.nav-link { 
    color: rgba(255,255,255,0.7) !important; 
    font-weight: 500; 
    margin-left: 20px; 
    transition: 0.3s; 
}
.nav-link:hover, .nav-link.active { 
    color: #fff !important; 
}
.btn-apply { 
    background: var(--primary-color); 
    color: white; 
    border-radius: 30px; 
    padding: 8px 25px; 
    font-weight: 600; 
    border: none;
}


/* =========================================
   3. 메인 히어로 섹션 (Home Hero)
   ========================================= */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f172a 100%);
    color: #fff;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 300px; height: 300px; background: radial-gradient(circle, rgba(232, 93, 4, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 1.2rem; opacity: 0.8; margin-bottom: 40px; font-weight: 300; }


/* =========================================
   4. 등급 카드 및 공통 요소 (Grade & Common)
   ========================================= */
.grade-badge {
    display: inline-block; padding: 5px 15px; border-radius: 50px; 
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase; margin-bottom: 10px;
    letter-spacing: 1px;
}
.bg-grade-3 { background: linear-gradient(45deg, #ff4757, #ff6b81); color: white; }
.bg-grade-2 { background: linear-gradient(45deg, #ffa502, #eccc68); color: white; }
.bg-grade-1 { background: linear-gradient(45deg, #2ed573, #7bed9f); color: white; }

.grade-card {
    background: white; border-radius: 20px; padding: 40px; text-align: center;
    border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 100%; transition: 0.3s; position: relative; overflow: hidden;
}
.grade-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(232, 93, 4, 0.1); }

/* 입술 아이콘 (공통) */
.lip-container { 
    height: 60px; display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 25px; 
}
.lip-icon { 
    width: 45px; height: 45px; fill: var(--brand-orange); 
    filter: drop-shadow(0 3px 3px rgba(232, 93, 4, 0.3));
}

/* 마스터 뱃지 (공통 - 메인/리스트 모두 사용) */
.badge-master {
    background: var(--master-gradient);
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 필터 버튼 (공통) */
.filter-btn {
    border: 1px solid #ddd; background: white; padding: 10px 25px; border-radius: 50px;
    margin: 0 5px; color: #555; font-weight: 600; transition: 0.3s;
}
.filter-btn.active, .filter-btn:hover { background: var(--dark-bg); color: white; border-color: var(--dark-bg); }


/* =========================================
   5. [메인 전용] 샵 카드 (.shop-card)
   ※ 보내주신 원본 스타일 유지
   ========================================= */
.shop-card {
    position: relative; border-radius: 20px; overflow: hidden; height: 350px;
    color: white; margin-bottom: 30px; cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.shop-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.shop-card:hover img { transform: scale(1.1); }

/* 메인 카드 오버레이 */
.card-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    z-index: 2;
}
.hover-overlay {
    position: absolute; inset: 0;
    background: rgba(26, 26, 46, 0.95);
    padding: 30px;
    display: flex; flex-direction: column; justify-content: center;
    opacity: 0; transition: 0.4s; z-index: 3;
    text-align: center;
}
.shop-card:hover .hover-overlay { opacity: 1; }

.card-lips { display: flex; justify-content: center; gap: 3px; margin-bottom: 10px; }
.card-lips .lip-icon { width: 25px; height: 25px; fill: #fff; filter: none; }


/* =========================================
   6. [마스터 페이지 전용] 스타일
   ========================================= */
.master-hero {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    padding: 150px 0 100px;
    color: white;
    position: relative;
}
.text-gold { color: #FFD700 !important; }
.bg-gold { background-color: #FFD700 !important; color: #000; }

.curriculum-card {
    background: white;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 15px;
    height: 100%;
    transition: 0.3s;
}
.curriculum-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #FFD700;
}
.step-num {
    font-size: 2rem; font-weight: 800; color: #eee; margin-bottom: 15px;
}
.curriculum-card:hover .step-num { color: #FFD700; }


/* =========================================
   7. [리스트 페이지 전용] 스타일
   ※ 메인 카드(.shop-card)와 충돌나지 않게 .list-card로 분리
   ========================================= */
.list-header {
    background: var(--dark-bg);
    padding: 120px 0 60px;
    color: white;
    text-align: center;
}

/* 필터 박스 */
.filter-box {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: -40px; /* 헤더 겹침 효과 */
    position: relative;
    z-index: 10;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 0.25rem rgba(232, 93, 4, 0.25);
}

/* 리스트 전용 카드 (.list-card) */
.list-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: 0.3s;
    height: 100%;
    position: relative;
}
.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--brand-orange);
}

/* 리스트 카드 이미지 영역 */
.shop-thumb {
    height: 220px;
    position: relative;
    overflow: hidden;
}
.shop-thumb img {
    width: 100%; height: 100%; object-fit: cover; transition: 0.5s;
}
.list-card:hover .shop-thumb img { transform: scale(1.05); }

/* 리스트 카드 위 뱃지 (절대 위치) */
.badge-grade-abs {
    position: absolute; top: 15px; left: 15px;
    padding: 6px 12px; border-radius: 30px;
    font-size: 0.75rem; font-weight: 800; color: white;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.bg-g3 { background: var(--grade-3); }
.bg-g2 { background: var(--grade-2); }
.bg-g1 { background: var(--grade-1); }

.badge-master-abs {
    position: absolute; top: 15px; right: 15px;
    background: var(--master-gradient);
    color: black;
    font-weight: 800; font-size: 0.75rem;
    padding: 6px 12px; border-radius: 30px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 리스트용 작은 아이콘 & 태그 */
.lip-icon-sm { width: 18px; height: 18px; margin-right: 2px; filter: none; }
.fill-g3 { fill: var(--grade-3); }
.fill-g2 { fill: var(--grade-2); }
.fill-g1 { fill: var(--grade-1); }

.shop-tag {
    font-size: 0.8rem; color: #666; background: #f1f3f5;
    padding: 4px 10px; border-radius: 4px; margin-right: 5px; margin-bottom: 5px; display: inline-block;
}

/* 페이지네이션 */
.page-link { color: #333; border: none; margin: 0 5px; border-radius: 5px; }
.page-link.active { background-color: var(--brand-orange); color: white; }
.page-link:hover { color: var(--brand-orange); background-color: #eee; }


/* =========================================
   8. 아코디언 & 푸터 (Common Footer & Misc)
   ========================================= */
.accordion-button:not(.collapsed) { 
    background-color: #f0f2ff; 
    color: var(--primary-color); 
}
.accordion-button:focus { 
    box-shadow: none; 
    border-color: rgba(0,0,0,.125); 
}

footer { 
    background: var(--dark-bg); 
    color: #aaa; 
    padding: 60px 0; 
}
footer h5 { 
    color: white; 
    font-weight: 700; 
    margin-bottom: 20px; 
}
footer ul li { margin-bottom: 10px; }
footer a { 
    color: #aaa; 
    text-decoration: none; 
}
footer a:hover { color: white; }

/* =========================================
   9. 반응형 (Responsive)
   ========================================= */
@media(max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-stats { flex-direction: column; gap: 20px; }
}