/**
 * Block Skin: rental-goods/hyetaek-card (Rental) - Style
 *
 * 시안 E #rental — 베이지 행 배경 위 흰 카드.
 * 색상은 프레임 변수를 우선 쓰고, 없으면 시안 값으로 떨어진다.
 */

.hy-rgoods {
    --hy-rg-accent: var(--hy-accent, #C4001A);
    --hy-rg-ink: var(--foreground, #111);
    --hy-rg-sub: var(--muted-foreground, #555);
    --hy-rg-faint: #767676;
    --hy-rg-thumb: #ECE8E2;
    min-width: 0;
}

/* ── 그리드 (List 모드) ── */
.hy-rgoods .mublo-item-layout:not(.is-slide) > ul {
    gap: 18px;
}

/* PC 열 수 "자동": 시안과 같이 260px 이상으로 채움 */
.hy-rgoods .mublo-item-layout:not(.is-slide)[data-pc-cols="auto"] > ul {
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

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

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

/* Swiper 모드: 카드 높이를 슬라이드에 맞춤 */
.hy-rgoods .is-slide .hy-rgoods__item {
    height: auto;
}

/* ── 카드 ── */
.hy-rgoods__card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    color: var(--hy-rg-ink);
    text-decoration: none;
    transition: box-shadow 0.2s;
}

.hy-rgoods__card:hover {
    color: var(--hy-rg-ink);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

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

/* 이미지 4:3 */
.hy-rgoods__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--hy-rg-thumb);
    overflow: hidden;
}

.hy-rgoods__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hy-rgoods__card:hover .hy-rgoods__img {
    transform: scale(1.04);
}

.hy-rgoods__noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hy-rg-faint);
}

.hy-rgoods__noimg svg {
    width: 32%;
    height: 32%;
    opacity: 0.5;
}

/* 본문 */
.hy-rgoods__body {
    flex: 1;
    min-width: 0;
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hy-rgoods__meta {
    font-size: 12px;
    line-height: 1.5;
    color: var(--hy-rg-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hy-rgoods__name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--hy-rg-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.hy-rgoods__price {
    margin-top: auto;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.3;
    color: var(--hy-rg-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.hy-rgoods__card-note {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--hy-rg-accent);
    font-variant-numeric: tabular-nums;
}

/* ── 모바일 ── */
@media (max-width: 768px) {
    .hy-rgoods .mublo-item-layout:not(.is-slide) > ul {
        gap: 18px 10px;
    }

    /* 모바일 열 수 "자동": 시안과 같이 2열 */
    .hy-rgoods .mublo-item-layout:not(.is-slide)[data-mo-cols="auto"] > ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hy-rgoods__card {
        border-radius: 12px;
    }

    .hy-rgoods__body {
        padding: 12px 12px 14px;
        gap: 4px;
    }

    .hy-rgoods__meta {
        font-size: 11px;
    }

    .hy-rgoods__name {
        font-size: 14px;
    }

    .hy-rgoods__price {
        font-size: 16px;
    }

    .hy-rgoods__card-note {
        font-size: 11px;
    }
}
