/**
 * Block Skin: hero_showcase/basic — 글 칸(테마 면) + 상품 무대(옅은 면 + 흰 정사각 타일)
 * 글·테마 색은 프레임의 .hero-slide 변수(--hero-bg/--hero-fg/--hero-muted)를 그대로 쓴다.
 */
.block-hero-showcase__slides { list-style: none; margin: 0; padding: 0; }

.hero-slide.hero-showcase {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: stretch;
    min-height: clamp(460px, 26vw + 200px, 660px);
    padding: 0;
}
.hero-slide.hero-showcase::before { display: none; }

.hero-showcase__text {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(48px, 4vw, 88px) clamp(32px, 4vw, 72px) clamp(56px, 5vw, 104px)
             max(var(--gutter), calc((100vw - var(--container-max)) / 2));
}
.hero-showcase .hero-slide__title { max-width: 11em; }

/* 무대 */
.hero-showcase__stage {
    --stage-bg: #ededeb;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 0.9vw, 16px);
    padding: clamp(24px, 3vw, 56px) max(var(--gutter), calc((100vw - var(--container-max)) / 2)) clamp(24px, 3vw, 56px) clamp(24px, 3vw, 56px);
    background: var(--stage-bg);
}
.hero-slide--light .hero-showcase__stage { --stage-bg: #e6e6e3; }
.hero-slide--warm .hero-showcase__stage { --stage-bg: #f4f1ec; }

.hero-showcase__tile {
    position: relative;
    display: block;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    color: var(--color-neutral-950);
}
.hero-showcase__tile--main { grid-row: 1 / span 2; }
.hero-showcase__img {
    position: absolute;
    inset: 8% 8% 18%;
    width: 84%;
    height: 74%;
    object-fit: contain;
    transition: transform 0.6s ease;
}
.hero-showcase__tile--sub .hero-showcase__img { inset: 8% 10% 28%; width: 80%; height: 64%; }
a.hero-showcase__tile:hover .hero-showcase__img { transform: scale(1.04); }

.hero-showcase__rank {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background: var(--color-neutral-950);
    color: #fff;
    font-size: var(--text-caption);
    font-weight: 800;
}

.hero-showcase__caption {
    position: absolute;
    left: clamp(12px, 1.2vw, 20px);
    right: clamp(12px, 1.2vw, 20px);
    bottom: clamp(10px, 1vw, 18px);
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--text-caption);
    line-height: 1.4;
}
.hero-showcase__brand { font-size: var(--text-micro); font-weight: 700; }
.hero-showcase__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--color-neutral-600); }
.hero-showcase__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-showcase__price em { margin-right: 4px; font-style: normal; color: var(--sale); }
.hero-showcase__tile--main .hero-showcase__name { font-size: var(--text-body-sm); }
.hero-showcase__tile--main .hero-showcase__price { font-size: var(--text-body); }

/* 상품이 없을 때 — 같은 자리에 선 아이콘 타일 */
.hero-showcase__tile--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(255 255 255 / 0.72);
    color: var(--color-neutral-400);
}
.hero-showcase__tile--icon .icon { font-size: clamp(40px, 4vw, 72px); }
.hero-showcase__tile--main.hero-showcase__tile--icon .icon { font-size: clamp(64px, 7vw, 128px); color: var(--color-neutral-500); }

@media (max-width: 1023px) {
    .hero-slide.hero-showcase { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .hero-showcase__stage { grid-template-columns: 1fr; grid-template-rows: none; }
    .hero-showcase__tile--main { grid-row: auto; aspect-ratio: 1 / 1; }
    .hero-showcase__tile--sub { display: none; }
}
@media (max-width: 767px) {
    .hero-slide.hero-showcase { grid-template-columns: 1fr; min-height: 0; }
    .hero-showcase__stage {
        order: -1;
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        grid-template-rows: repeat(2, minmax(0, 1fr));
        height: min(96vw, 440px);
        padding: 16px var(--gutter);
    }
    .hero-showcase__tile--main { grid-row: 1 / span 2; aspect-ratio: auto; }
    .hero-showcase__tile--sub { display: block; }
    .hero-showcase__tile--sub .hero-showcase__caption { display: none; }
    .hero-showcase__tile--sub .hero-showcase__img { inset: 10%; width: 80%; height: 80%; }
    .hero-showcase__text { padding: 28px var(--gutter) 72px; }
}

/* 글 칸 안 링크는 글 폭만큼 — 세로 flex 에서 늘어나지 않게 */
.hero-showcase__text .hero-slide__cta { align-self: flex-start; }
/* 조작부(front.js)는 무대 타일을 가리지 않게 글 칸 아래 왼쪽에 둔다 */
.block-hero-showcase .hero-controls {
    left: max(var(--gutter), calc((100vw - var(--container-max)) / 2));
    right: auto;
    bottom: clamp(20px, 2vw, 36px);
}
@media (max-width: 767px) {
    .block-hero-showcase .hero-controls { left: auto; right: var(--gutter); bottom: 20px; }
}
@media (max-width: 767px) {
    .hero-showcase__tile--sub.hero-showcase__tile--icon { display: flex; }
}
