/*
 * Block Skin: image/hyetaek-brand — 공식 브랜드관 타일 (혜택의 차이)
 *
 * 열 배치는 mublo-item-layout(block.css)이 한다. 여기서는 간격과 88px
 * 테두리 타일 한 칸 — 가운데 로고(또는 브랜드명) + 11px 분류 — 만 맡는다.
 */

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

/* PC "자동" — 시안 그대로 140px 이상씩. */
.hy-brand .mublo-item-layout:not(.is-slide)[data-pc-cols="auto"] > ul {
    grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
}

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

.hy-brand__item {
    min-width: 0;
}

.hy-brand__tile {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 104px;
    padding: 14px 12px 12px;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 16px;
    background: var(--background, #FFF);
    color: var(--foreground, #111);
    text-decoration: none;
    text-align: center;
    overflow: hidden;
}

a.hy-brand__tile {
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.hy-brand__tile:hover,
a.hy-brand__tile:focus-visible {
    border-color: #C9CDD2;
    box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

a.hy-brand__tile:focus-visible {
    outline: 2px solid var(--foreground, #111);
    outline-offset: 2px;
}

/* 로고는 자르지 않고 타일 안에 비율대로 맞춘다. 설명이 붙어도
   88px 안에 들어가도록 높이 상한을 둔다. */
.hy-brand__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    width: 100%;
    min-height: 0;
    max-width: 100%;
}

.hy-brand__logo picture {
    display: contents;
}

/* 높이를 고정하고 contain 으로 맞춘다 — 크기 속성 없는 SVG 로고도 폭이 0 으로 접히지 않는다.
   폭도 120px 로 묶어, 가로로 긴 워드마크(SAMSUNG·coway)와 정사각형 심볼(Apple)이 비슷한 무게로 보이게 한다 */
.hy-brand__logo img {
    display: block;
    width: 100%;
    max-width: 120px;
    height: 36px;
    object-fit: contain;
}

.hy-brand__name {
    max-width: 100%;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hy-brand__kind {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.4;
    color: #8A8A8A;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    a.hy-brand__tile {
        transition: none;
    }

    a.hy-brand__tile:hover,
    a.hy-brand__tile:focus-visible {
        transform: none;
    }
}

@media (max-width: 768px) {
    .hy-brand .mublo-item-layout:not(.is-slide) > ul {
        gap: 8px;
    }

    /* 모바일 "자동" 은 4칸 — 8개 브랜드가 2줄로 맞아떨어진다. */
    .hy-brand .mublo-item-layout:not(.is-slide)[data-mo-cols="auto"] > ul {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hy-brand__tile {
        gap: 6px;
        height: 76px;
        padding: 8px 6px;
        border-radius: 12px;
    }

    .hy-brand__logo img {
        max-width: 72px;
        height: 24px;
    }

    .hy-brand__name {
        font-size: 13px;
    }

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