/* ==========================================================================
   METIVATOR — Home page
   FirstSection (KeyMessage + main banner slider) + mini banners + product groups
   ========================================================================== */

/* === First Section ====================================================== */
.first-section {
    width: 100%;
    border-bottom: 1px solid var(--color-line);
    transition: background-color 0.3s ease;
}
.first-section__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
}
@media screen and (max-width: 1400px) {
    .first-section__inner {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}
.first-section__line {
    display: none;
}
@media screen and (max-width: 1400px) {
    .first-section__line {
        display: block;
        width: 100%;
        height: 0;
        border-bottom: 1px solid var(--color-line);
    }
}

/* === Key Message ======================================================== */
.key-message {
    width: 844px;
    max-width: 844px;
    min-width: 844px;
    max-height: 556px;
    min-height: 500px;
    border-left: 1px solid var(--color-line);
    display: flex;
    justify-content: center;
    align-items: center;
}
@media screen and (max-width: 1400px) {
    .key-message {
        border: 0;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
}
@media screen and (max-width: 556px) {
    .key-message {
        max-height: 211px;
        min-height: 211px;
    }
}
.key-message__inner {
    display: flex;
    flex-direction: column;
}
.key-message__line {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 50px;
    line-height: 64px;
}
@media screen and (max-width: 556px) {
    .key-message__line {
        font-size: 28px;
        line-height: 42px;
        text-align: center;
        justify-content: center;
    }
}
.key-message__refresh {
    width: 44px;
    height: 44px;
    background-color: #70eba2;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    border: none;
}
@media screen and (max-width: 556px) {
    .key-message__refresh { display: none; }
}
.key-message__refresh img {
    width: 22px;
    height: 22px;
    transition: transform 0.5s;
    user-select: none;
    -webkit-user-drag: none;
}
.key-message__spacer { width: 17px; flex-shrink: 0; }

/* === Searcher (검색바) — 원본 pie3d Searcher 동일 디자인 ============== */
.searcher {
    display: flex;
    width: 535px;
    height: fit-content;
    margin-top: 45px;
    border-radius: 3px;
}
@media screen and (max-width: 556px) {
    .searcher { display: none; }
}
.searcher__icon {
    padding: 0 17px 0 20px;
    border-left: 1px solid #000;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    border-right: 0;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.searcher__icon img {
    width: 24px;
    height: 24px;
    -webkit-user-drag: none;
}
.searcher__input {
    flex: 1;
    border: 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #ffffff;
    color: #000;
    padding: 12px 5px 12px 2px;
    font-family: "SUIT", inherit;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    outline: none;
    appearance: none;
    width: 100%;
}
.searcher__input::placeholder {
    color: #c8c8c8;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
}
.searcher__btn {
    border: 0;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    background: #000000;
    color: #ffffff;
    width: 158px;
    height: 56px;
    font-family: "SUIT", inherit;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}
.searcher__btn:hover { opacity: 0.9; }

/* === Main Banner (Slider) =============================================== */
.main-banner {
    position: relative;
    width: 556px;
    height: 556px;
    max-width: 556px;
    min-width: 556px;
    border-right: 1px solid var(--color-line);
    border-left: 1px solid var(--color-line);
}
@media screen and (max-width: 556px) {
    .main-banner {
        border-right: 0;
        border-left: 0;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        min-width: 200px;
    }
}
.main-banner__slides {
    position: relative;
    width: 100%;
    height: 100%;
}
.main-banner__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    display: block;
}
.main-banner__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.main-banner__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    display: block;
}
.main-banner__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.main-banner__arrow--left { left: 17px; }
.main-banner__arrow--right { right: 17px; }
.main-banner__arrow img {
    -webkit-user-drag: none;
    user-select: none;
}

/* === Home content wrapper ============================================== */
.home {
    width: 1200px;
    margin: 0 auto;
    font-family: "SUIT", sans-serif;
}
@media screen and (max-width: 1200px) {
    .home { width: 890px; }
}
@media screen and (max-width: 890px) {
    .home { width: 100%; }
}

/* === Mini Banner ====================================================== */
.mini-banner {
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 1200px;
    height: 136px;
}
@media screen and (max-width: 1200px) {
    .mini-banner { width: 890px; }
}
@media screen and (max-width: 890px) {
    .mini-banner { display: none; }
}
.mini-banner__img {
    width: 238px;
    height: 136px;
    position: absolute;
    left: 0;
    top: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
@media screen and (max-width: 1200px) {
    .mini-banner__img { display: none; }
}
.mini-banner__text {
    margin-left: 238px;
}
@media screen and (max-width: 1200px) {
    .mini-banner__text { margin-left: 77px; }
}
.mini-banner__title {
    font-weight: 600;
    font-size: 28px;
    line-height: 35px;
    margin-bottom: 16px;
}
.mini-banner__desc {
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
}
.mini-banner__tags {
    position: absolute;
    display: flex;
    flex-direction: row;
    gap: 14px;
    bottom: 20px;
    right: 40px;
}
@media screen and (max-width: 1200px) {
    .mini-banner__tags { display: none; }
}
.mini-banner__tag {
    height: 36px;
    border-radius: 18px;
    font-weight: 400;
    font-size: 15px;
    line-height: 36px;
    padding: 0 20px;
}

/* === Group section ==================================================== */
.home__group-title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    width: 1200px;
}
@media screen and (max-width: 1200px) {
    .home__group-title { width: 792px; }
}
@media screen and (max-width: 890px) {
    .home__group-title { width: calc(100% - 60px); }
}
.home__group-title-text {
    font-weight: 700;
    font-size: 36px;
    line-height: 36px;
}
@media screen and (max-width: 890px) {
    .home__group-title-text {
        font-size: 24px;
    }
}
.home__group-view-all {
    width: 158px;
    height: 56px;
    border: 1px solid var(--color-line);
    border-radius: 2px;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
@media screen and (max-width: 890px) {
    .home__group-view-all {
        width: fit-content;
        height: 56px;
        border: none;
        font-size: 15px;
        line-height: 19px;
        text-decoration: underline;
        background-color: transparent;
    }
}

.home__products {
    display: grid;
    grid-template-columns: repeat(auto-fill, 387px);
    gap: 19px 19px;
    row-gap: 28px;
    margin: 20px auto;
    width: 1200px;
}
@media screen and (max-width: 1200px) {
    .home__products {
        width: 792px;
        gap: 18px;
    }
}
@media screen and (max-width: 890px) {
    .home__products {
        grid-template-columns: 1fr;
        width: calc(100% - 60px);
        margin: 10px auto;
    }
}

/* Product card — 원본 pie3d MainPagePC (387×518) 매핑 */
.product-card {
    font-family: "SUIT", sans-serif;
    width: 387px;
    height: 518px;
    border-radius: 4px;
    border: 1px solid #000;
    background-color: #ffffff;
    transition: 0.4s;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}
@media screen and (max-width: 890px) {
    .product-card { width: 100%; max-width: 387px; margin: 0 auto; }
}
.product-card:hover {
    transform: translateY(-10px);
    color: inherit;
    opacity: 1;
}
.product-card__img {
    width: 100%;
    height: 339px;
    background-size: cover;
    background-position: center;
    background-color: #eeeeee;
    border-radius: 3px 3px 0 0;
    -webkit-user-drag: none;
}
.product-card__like {
    position: absolute;
    width: 28px;
    height: 28px;
    top: 12px;
    right: 12px;
    padding: 4px;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: transform 0.15s;
    -webkit-user-drag: none;
    user-select: none;
    z-index: 5;
}
.product-card__like:hover { transform: scale(1.1); }
.product-card__like-icon {
    position: absolute;
    inset: 4px;
    width: 20px;
    height: 20px;
    -webkit-user-drag: none;
    user-select: none;
    transition: opacity 0.15s;
}
.product-card__like-icon--fill { opacity: 0; }
.product-card__like.is-wished .product-card__like-icon--empty { opacity: 0; }
.product-card__like.is-wished .product-card__like-icon--fill { opacity: 1; }
.product-card__like.is-busy { pointer-events: none; opacity: 0.6; }
.product-card__like.heart-pop { animation: heart-pop 0.4s ease; }
@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.product-card__info {
    padding: 16px;
    height: 179px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-card__name {
    font-weight: 600;
    font-size: 22px;
    line-height: 28px;
    /* 2줄 ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.product-card__artist {
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #595b60;
}
.product-card__price-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.product-card__discount-percent {
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    color: #4265fe;
}
.product-card__price {
    color: #030303;
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
}
.product-card__price-before {
    font-weight: 400;
    font-size: 12px;
    line-height: 15px;
    color: #b0aeac;
    text-decoration: line-through;
}

/* === More & Discover ================================================== */
.home__more-text {
    font-weight: 600;
    font-size: 22px;
    line-height: 27px;
    text-align: center;
    color: #2d2d2d;
}
.home__more-button {
    display: inline-flex;
    width: 200px;
    height: 56px;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    border: 1px solid var(--color-line);
    border-radius: 2px;
    background-color: #ffffff;
}

/* === Spacers ========================================================== */
.home__spacer--sm { height: 24px; }
.home__spacer--md { height: 50px; }
@media screen and (min-width: 891px) {
    .home__spacer--md { height: 100px; }
}
.home__spacer--lg { height: 100px; }
.home__spacer--xl { height: 210px; }
.home__spacer--xxl { height: 160px; }
