/* ══════════════════════════════════════
   브랜드 아카이브 페이지  (taxonomy-sg_product_brand.php)
   + 상품 카드 그리드 공통 스타일
══════════════════════════════════════ */

/* ── 브랜드 정보 배너 ── */
.brand_archive_info {
    padding: 48px 0 40px;
    background: #f8f9fb;
    border-bottom: 1px solid #e8e8e8;
}
.brand_archive_meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.brand_archive_name {
    font-family: var(--engType);
    font-size: clamp(1.6em, 3vw, 2.4em);
    font-weight: 700;
    color: #111;
    letter-spacing: -0.02em;
}
.brand_archive_desc {
    flex: 1;
    font-size: 0.95em;
    color: #666;
    line-height: 1.7;
    min-width: 200px;
}
.brand_archive_count {
    font-size: 0.9em;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}
.brand_archive_count strong {
    color: var(--mainColor);
    font-size: 1.1em;
}

/* ── 상품 목록 섹션 ── */
.brand_archive_products {
    padding: 60px 0 100px;
    background: #fff;
}

/* ── 상품 카드 그리드 (공통) ── */
.sg-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── 상품 카드 (sg_product_card() 함수 출력) ── */
.sg-product-card {
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}
.sg-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 78, 162, 0.12);
    border-color: #c8d8f0;
}
.sg-product-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.sg-card-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sg-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.sg-product-card:hover .sg-card-thumb img {
    transform: scale(1.04);
}
.no-img {
    font-size: 48px;
    line-height: 1;
    opacity: 0.3;
}
.sg-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.sg-badge {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.sg-badge.best    { background: var(--accentColor); color: #111; }
.sg-badge.new     { background: var(--mainColor);   color: #fff; }
.sg-badge.soldout { background: rgba(0,0,0,0.55);   color: #fff; }
.sg-card-body {
    padding: 14px 16px 18px;
}
.sg-card-brand {
    font-size: 0.78em;
    color: var(--mainColor);
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}
.sg-card-title {
    font-size: 0.95em;
    font-weight: 500;
    color: #222;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 페이지네이션 ── */
.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin-top: 60px;
    flex-wrap: wrap;
}
.page-numbers li a,
.page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 0.95em;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
    text-decoration: none;
}
.page-numbers li span.current,
.page-numbers li a:hover {
    background: var(--mainColor);
    border-color: var(--mainColor);
    color: #fff;
}

/* ── 상품 없을 때 ── */
.brand_archive_empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}
.brand_archive_empty p {
    font-size: 1.1em;
    margin-bottom: 24px;
}

/* ── 반응형 ── */
@media(max-width: 1280px) {
    .sg-product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width: 960px) {
    .sg-product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .brand_archive_meta { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media(max-width: 480px) {
    .sg-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sg-card-body { padding: 10px 12px 14px; }
}

/* ══ 상품 메인 페이지 브랜드 필터 ══ */
.sg-brand-nav {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 8px 0 32px;
    padding: 18px 22px;
    background: #f8f9fb;
    border-radius: 14px;
    border: 1px solid #e8e8e8;
}
.sg-brand-nav-label {
    font-size: 0.82em;
    font-weight: 700;
    color: var(--mainColor);
    white-space: nowrap;
    padding-top: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.sg-brand-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.sg-brand-nav-list a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.82em;
    font-weight: 500;
    color: #555;
    transition: all 0.18s;
    text-decoration: none;
    white-space: nowrap;
}
.sg-brand-nav-list a:hover {
    border-color: var(--mainColor);
    color: var(--mainColor);
}
.sg-brand-nav-list a.active {
    background: var(--mainColor);
    border-color: var(--mainColor);
    color: #fff;
}
.sg-brand-nav-list .brand-count {
    font-size: 0.85em;
    opacity: 0.7;
}
.sg-brand-nav-list a.active .brand-count {
    opacity: 0.85;
}
@media(max-width: 768px) {
    .sg-brand-nav { flex-direction: column; gap: 10px; }
    .sg-brand-nav-label { padding-top: 0; }
}
