/* 장바구니 전용 스타일 */
.cart-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    padding: 0 8px;
    z-index: 100;
}
.cart-header__back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-header__title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}
.cart-header__right { width: 40px; }

/* 전체선택 섹션 */
.cart-select-all {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 44px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 99;
    box-sizing: border-box;
}

.cart-content {
    padding: 116px 16px 200px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cart-item__check,
.cart-select-all input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 4px;
    transition: background 0.15s, border-color 0.15s;
}
.cart-item__check:checked,
.cart-select-all input[type="checkbox"]:checked {
    background: var(--primary-color, #8B4513);
    border-color: var(--primary-color, #8B4513);
}
.cart-item__check:checked::after,
.cart-select-all input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.cart-item__img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item__img img,
.cart-item__img video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cart-item__info {
    flex: 1;
}
.cart-item__name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}
.cart-item__badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 5px;
}
.cart-item__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 21px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.cart-item__badge--reserve {
    color: #d92d20;
    background: #fff1f0;
    border: 1px solid #ffd5d2;
}
/* 옵션명 스타일 */
.cart-item__option {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
    padding: 2px 0;
}
.cart-item__price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}
.cart-item__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
.cart-item__qty {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-item__qty button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item__qty span {
    font-size: 15px;
    min-width: 24px;
    text-align: center;
}
.cart-item__delete {
    color: #999;
    font-size: 13px;
    margin-top: 8px;
}

.cart-summary {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 16px;
}
.cart-summary__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}
.cart-summary__total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin: 12px 0;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.cart-summary__warning {
    display: none;
    margin: -2px 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1f0;
    border: 1px solid #ffd5d2;
    color: #d92d20;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.cart-summary__warning.is-active {
    display: block;
}
.cart-summary__btn {
    width: 100%;
    height: 52px;
    background: var(--primary-color);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
}
.cart-summary__btn:disabled {
    background: #ccc;
}
.cart-summary__btn--blocked {
    background: #bdbdbd;
    cursor: not-allowed;
}

/* 하단 네비게이션 바가 있을 때 결제 요약 위치 조정 */
body.has-bottom-nav .cart-summary {
    bottom: var(--footer-height, 60px);
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}
.cart-empty__icon {
    font-size: 48px;
    margin-bottom: 16px;
}
