@charset "utf-8";

/* =====================================================
   Perfume Library Clean CSS
===================================================== */


/* =========================
   Reset
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}


html{
    scroll-behavior:smooth;
}


body{

    font-family:
        "Pretendard",
        "Noto Sans KR",
        sans-serif;

    background:#f7f7f5;
    color:#2f2f2f;

    line-height:1.6;
}


/* =========================
   Variables
========================= */

:root{

    --primary:#c9a86a;
    --primary-dark:#b58d4c;

    --cream:#fcfaf5;

    --surface:#ffffff;

    --border:#eadcc5;

    --text:#332b22;

    --sub:#999;

}


/* =========================
   Header
========================= */


.library-header{

    background:#fff;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:28px 40px;

    border-bottom:1px solid var(--border);
}


.header-left h1{

    font-size:2rem;

}


.header-left p{

    color:var(--sub);

    margin-top:8px;

}



.back-button{

    display:flex;

    align-items:center;
    justify-content:center;

    background:var(--primary);

    color:white;

    text-decoration:none;

    padding:12px 20px;

    border-radius:12px;

    font-weight:600;

}



.back-button:hover{

    background:var(--primary-dark);

}



/* =========================
   Search
========================= */


.search-section{

    padding:22px 40px 10px;

}



.search-box{

    max-width:520px;

}



.search-box input{

    width:100%;

    height:42px;

    padding:0 16px;

    border-radius:14px;

    border:1px solid var(--border);

    background:white;

    outline:none;

}



/* =========================
   Family Navigation
========================= */


.family-nav{

    display:flex;

    flex-wrap:wrap;

    gap:8px;

    padding:12px 14px;

    margin:10px 40px 24px;


    background:var(--cream);

    border:1px solid var(--border);

    border-radius:18px;

}



.family-nav button{


    height:34px;

    padding:4px 12px;


    display:flex;

    align-items:center;

    justify-content:center;


    gap:5px;


    border-radius:999px;

    border:1px solid var(--border);

    background:white;


    color:#665032;


    font-size:.7rem;

    font-weight:600;


    white-space:nowrap;

    cursor:pointer;


}



.family-nav button.active{


    background:var(--primary);

    color:white;

    border-color:var(--primary);

}



.family-nav button span{


    display:flex;

    align-items:center;

    justify-content:center;

    line-height:1;

}


.family-nav button img,
.family-nav button svg{


    width:14px;

    height:14px;

    display:block;

    object-fit:contain;

}


/* =========================
   Chip Filter Panel
========================= */

.chip-filter-panel{

    display:flex;
    flex-direction:column;
    gap:10px;

    padding:14px 16px;
    margin:0 40px 24px;

    background:var(--cream);
    border:1px solid var(--border);
    border-radius:18px;

}

.chip-filter-row{

    display:grid;
    grid-template-columns:88px 1fr auto;
    align-items:start;
    gap:12px;

}

.chip-filter-label{

    height:34px;

    display:flex;
    align-items:center;

    font-size:.75rem;
    font-weight:700;
    color:var(--text);

}

.chip-filter-list{

    display:flex;
    flex-wrap:wrap;
    align-content:flex-start;
    gap:6px;

    max-height:34px;
    overflow:hidden;

}

.chip-filter-list.expanded{

    max-height:none;

}

.chip-filter-item{

    height:30px;
    padding:0 12px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:999px;
    border:1px solid var(--border);
    background:white;

    color:#665032;

    font-size:.7rem;
    font-weight:600;

    white-space:nowrap;
    cursor:pointer;

}

.chip-filter-item.active{

    background:var(--primary);
    color:white;
    border-color:var(--primary);

}

.chip-filter-toggle{

    height:34px;
    padding:0 10px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:999px;
    border:1px solid var(--border);
    background:white;

    color:var(--sub);

    font-size:.7rem;
    font-weight:600;

    white-space:nowrap;
    cursor:pointer;

}

/* =========================
   Main Layout
========================= */


.library-layout{


    display:grid;


    grid-template-columns:

        minmax(0,1fr)

        380px;


    gap:30px;


    padding:

        0 40px 40px;


    align-items:start;

}



.library-content{

    min-width:0;

}



/* =========================
   Ingredient Grid
========================= */


.ingredient-grid{


    display:grid;


    grid-template-columns:

        repeat(auto-fill,minmax(190px,1fr));


    gap:22px;

}



/* =========================
   Ingredient Card
========================= */


.ingredient-card{


    background:white;


    min-height:220px;


    padding:20px;


    border-radius:22px;


    border:1px solid var(--border);


    box-shadow:

        0 8px 25px rgba(70,50,20,.05);


    cursor:pointer;


    transition:.2s;

}



.ingredient-card:hover{


    transform:translateY(-3px);


    box-shadow:

        0 12px 30px rgba(70,50,20,.1);


}




/* 아이콘 */

.ingredient-card .family-icon,
.ingredient-card .ingredient-icon{


    width:18px;

    height:18px;


    font-size:14px;


    display:flex;


    align-items:center;

    justify-content:center;


    margin-bottom:12px;


}



.ingredient-card .ingredient-icon img,
.ingredient-card .family-icon img{


    width:18px;

    height:18px;

    object-fit:contain;

}



/* 제목 */


.ingredient-card h3{


    font-size:1rem;

    line-height:1.35;

    margin-bottom:5px;

    color:var(--text);

}



/* 영문명 */


.ingredient-card .english,
.ingredient-card .ingredient-ko{


    color:#c7c7c7;


    font: size 0.6em;rem;


    margin-bottom:10px;


}



/* 계열 */


.family-badge,
.ingredient-card .family-tag{


    display:inline-flex;


    padding:

        3px 8px;


    border-radius:999px;


    background:#f6f0e5;


    color:#806541;


    font-size:.65rem;


    line-height:1.2;

}



/* 태그 */


.card-tags,
.ingredient-card .tag-list{


    display:flex;


    flex-wrap:wrap;


    gap:5px;


    margin-top:10px;

}



.card-tags span,
.ingredient-card .tag-list span{


    background:#fbf7ef;


    color:#9b8057;


    padding:

        3px 7px;


    border-radius:999px;


    font-size:.62rem;


    line-height:1.2;

}



/* =========================
   Detail Panel
========================= */


.detail-panel,
.ingredient-detail{


    background:white;


    border:1px solid var(--border);


    border-radius:28px;


    padding:32px;


    box-shadow:

        0 15px 45px rgba(70,50,20,.08);


    position:sticky;


    top:24px;


    height:

        calc(100vh - 80px);


    overflow-y:auto;

}




.ingredient-detail h2{


    font-family:

        "Noto Serif KR",
        serif;


    font-size:1.8rem;


    margin-bottom:10px;

}



.subtitle{


    color:#999;

    font-size:.9rem;

    margin-bottom:30px;

}



.ingredient-detail h3{


    font-size:.78rem;

    letter-spacing:.18em;

    color:#6b5534;

    margin:

        32px 0 14px;

}



.ingredient-detail p{


    font-size:.9rem;

    line-height:2;

    color:#666;

}



/* 상세 태그 */


.tag-group{


    display:flex;

    flex-wrap:wrap;

    gap:8px;

}



.tag-group span{


    padding:

        5px 12px;


    border-radius:999px;


    background:#faf4e8;


    color:#856a40;


    font-size:.72rem;

}



/* =========================
   Empty
========================= */


.empty-state{


    height:100%;


    display:flex;

    flex-direction:column;


    justify-content:center;

    align-items:center;


    color:#999;

}



/* =========================
   Selection
========================= */


.selection-banner{


    background:#fff4d8;

    border:1px solid #e6c57a;


    padding:18px 28px;

    margin:30px 40px;

    border-radius:14px;

}


.hidden{

    display:none;

}



/* =========================
   Responsive
========================= */


@media(max-width:1000px){


    .library-layout{


        grid-template-columns:1fr;

    }



    .detail-panel,
    .ingredient-detail{


        position:relative;

        height:auto;

    }

}



@media(max-width:768px){


    .library-header{


        flex-direction:column;

        align-items:flex-start;

        gap:20px;

    }



    .library-layout{


        padding:20px;

    }



    .family-nav{


        margin:10px 20px;

    }


}
/* ==========================================
   Library Layout Final
========================================== */


/* 전체 구조 */

.library-layout{

    display:grid;

    grid-template-columns:

        minmax(0,1fr)
        460px;

    gap:36px;

    align-items:start;

}



/* ==========================================
   Card Area
========================================== */


.ingredient-grid{

    display:grid;

    grid-template-columns:

        repeat(5, minmax(150px,1fr));

    gap:18px;

}



/* 카드 */

.ingredient-card{


    min-height:190px;


    padding:18px;


    border-radius:18px;


}



/* 카드 아이콘 */

.ingredient-card .ingredient-icon{


    font-size:16px;


    margin-bottom:12px;


}



/* 카드 제목 */

.ingredient-card h3{


    font-size:.9rem;


    margin-bottom:4px;


}



/* 영어명 */

.ingredient-card .english-name{


    font-size:.72rem;


    color:#999;


}



/* 카테고리 */

.ingredient-card .category{


    font-size:.65rem;


}



/* 태그 */

.ingredient-card .tag{


    font-size:.58rem;


    padding:

    3px 8px;


    border-radius:20px;


}



/* ==========================================
   Detail Panel
========================================== */


.ingredient-detail{


    width:100%;


    padding:34px;


    border-radius:24px;


    background:#fff;


}



/* 상단 카테고리 */

.ingredient-detail .detail-category{


    font-size:.65rem;


}



/* 제목 */

.ingredient-detail h1{


    font-size:1.45rem;


    margin:

    12px 0 4px;


}



/* 영어 이름 */

.ingredient-detail .detail-en{


    font-size:.75rem;


    color:#999;


    margin-bottom:28px;


}



/* 구분선 */

.ingredient-detail hr{


    margin:

    20px 0;


    border-color:#eee;


}



/* 소제목 */

.ingredient-detail h2{


    font-size:.78rem;


    letter-spacing:.12em;


    margin-bottom:12px;


}



/* 설명 */

.ingredient-detail p{


    font-size:.72rem;


    line-height:2;


    color:#666;


}



/* 세부 정보 */

.ingredient-detail .detail-info{


    margin-top:24px;


}



/* 별점 */

.ingredient-detail .profile{


    font-size:.7rem;


    line-height:2;


}
@media(max-width:1400px){

.library-layout{

    grid-template-columns:
    1fr 380px;

}


.ingredient-grid{

    grid-template-columns:
    repeat(4,1fr);

}

}
/* =====================================
   Detail Panel Refinement
===================================== */


/* 카테고리 태그 */

.detail-category,
.ingredient-detail .category{


    display:inline-flex;


    align-items:center;


    padding:4px 12px;


    border-radius:999px;


    background:#f5f1e8;


    color:#9a7b45;


    font-size:.65rem;


    letter-spacing:.04em;


    margin-bottom:16px;


}



/* 영어명 */

.detail-en,
.ingredient-detail .english-name{


    font-size:.75rem;


    color:#b5b5b5;


    font-weight:400;


    margin-top:6px;


}





/* 상세 제목 */

.ingredient-detail h1{


    font-size:1.25rem;


    margin-bottom:4px;


}





/* =====================================
   Detail Sections
===================================== */


/* Summary / Description / Season 등 */

.ingredient-detail section{


    margin-bottom:34px;


}



/* 섹션 제목 */

.ingredient-detail section h2{


    font-size:.72rem;


    font-weight:700;


    letter-spacing:.12em;


    margin-bottom:14px;


}





/* 설명 텍스트 */

.ingredient-detail section p{


    font-size:.72rem;


    line-height:2;


    color:#777;


    margin:0;


}





/* =====================================
   Profile
===================================== */


.profile-list{


    margin-top:12px;


    padding-left:20px;


}



.profile-list div,
.profile-list li{


    font-size:.7rem;


    line-height:2;


    color:#777;


}





/* Top Middle Base 들여쓰기 */

.profile-list .profile-item{


    padding-left:14px;


}



/* 별점 */

.profile-list .stars{


    color:#c9a45c;


    letter-spacing:2px;


}
/* ==========================================
   Perfume Detail Book Style
========================================== */


/* 상세 패널 배경 */

.ingredient-detail,
.detail-panel{


    background:#fffdf8;


    border:1px solid #eadcc5;


    padding:36px;


}



/* ------------------------------------------
   Category Tag
------------------------------------------ */


.detail-category,
.ingredient-detail .family-badge{


    display:inline-flex;


    align-items:center;


    padding:5px 13px;


    border-radius:999px;


    background:#f3ead8;


    color:#9a7740;


    font-size:.65rem;


    font-weight:600;


    margin-bottom:14px;


}



/* 계열별 컬러 */


/* Citrus */

.detail-category.citrus{

    background:#fff0c9;

    color:#b88720;

}



/* Floral */

.detail-category.floral{

    background:#f9e5ed;

    color:#a85b79;

}



/* Woody */

.detail-category.woody{

    background:#e9eee1;

    color:#60754a;

}



/* Resin */

.detail-category.resin{

    background:#f1e4d3;

    color:#8b6842;

}





/* ------------------------------------------
   Title
------------------------------------------ */


.ingredient-detail h1{


    font-family:

    "Noto Serif KR",
    serif;


    font-size:1.35rem;


    margin-bottom:4px;


}



.detail-en{


    color:#b7b7b7;


    font-size:.75rem;


    margin-bottom:28px;


}



/* ------------------------------------------
   Section Layout
------------------------------------------ */


.detail-section{


    padding-top:22px;


    margin-top:22px;


    border-top:

    1px solid #eee3d2;


}



.detail-section:first-child{


    border-top:none;


    padding-top:0;


    margin-top:0;


}





.detail-section h2{


    font-size:.7rem;


    letter-spacing:.18em;


    color:#66513a;


    margin-bottom:12px;


}





.detail-section p{


    font-size:.72rem;


    line-height:2;


    color:#777;


}






/* ------------------------------------------
   Season / Time Tags
------------------------------------------ */


.detail-tags{


    display:flex;


    flex-wrap:wrap;


    gap:7px;


}



.detail-tags span{


    background:#faf5eb;


    border:1px solid #eee1ca;


    padding:

    4px 11px;


    border-radius:999px;


    font-size:.65rem;


    color:#806541;


}





/* ------------------------------------------
   Profile
------------------------------------------ */


.profile-list{


    margin-top:8px;


    padding-left:18px;


}



.profile-list li,
.profile-item{


    display:flex;


    justify-content:space-between;


    align-items:center;


    font-size:.7rem;


    color:#777;


    padding-left:12px;


    line-height:2.2;


}




.profile-name{


    color:#777;

}



.stars{


    color:#c8a05a;


    letter-spacing:2px;


    font-size:.65rem;


}

.detail-section.accord,
.detail-section.intensity,
.detail-section.characteristic{

    display:none;

}
/* ==========================================
   Card English Name Size
========================================== */


.ingredient-card .english,
.ingredient-card .english-name,
.ingredient-card .ingredient-en{


    font-size:0.8rem !important;


    color:#b5b5b5;


    font-weight:400;


    margin-top:4px;


    margin-bottom:10px;


    letter-spacing:.02em;

}


/* ==========================================
   Multi-select
========================================== */

.selection-banner{

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;

}

.selection-banner.hidden{

    display:none;

}

.selection-banner-text{

    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;

}

.selection-count{

    background:var(--primary);
    color:#fff;
    font-size:.75rem;
    font-weight:700;
    padding:4px 12px;
    border-radius:999px;

}

#finishSelectionButton{

    flex-shrink:0;

    background:var(--primary);
    color:#fff;

    border:none;
    padding:12px 20px;
    border-radius:12px;

    font-weight:600;
    font-size:.85rem;
    cursor:pointer;

}

#finishSelectionButton:hover{

    background:var(--primary-dark);

}

.ingredient-card.selected{

    border:2px solid var(--primary-dark);

}

.detail-header{

    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;

}

.detail-select-button{

    flex-shrink:0;

    background:#fff;
    color:var(--primary-dark);

    border:1px solid var(--primary);
    padding:10px 18px;
    border-radius:999px;

    font-weight:700;
    font-size:.8rem;
    cursor:pointer;

}

.detail-select-button:hover{

    background:#fdf8ee;

}

.detail-select-button.selected{

    background:var(--primary);
    color:#fff;


}

/* ==========================================
   Mobile: Detail Panel Above Cards, Sticky
========================================== */

@media(max-width:768px){

    .library-layout{

        display:flex;
        flex-direction:column;
        grid-template-columns:none;

    }

    .detail-panel{

        order:-1;

        position:sticky;
        top:0;
        z-index:5;

        max-height:50vh;
        overflow-y:auto;

    }

    .library-content{

        min-width:0;

    }

}