/* ========================================
   공동구매 공통 스타일
======================================== */

/* 필터 컨테이너 */
.filter-container {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 16px;
    background-color: #fff;
    position: sticky;
    top: 8.2rem;
    z-index: 10;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 9.9rem;
    background-color: #fff;
    color: #A1A1A1;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 3.2rem;
}

.filter-btn:hover {
    border-color: #999;
    background-color: #f9f9f9;
}

.filter-btn.active {
    background-color: #121212;
    color: #fff;
    border-color: #121212;
}

.filter-btn:focus {
    outline: none;
}

/* ========================================
   공구상품 리스트
======================================== */
.group-deal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.group-deal-list li {
    margin: 0 1.6rem 2.4rem;
    border-radius: 1.6rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    background-color: #fff;
}

.group-deal-list li.hidden {
    display: none;
}

.group-deal-list li a {
    text-decoration: none;
    color: inherit;
    display: block !important;
}

/* ========================================
   이미지 영역
======================================== */
.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 359 / 208;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 종료된 공구 오버레이 */
.end-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 1;
}

.end-overlay-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.end-overlay-subtext {
    font-size: 2rem;
    font-weight: 700;
}

/* ========================================
   배지 영역
======================================== */
.live-badge-wrap {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: .4rem;
    z-index: 2;
}

.live-badge {
    background-color: #F62E2E;
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 10rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    position: static;
    line-height: 150%;
    font-family: 'Montserrat';
}

.countdown-badge {
    background-color: #404040;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 10rem;
    font-size: 1rem;
    font-weight: 500;
    height: 2.4rem;
    display: flex;
    align-items: center;
    position: static;
    line-height: 150%;
    font-family: "M PLUS 1p";
}

.countdown-badge strong {
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   스케줄 오버레이
======================================== */
.schedule-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
}

.schedule-date {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: .8rem;
}

.schedule-time {
    font-size: 2.8rem;
    font-weight: 700;
}

/* ========================================
   상품 정보
======================================== */

.gd-product-info {
    margin: 1.6rem;
    margin-bottom: 0;
}

.gd-product-title {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gd-price-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gd-original-price {
    font-size: 1.2rem;
    color: #121212;
    font-weight: 700;
}

.gd-price-label {
    font-size: 1.6rem;
    color: #FF41A2;
    margin-bottom: 2px;
    font-weight: 700;
}

/* ========================================
   라벨 그룹
======================================== */
.label-group {
    display: flex;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.join-label {
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    color: #666;
    background: #F4F4F4;
}

.achieve-label {
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    color: #FF41A2;
    background: #FFF0F8;
}

/* ========================================
   버튼
======================================== */
.button-wrapper {
    padding: 1.6rem;
    padding-top: 0;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: .8rem 1.6rem;
    border-radius: .8rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    /* margin-top: 1.6rem; */
    height: 4rem;
    border: none;
    text-decoration: none;
}

.action-button.outline {
    background-color: #fff;
    border: 1px solid #FF41A2;
    color: #FF41A2;
}

.action-button.fill {
    background-color: #fff;
    border: 1px solid #d4d4d4;
    color: #333;
}

.action-button.fill:disabled {
    background: #d4d4d4;
    border: 1px solid #d4d4d4;
    color: #a1a1a1;
    cursor: not-allowed;
    opacity: 1;
}

.action-button.fill img {
    width: 1.6rem;
    height: 1.6rem;
    margin-right: .4rem;
}

/* ========================================
   Empty 상태
======================================== */

.gd-empty-list {
    text-align: center;
    padding: 6rem 2.4rem;
    display: none;
}

.gd-empty-list.show {
    display: block;
}

.gd-empty-list img {
    width: 100%;
    height: 8rem;
    margin-bottom: 1.6rem;
}

.gd-empty-list p {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 2.4rem;
}

.gd-empty-list a {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    background-color: #121212;
    color: #fff;
    text-decoration: none;
    border-radius: .8rem;
    font-size: 1.4rem;
    font-weight: 600;
}


/* ========================================
   Progress Section
======================================== */
.group-deal-list .progress-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.6rem;
    background: #F5F5F5;
}

.group-deal-list .progress-bar-wrapper {
    flex: 1;
    margin-right: 1.2rem;
}

.group-deal-list .progress-bar {
    width: 100%;
    height: 0.8rem;
    background: #fff;
    border-radius: 10rem;
    overflow: hidden;
    position: relative;
}

.group-deal-list .progress-fill {
    height: 100%;
    background: #FF41A2 !important;
    border-radius: 10rem;
    transition: width 0.3s ease;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
}

.group-deal-list .progress-text {
    font-size: 1.2rem;
    color: #666;
    white-space: nowrap;
}

/* ========================================
   메인 라이브 카드 전용 스타일
======================================== */
.main-live-wrapper .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.6rem;
    padding-bottom: 1.2rem;
}

.main-live-wrapper .header-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #121212;
    display: flex;
    align-items: center;
    letter-spacing: 0.05rem;
}

.main-live-wrapper .header-more {
    font-size: 1.2rem;
    font-weight: 700;
    color: #A1A1A1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.main-live-wrapper .header-more img {
    width: 1.6rem;
    height: 1.6rem;
}

.main-live-wrapper .group-deal-list {
    margin: 0 1.6rem 2.4rem;
}

.main-live-wrapper .group-deal-list li {
    margin: 0;
}

.main-live-wrapper .group-deal-list li a {
    display: flex;
    flex-direction: column;
}

.main-live-wrapper .image-wrapper {
    order: 1;
}

.main-live-wrapper .progress-section {
    order: 2;
}

.main-live-wrapper .product-info {
    order: 3;
}

.main-live-wrapper .button-wrapper {
    order: 4;
}

/* 메인 라이브 카드에서는 버튼 숨김 */
.main-live-wrapper .button-wrapper .action-button {
    display: none;
}
