/* =====================================================================
 * V2 공용 상품 카드 컴포넌트 (.v2live-card)
 * ---------------------------------------------------------------------
 * home / shop / mypage / cart / search 에서 쓰는 canonical 카드의
 * "카드 자체" 규칙만 발췌한 자립형 스타일시트.
 *   - shop-final.css / shop-live.css 는 body·그리드·헤더 등 SHOP 전역
 *     레이아웃까지 바꾸므로 상세(item.php)에 통째로 싣지 않는다.
 *   - 이 파일은 .v2live-card* 만 정의 → 상세 개인화 추천 레일이 SHOP 과
 *     동일한 카드로 렌더된다(별도 임시 카드 CSS 신설 금지 원칙 준수).
 * 출처: assets/shop-final.css (.v2live-card 계열, 2026-07-21 발췌)
 * ===================================================================== */

.v2live-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #ffffff;
    color: #111111;
    box-shadow: none;
    text-decoration: none;
}

.v2live-card-image {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    background: #f4f4f4;
}

.v2live-card-image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center center;
    opacity: 1;
    filter: none;
    transform: none;
}

.v2home-card-noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b5b5b5;
    font-size: 11px;
    font-weight: 700;
}

/* DIRECT / NEW / 추천 배지 */
.v2live-card-badge {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 2;
    padding: 4px 6px;
    border-radius: 5px;
    background: rgba(17, 17, 17, .88);
    color: #ffffff;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}

.v2live-card-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 112px;
    padding: 10px 9px 11px;
    background: #ffffff;
}

.v2live-card-brand {
    display: block;
    margin: 0 0 5px;
    overflow: hidden;
    color: #76562d;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2live-card-title {
    display: -webkit-box;
    min-height: 35px;
    margin: 0;
    overflow: hidden;
    color: #171717;
    font-size: 11px;
    font-weight: 650;
    line-height: 17px;
    letter-spacing: -.2px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.v2live-card-price {
    display: block;
    margin-top: auto;
    padding-top: 9px;
    color: #111111;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
}

.v2live-card-sub {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #888888;
    font-size: 8px;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 태블릿/PC: 카드 폭이 넓어질 때 정보 영역·글자 확대(SHOP 과 동일 톤) */
@media (min-width: 768px) {
    .v2live-card { border-radius: 14px; }
    .v2live-card-info { min-height: 122px; padding: 12px 11px 13px; }
    .v2live-card-brand { font-size: 10px; }
    .v2live-card-title { min-height: 38px; font-size: 12.5px; line-height: 18px; }
    .v2live-card-price { font-size: 13.5px; }
    .v2live-card-sub { font-size: 9px; }
}

/* =====================================================================
 * 상세(item.php) 개인화 추천 레일 = 하단 슬라이더와 동일 규격으로 통일
 * ---------------------------------------------------------------------
 * reco.css 는 home(넓은 폭) 기준이라 PC(≥1080px)에서 6열 그리드가 되는데,
 * 상세는 760px 컨테이너라 카드가 과밀해진다. 상세에서만(.v2-page 스코프)
 * .v2-product-slider 와 같은 가로 스크롤 레일 + 같은 카드 폭
 * (모바일 ~2.3 / 태블릿 3 / PC 5)으로 맞춘다.
 *   · 새 카드 UI 신설이 아니라 "폭 정렬" 오버라이드(카드 마크업은 공용 .v2live-card).
 *   · .v2-page 2클래스 선택자 → reco.css 단일클래스 규칙보다 우선(로드순 무관).
 *   · 가로 넘침: .v2-page{overflow:hidden} 이 클리핑 → 페이지 가로스크롤 누수 0.
 * ===================================================================== */
.v2-page .v2reco-rail {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    margin: 0;
    padding: 2px 0 6px;
    gap: 14px;
}
.v2-page .v2reco-item {
    flex: 0 0 calc((100% - 56px) / 5);
    width: auto;
    max-width: none;
}
@media (max-width: 1024px) {
    .v2-page .v2reco-item { flex-basis: calc((100% - 28px) / 3); }
}
@media (max-width: 640px) {
    .v2-page .v2reco-rail { gap: 10px; }
    .v2-page .v2reco-item { flex-basis: 43%; }
}
/* 스켈레톤도 동일 규격(로딩 점프 최소) */
.v2-page .v2reco-skel { gap: 14px; }
.v2-page .v2reco-skel .sk { width: calc((100% - 56px) / 5); max-width: none; }
@media (max-width: 1024px) { .v2-page .v2reco-skel .sk { width: calc((100% - 28px) / 3); } }
@media (max-width: 640px) { .v2-page .v2reco-skel { gap: 10px; } .v2-page .v2reco-skel .sk { width: 43%; } }
