/**
 * main.css - 브랜드링크 공통 스타일
 * dashboard.html, product.html, support.html 공유
 */

:root {
    --primary-color: #1a1a1a;
    --primary-hover: #333333;
    --primary-light: #f5f5f5;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #f59e0b;
    --info-color: #17a2b8;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --border-color: #e5e5e5;
    --border-radius: 4px;
    --border-radius-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 이미지 기본 반응형 처리 — 컨테이너 범위 안에서 오버플로우 방지 */
img {
    max-width: 100%;
    vertical-align: middle;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: white;
    color: var(--text-primary);
}

/* =========================================
   헤더
========================================= */
.header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* =========================================
   버튼
========================================= */
.btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn:hover { background: #f0f0f0; }

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}
.btn-primary:hover { background: var(--primary-hover); color: white; }

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border: none;
}
.btn-secondary:hover { background: #5a6268; }

.btn-outline {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* 헤더 버튼 (흰 배경이므로 별도 오버라이드 불필요) */

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
}
.btn-danger:hover { background: #c82333; }

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================
   유저 메뉴 / 아이콘 버튼
========================================= */
.user-menu { position: relative; }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.icon-button {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-button:hover { background: var(--bg-secondary); color: var(--text-primary); }

.badge-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* =========================================
   드롭다운
========================================= */
.dropdown { position: relative; }

.dropdown-menu-custom {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    z-index: 9999;
}
.dropdown-menu-custom.show {
    display: block;
    animation: slideDown 0.3s;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dropdown-item:hover { background: var(--bg-secondary); }

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* =========================================
   알림 패널
========================================= */
.notification-panel {
    display: none;
    position: fixed;
    top: 70px;
    right: 2rem;
    width: 360px;
    max-height: 500px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1001;
    overflow: hidden;
}
.notification-panel.active { display: block; animation: slideDown 0.3s; }

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notification-list { max-height: 400px; overflow-y: auto; }
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-secondary);
    cursor: pointer;
    transition: background 0.3s;
}
.notification-item:hover { background: var(--bg-secondary); }
.notification-item.unread { background: #f5f5f5; }

/* =========================================
   메인 콘텐츠
========================================= */
.main-content { padding: 2rem 0; }

.welcome { margin-bottom: 2rem; }
.welcome h2 { color: #333; margin-bottom: 0.5rem; }
.welcome p { color: #666; }

/* =========================================
   통계 카드
========================================= */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
}
.stat-number { font-size: 2rem; font-weight: bold; color: var(--primary-color); }
.stat-label { color: #666; margin-top: 0.5rem; }

/* =========================================
   탭
========================================= */
.tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 3px;
    width: fit-content;
}
.tab {
    padding: 0.55rem 1.25rem;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 6px;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.tab.active { background: white; color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.tab:hover:not(.active) { color: var(--text-secondary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-header h2 { color: #333; font-size: 1.5rem; }

/* product-card / products-grid / influencer-card / influencers-grid:
   하단 "상품 그리드 (새 기준)" 및 "인플루언서 카드 (업그레이드)" 섹션에 정의됨 */

/* =========================================
   채널 옵션 (홍보 링크)
========================================= */
.channel-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.channel-option {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: #fff;
}
.channel-option input { margin-right: 0.4rem; }

.referral-result { background: var(--bg-secondary); border-radius: var(--border-radius); padding: 1rem; }
.referral-guide {
    background: var(--bg-secondary);
    border: 1px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0 1.5rem;
}
.referral-guide h4 { color: var(--primary-color); margin-bottom: 0.5rem; }
.referral-guide code { background: #fff; padding: 0.1rem 0.3rem; border-radius: 4px; }

/* =========================================
   FAB 버튼
========================================= */
.floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    height: 48px;
    padding: 0 1.5rem;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: var(--transition);
    z-index: 999;
    display: none;
    align-items: center;
    gap: 0.5rem;
}
.floating-btn:hover { background: #333; box-shadow: 0 6px 24px rgba(0,0,0,0.35); }

/* =========================================
   모달
========================================= */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content.product-detail-modal { max-width: 760px; }

.close-btn {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.close-btn:hover { background: var(--bg-secondary); }

.modal-content h2 {
    padding: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

/* =========================================
   폼
========================================= */
.form-group {
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}
textarea { min-height: 100px; resize: vertical; }

/* =========================================
   이미지 업로드
========================================= */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.image-upload-area:hover { border-color: var(--primary-color); background: var(--bg-secondary); }

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
    position: absolute;
    top: 0.25rem; right: 0.25rem;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 24px; height: 24px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--danger-color);
}

/* =========================================
   상품 상세 모달
========================================= */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
}
.product-detail-images { position: relative; }
.main-image {
    width: 100%;
    height: 400px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin-bottom: 1rem;
}
.main-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--border-radius); }

.thumbnail-images { display: flex; gap: 0.5rem; }
.thumbnail {
    width: 80px; height: 80px;
    background: var(--bg-secondary);
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.thumbnail.active { border-color: var(--primary-color); }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

.product-detail-info h2 { font-size: 1.5rem; margin-bottom: 0.5rem; padding: 0; border: none; }
.detail-actions { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.detail-actions .btn { flex: 1; }

/* =========================================
   리뷰
========================================= */
.review-section { padding: 1.5rem; border-top: 1px solid var(--border-color); }
.review-item { padding: 1rem; border-bottom: 1px solid var(--bg-secondary); margin-bottom: 1rem; }
.review-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.review-author { font-weight: bold; }
.review-rating { color: var(--warning-color); margin-left: 0.5rem; }
.review-date { color: #666; font-size: 0.9rem; }

.star-rating { display: flex; gap: 0.5rem; font-size: 1.5rem; }
.star { cursor: pointer; color: #ddd; transition: color 0.2s; }
.star.active, .star:hover { color: var(--warning-color); }

/* =========================================
   토스트 / 로딩
========================================= */
.toast {
    position: fixed;
    top: 2rem; right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 380px;
    word-break: keep-all;
    z-index: 10000;
}
.toast.show { display: flex; animation: slideIn 0.3s ease; }
.toast-success { border-left: 4px solid var(--success-color); }
.toast-error   { border-left: 4px solid var(--danger-color); }
.toast-warning { border-left: 4px solid var(--warning-color); }

.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loading-overlay.show { display: flex; }
.spinner {
    width: 50px; height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* =========================================
   로그인 모달 전용 스타일
========================================= */
.auth-modal-content {
    max-width: 440px;
    width: 90%;
    border-radius: 16px;
    overflow: hidden;
}
.auth-modal-header {
    background: #1a1a1a;
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}
.auth-modal-header h2 {
    color: white;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 1.4rem;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0.1em;
}
.auth-modal-header p { opacity: 0.85; margin-top: 0.25rem; font-size: 0.9rem; }

.auth-tabs-bar {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    padding: 0 1.5rem;
}
.auth-tab-btn {
    flex: 1;
    padding: 0.9rem;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
}
.auth-tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }

.auth-form { display: none; padding: 1.5rem; }
.auth-form.active { display: block; }

.auth-form .form-group { padding: 0; margin-bottom: 1rem; }

.form-group-icon { position: relative; }
.pw-toggle {
    position: absolute;
    right: 0.75rem; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    font-size: 1rem;
}

.auth-submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}
.auth-submit-btn:hover { background: var(--primary-hover); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* =========================================
   애니메이션
========================================= */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   반응형
========================================= */
@media (max-width: 768px) {
    /* 알림 패널 */
    .notification-panel {
        width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
    }

    /* 통계 카드 — 모바일 2열 컴팩트 */
    .stats { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 1rem; }
    .stat-number { font-size: 1.5rem; }

    /* 탭 */
    .tabs { overflow-x: auto; white-space: nowrap; }
    .tab { padding: 0.75rem 1rem; }

    /* 상품/인플루언서 그리드 — 하단 새 기준 섹션의 @media로 처리 */
    .product-info h3 { font-size: 0.9rem; }
    .product-price { font-size: 0.875rem; }

    /* 상품 상세 모달 */
    .product-detail-container { grid-template-columns: 1fr; }
    .main-image { height: 260px; }
    .thumbnail-images { flex-wrap: wrap; }
    .detail-actions { flex-direction: column; }
    .detail-actions .btn { flex: none; width: 100%; justify-content: center; }

    /* 섹션 헤더 */
    .section-header { flex-wrap: wrap; gap: 0.5rem; }

    /* 토스트 */
    .toast {
        min-width: unset;
        left: 1rem;
        right: 1rem;
        top: 1rem;
        width: calc(100% - 2rem);
        max-width: none;
    }

    /* FAB */
    .floating-btn { bottom: 1rem; right: 1rem; }

    /* 로그인 모달 */
    .auth-modal-content { width: 95%; }

    /* 네브 버튼 간격 */
    .nav-buttons { gap: 0.25rem; }

    /* 모달 공통 */
    .modal-content { width: 95%; margin: 0 auto; }
    .modal-content.product-detail-modal { max-width: 100%; width: 95%; }
}

@media (max-width: 480px) {
    /* 통계 카드 초소형 → 2열 유지 (더 이상 1열로 축소하지 않음) */
    .stats { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 0.75rem; }
    .stat-number { font-size: 1.35rem; }
    .stat-label { font-size: 0.8rem; }

    /* 탭 버튼 더 작게 */
    .tab { padding: 0.5rem 0.75rem; font-size: 0.82rem; }

    /* 상품/인플루언서: 초소형에서도 2열 유지, 이미지 높이만 조정 */
    .product-image { height: 120px; }
    .influencer-avatar { height: 120px; }
}

/* =========================================
   헤더 네브 링크 (nav-link)
========================================= */
.nav-link {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.25rem 0;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }

/* =========================================
   헤더 검색 입력
========================================= */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}
.header-search .search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}
.header-search input {
    padding: 0.45rem 0.75rem 0.45rem 2.2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    font-size: 0.875rem;
    width: 200px;
    outline: none;
    transition: var(--transition);
}
.header-search input:focus {
    border-color: #aaa;
    background: white;
    width: 240px;
}

/* =========================================
   사용자 정보 (헤더 우측)
========================================= */
.user-info-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.user-info-text .sep { opacity: 0.4; }

/* =========================================
   히어로 섹션
========================================= */
.hero-section {
    padding: 4rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: white;
    margin-bottom: 0;
}
.hero-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 2rem;
    border: 1.5px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 2px;
}
.hero-cta:hover {
    background: var(--text-primary);
    color: white;
}

/* =========================================
   역할 헤더 (로그인 후 대시보드)
========================================= */
.role-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.role-header-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .role-header-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}
.role-header-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}
.role-header-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* =========================================
   섹션 헤더 (업그레이드)
========================================= */
.section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}

/* =========================================
   상품 카드 (업그레이드)
========================================= */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    box-shadow: none;
    border: 1px solid transparent;
}
.product-card:hover { border-color: var(--border-color); }
.product-card:hover .product-image img { transform: scale(1.04); }

.product-image {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    margin-bottom: 0;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-info {
    padding: 0.75rem 0;
}
.product-brand {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.product-info h3 {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}
.product-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.3rem 0 0;
}
.product-commission {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.product-rating {
    color: var(--warning-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* 위시리스트 버튼 (상품 카드 오버레이) */
.product-wishlist-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: background 0.2s;
    font-size: 0.8rem;
    color: var(--text-muted);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
}
.product-card:hover .product-wishlist-btn { opacity: 1; }
.product-wishlist-btn:hover { background: white; color: #e74c3c; }
.product-wishlist-btn.wishlisted { color: #e74c3c; opacity: 1; }

/* =========================================
   상품 그리드 (새 기준)
========================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}
@media (max-width: 1100px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; } }

/* =========================================
   인플루언서 카드 (업그레이드 — 상품카드 기준 통일)
========================================= */
.influencer-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    box-shadow: none;
    border: 1px solid transparent;
}
.influencer-card:hover { border-color: var(--border-color); }
.influencer-avatar {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
    font-weight: 600;
    overflow: hidden;
    border-radius: 0;
}
.influencer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.influencer-info { padding: 0.75rem 0; }
.influencer-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}
.influencer-specialty {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.influencer-bio {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    margin-top: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.influencer-stats {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}
.influencer-stat {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.influencer-stat .stat-icon-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.influencer-stat .stat-val { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); }

/* =========================================
   인플루언서 그리드 (상품 그리드와 동일 기준)
========================================= */
.influencers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 0;
}
@media (max-width: 1100px) { .influencers-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .influencers-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px)  { .influencers-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; } }

/* =========================================
   페이지네이션
========================================= */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    padding: 1.5rem 0 0.5rem;
    flex-wrap: wrap;
}
.pagination-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pagination-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-secondary);
    border-color: #aaa;
    color: var(--text-primary);
}
.pagination-btn.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: white;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}
.pagination-btn:disabled:not(.active) { opacity: 0.35; cursor: not-allowed; }
.pagination-info { font-size: 0.8rem; color: var(--text-muted); padding: 0 0.4rem; }

/* =========================================
   로딩 스켈레톤
========================================= */
.loading-skeleton {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.loading-skeleton::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: #888;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.api-error-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1rem;
    color: #e74c3c;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* =========================================
   토스트 (업그레이드)
========================================= */
.toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background: white;
    color: var(--text-primary);
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 9999;
    min-width: 180px;
    max-width: min(92vw, 320px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-left: 3px solid #888;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-success { border-left-color: #28a745; }
.toast.toast-error   { border-left-color: #dc3545; }
.toast.toast-warning { border-left-color: var(--warning-color); }

/* =========================================
   검색 바 카드
========================================= */
.search-bar-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.875rem 1.25rem;
    margin-bottom: 2rem;
}
.search-bar-card .search-inner {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.search-bar-card .search-inner select {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    width: 110px;
}
.search-bar-card .search-inner input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    outline: none;
    transition: var(--transition);
}
.search-bar-card .search-inner input:focus {
    border-color: #aaa;
    background: white;
}

/* =========================================
   공통 링크 스타일 (강조)
========================================= */
a.link-primary { color: var(--text-primary); text-decoration: underline; }
a.link-muted   { color: var(--text-muted); text-decoration: none; }
a.link-muted:hover { color: var(--text-primary); }
