/**
 * 상품 카드 스타일 (product.list.inc_type1.php)
 * product.list.inc_type.php에서 include되는 상품 카드 컴포넌트용 CSS
 */

/* 그리드 컨테이너 기본 스타일 */
.product-list-grid {
    display: grid;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* PC 그리드 열 수 (관리자 설정) */
.product-list-grid.grid-pc-6 { grid-template-columns: repeat(6, 1fr); }
.product-list-grid.grid-pc-5 { grid-template-columns: repeat(5, 1fr); }
.product-list-grid.grid-pc-4 { grid-template-columns: repeat(4, 1fr); }
.product-list-grid.grid-pc-3 { grid-template-columns: repeat(3, 1fr); }
.product-list-grid.grid-pc-2 { grid-template-columns: repeat(2, 1fr); }

/* 태블릿 반응형 (1200px 이하) */
@media (max-width: 1200px) {
    .product-list-grid.grid-pc-6 { grid-template-columns: repeat(5, 1fr); }
    .product-list-grid.grid-pc-5 { grid-template-columns: repeat(4, 1fr); }
}

/* 태블릿 반응형 (992px 이하) */
@media (max-width: 992px) {
    .product-list-grid.grid-pc-6,
    .product-list-grid.grid-pc-5,
    .product-list-grid.grid-pc-4 { grid-template-columns: repeat(3, 1fr); }
}

/* 모바일 (768px 이하) - 관리자 설정 적용 */
@media (max-width: 768px) {
    .product-list-grid { gap: 15px; padding: 0 15px; }
    .product-list-grid.grid-mo-3 { grid-template-columns: repeat(3, 1fr); }
    .product-list-grid.grid-mo-2 { grid-template-columns: repeat(2, 1fr); }
    .product-list-grid.grid-mo-1 { grid-template-columns: repeat(1, 1fr); }
}

/* 상품 카드 스타일 */
.product-card {
    display: flex;
    flex-direction: column;
}

.product-card .img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #e0e0e0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.product-card .img-wrapper a {
    width: 100%;
    height: 100%;
}

.product-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #2f5aff;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

.product-card .btn-cart {
    width: 100%;
    padding: 12px 0;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.2s;
}
.product-card .btn-cart:hover {
    border-color: #bbb;
    background-color: #fcfcfc;
}

.product-card .text-wrapper {
    flex: 1;
}

.product-card .market-info {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.product-card .prod-name {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    text-decoration: none;
}

.product-card .price-info {
    margin-bottom: 6px;
}
.product-card .ori-price {
    text-decoration: line-through;
    color: #ccc;
    font-size: 13px;
    display: block;
}
.product-card .dc-rate {
    color: #E61E1E;
    font-weight: 700;
    font-size: 18px;
    margin-right: 4px;
}
.product-card .final-price {
    color: #333;
    font-weight: 700;
    font-size: 18px;
}

/* 태그 래퍼 */
.product-card .tag-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.product-card .del-tag {
    display: inline-block;
    background-color: #eee;
    color: #666;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
}

.product-card .coupon-tag {
    display: inline-block;
    background-color: #ff6b35;
    color: #fff;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.product-card .img-wrapper img.promotion_icon {
    width: 100px;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

/* 타이머 스타일 */
.product-card .item_timer {
    font-size: 14px;
    margin-bottom: 8px;
}
