/**
 * Block Skin: hyetaek-review/basic - Style
 *
 * 시안 E · 구매 후기 카드 — Shop·Mshop·Rental 의 hyetaek-card 후기 스킨과 같은 치수.
 * 줄마다 높이를 고정한다(머리줄 18 · 상품명 1줄 22 · 본문 3줄 · 별점 18 · 간격 10) —
 * 몰마다 내용 길이·사진 유무가 달라도 한 줄의 카드 높이가 같다.
 * 색상은 프레임 변수(--hy-accent 등)를 우선 쓰고, 없으면 시안 값으로 폴백한다.
 */

.hy-mreview {
    --hy-mr-accent: var(--hy-accent, #C4001A);
    --hy-mr-ink: var(--foreground, #111111);
    --hy-mr-sub: var(--muted-foreground, #555555);
    --hy-mr-faint: #767676;
    --hy-mr-line: var(--border, #E5E5E5);
    --hy-mr-soft: var(--muted, #F4F4F4);
    min-width: 0;
    color: var(--hy-mr-ink);
}

.hy-mreview *,
.hy-mreview *::before,
.hy-mreview *::after {
    box-sizing: border-box;
}

.hy-mreview__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hy-mreview .mublo-item-layout:not(.is-slide) > ul {
    gap: 18px;
}

/* 열 수 "자동"이면 시안처럼 280px 기준 auto-fit */
.hy-mreview .mublo-item-layout:not(.is-slide)[data-pc-cols="auto"] > ul {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.hy-mreview__item {
    min-width: 0;
    display: flex;
}

/* 카드 */
.hy-mreview__card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--hy-mr-line);
    border-radius: 16px;
    background: var(--card, #FFFFFF);
    color: var(--hy-mr-ink);
    text-decoration: none;
    transition: border-color 0.2s;
}

.hy-mreview__card:hover {
    color: var(--hy-mr-ink);
    text-decoration: none;
    border-color: #CCCCCC;
}

.hy-mreview__card:focus-visible {
    outline: 2px solid var(--hy-mr-accent);
    outline-offset: 2px;
}

/* 1) 분류 + 작성자 */
.hy-mreview__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    font-size: 12px;
    line-height: 18px;
    color: var(--hy-mr-faint);
}

.hy-mreview__kind {
    flex: none;
    font-weight: 700;
    color: var(--hy-mr-accent);
}

.hy-mreview__member {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 2) 상품명 — 1줄 */
.hy-mreview__product {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 3) 내용 + 사진 */
.hy-mreview__body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.hy-mreview__text {
    flex: 1;
    min-width: 0;
    min-height: calc(14px * 1.6 * 3);   /* 짧은 후기도 3줄 높이 */
    font-size: 14px;
    line-height: 1.6;
    color: var(--hy-mr-sub);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.hy-mreview__photo {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--hy-mr-soft);
}

.hy-mreview__photo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 4) 별점 + 작성일 — 카드 하단 고정 */
.hy-mreview__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 18px;
    margin-top: auto;
    font-size: 12px;
    line-height: 18px;
    color: var(--hy-mr-faint);
    font-variant-numeric: tabular-nums;
}

.hy-mreview__stars {
    display: inline-flex;
    gap: 1px;
    font-size: 13px;
    line-height: 1;
}

.hy-mreview__star {
    color: var(--hy-mr-line);
}

.hy-mreview__star.is-on {
    color: var(--hy-mr-accent);
}

/* 모바일 — 가로 스냅 레일 (카드 80% 폭) */
@media (max-width: 768px) {
    .hy-mreview .mublo-item-layout:not(.is-slide) > ul {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .hy-mreview .mublo-item-layout:not(.is-slide) > ul::-webkit-scrollbar {
        display: none;
    }

    .hy-mreview .mublo-item-layout:not(.is-slide) > ul > li {
        flex: 0 0 80%;
        scroll-snap-align: start;
    }

    .hy-mreview__card {
        padding: 18px;
    }
}
