@charset "utf-8";

/* ============================================================
   list.css  — jj_shop 목록 전용 (상품 카드 그리드)
   의존: style.css (공통 reset)
   ============================================================ */

/* ---------- 상품 그리드 ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

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

/* ---------- 카드 이미지 ---------- */
.card-image {
    position: relative;
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}
.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.product-card:hover .card-image img {
    transform: scale(1.03);
}

/* ---------- 뱃지 ---------- */
.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: #ffffff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ---------- 카드 본문 ---------- */
.card-body {
    padding: 16px;
}
.card-category {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 6px 0 4px;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.card-price {
    font-size: 18px;
    font-weight: 700;
    color: #001E45;
    margin: 4px 0;
}
.card-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

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

/* ---------- 카테고리 ---------- */
#bo_cate {
    margin: 16px 0 12px;
}
#bo_cate h2 {
    position: absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}
#bo_cate ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#bo_cate li {
    display: inline-block;
}
#bo_cate a {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    transition: all 0.2s;
    text-decoration: none;
}
#bo_cate a:hover,
#bo_cate a:focus,
#bo_cate #bo_cate_on {
    border-color: #001E45;
    color: #001E45;
    font-weight: 600;
    background: #f8fafc;
}

/* ---------- 페이징 ---------- */
.pg_wrap {
    text-align: center;
    padding: 30px 0 20px;
}
.pg {
    display: inline-block;
}
.pg a,
.pg strong {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    margin: 0 2px;
    font-size: 14px;
    line-height: 34px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    text-align: center;
    transition: all 0.2s;
}
.pg strong {
    background: #001E45;
    border-color: #001E45;
    color: #ffffff;
    font-weight: 700;
}
.pg a:hover {
    background: #f1f5f9;
    border-color: #001E45;
    color: #001E45;
}

/* ---------- 반응형 ---------- */
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
        padding: 12px 0;
    }
    .card-image {
        height: 140px;
        padding: 10px;
    }
    .card-body {
        padding: 12px;
    }
    .card-title {
        font-size: 14px;
    }
    .card-price {
        font-size: 16px;
    }
    .card-desc {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
    #bo_cate a {
        font-size: 12px;
        padding: 4px 12px;
    }
    .pg a,
    .pg strong {
        min-width: 32px;
        height: 32px;
        line-height: 30px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 8px 0;
    }
    .card-image {
        height: 110px;
        padding: 6px;
    }
    .card-body {
        padding: 8px;
    }
    .card-title {
        font-size: 12px;
    }
    .card-price {
        font-size: 14px;
    }
    .card-category {
        font-size: 10px;
    }
}