/* ============================================================
   mall.css - 쇼핑몰 그룹 랜딩 페이지
   (jj_shop/list.skin.php의 .product-card 스타일과 톤 통일)
   ============================================================ */

.mall-page {
    max-width: var(--wrap, 1200px);
    margin: 0 auto;
    padding: 20px 0 60px;
}

.mall-header {
    text-align: center;
    padding: 20px 0 30px;
    transition: all 0.3s ease;
}
.mall-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
    transition: all 0.3s ease;
}
.mall-header h1:after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #007bff;
    margin: 10px auto 0;
    border-radius: 2px;
}
.mall-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
    transition: all 0.3s ease;
}

/* ---------- 탭 메뉴 ---------- */
.mall-tabs {
    margin: 0 0 20px;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    flex-wrap: nowrap;
}

.tab-item {
    margin-right: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.tab-item a {
    display: inline-block;
    padding: 14px 24px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.tab-item a:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.tab-item.active a {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: transparent;
}

.tab-count {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    font-size: 12px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 12px;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.tab-item.active .tab-count {
    background: #007bff;
    color: #fff;
}

.tab-item a:hover .tab-count {
    background: #dee2e6;
}

.tab-item.active a:hover .tab-count {
    background: #0056b3;
}

/* ---------- 상품 그리드 (기본 4컬럼, list.skin.php와 동일 규격) ---------- */
.mall-page .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.mall-page .product-card {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #ffffff;
}
.mall-page .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.mall-page .product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.mall-page .card-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: #ffffff;
    overflow: hidden;
}
.mall-page .card-image .image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.mall-page .card-image .image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.mall-page .product-card:hover .card-image .image-wrapper img {
    transform: scale(1.03);
}

.mall-page .card-category-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 5;
    background: rgba(0,30,69,0.82);
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.12);
    max-width: calc(100% - 30px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.mall-page .product-card:hover .card-category-badge {
    background: rgba(0,30,69,0.92);
}

.mall-page .card-body {
    padding: 8px 16px 12px;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}
.mall-page .card-body .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.mall-page .card-body .card-price {
    font-size: 17px;
    font-weight: 700;
    color: #001E45;
    text-align: right;
}

/* ---------- 빈 목록 ---------- */
.mall-page .empty-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}
.mall-page .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}
.mall-page .empty-text {
    font-size: 16px;
}

/* ---------- 반응형 (list.skin.php와 동일 분기점) ---------- */
@media (max-width: 1200px) {
    .mall-page .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}
@media (max-width: 768px) {
    .mall-page .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 12px 0;
    }
    .mall-header h1 {
        font-size: 22px;
    }
    .mall-page .card-body .card-title {
        font-size: 14px;
    }
    .mall-page .card-body .card-price {
        font-size: 15px;
    }
    
    /* 탭 모바일 대응 */
    .tab-item a {
        padding: 10px 16px;
        font-size: 14px;
    }
    .tab-count {
        font-size: 11px;
        padding: 0 6px;
    }
}
@media (max-width: 360px) {
    .mall-page .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}