/* BASIC css start */
/* ============================================
   장바구니 페이지 - PC 전용 디자인
   ============================================ */

/* 변수 */
:root {
    --bk-text: #222;
    --bk-text-sub: #666;
    --bk-text-light: #999;
    --bk-line: #e5e5e5;
    --bk-line-strong: #222;
    --bk-bg-light: #fafafa;
    --bk-point: #f40000;
    --bk-primary: #222;
    --bk-yellow: #fee500;
}

/* 컨테이너 */
#basket.basket-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    color: var(--bk-text);
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

#basket * {
    box-sizing: border-box;
}

/* 페이지 제목 */
.basket-heading {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px;
    color: var(--bk-text);
}
.basket-heading span {
    font-weight: 400;
    color: var(--bk-text-sub);
    margin-left: 4px;
}

/* 레이아웃 (2단) */
.basket-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: flex-start;
}

/* ============================================
   좌측 - 상품 목록
   ============================================ */
.basket-goods {
    min-width: 0;
}

/* 빈 장바구니 */
.basket-goods__empty {
    border-top: 2px solid var(--bk-line-strong);
    border-bottom: 1px solid var(--bk-line);
    padding: 80px 20px;
    text-align: center;
    color: var(--bk-text-sub);
    font-size: 15px;
}

/* 헤더 (전체선택 + 선택삭제) */
.basket-goods__header {
    display: flex;
    align-items: center;
    padding: 12px 4px;
    font-size: 14px;
}
.basket-goods__header .basket-check {
    display: flex;
    align-items: center;
    gap: 8px;
}
.basket-goods__header .basket-check label {
    font-weight: 600;
    cursor: pointer;
}
.basket-goods__header .basket-link-del {
    margin-left: auto;
    color: var(--bk-text-sub);
    text-decoration: none;
    font-size: 13px;
}
.basket-goods__header .basket-link-del:hover {
    color: var(--bk-text);
    text-decoration: underline;
}

/* 체크박스 공통 */
.basket-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.basket-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--bk-text);
    cursor: pointer;
}

/* 상품 목록 */
.basket-goods__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 2px solid var(--bk-line-strong);
}

/* 개별 상품 */
.basket-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--bk-line);
}

.basket-item__top {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.basket-item__actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

/* 아이콘 버튼 (하트, 삭제) */
.btn-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--bk-text-sub);
    font-size: 0;
    position: relative;
}
.btn-icon::before {
    font-size: 16px;
    line-height: 1;
}
.btn-wish::before {
    content: "♡";
    font-size: 20px;
}
.btn-wish:hover::before {
    color: var(--bk-point);
    content: "♥";
}
.btn-del::before {
    content: "×";
    font-size: 22px;
    font-weight: 300;
}
.btn-del:hover::before {
    color: var(--bk-text);
}

/* 상품 본문 - 그리드 레이아웃 */
.basket-item__body {
    display: grid;
    grid-template-columns: 100px 1fr 110px 130px 110px;
    gap: 20px;
    align-items: center;
}

/* 이미지 */
.basket-item__image {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border: 1px solid var(--bk-line);
    background: #fff;
}
.basket-item__image a {
    display: block;
    width: 100%;
    height: 100%;
}
.basket-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 상품명/옵션/가격 */
.basket-item__details {
    min-width: 0;
}
.basket-item__name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--bk-text);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 6px;
}
.basket-item__name:hover {
    text-decoration: underline;
}
.basket-item__icons {
    margin: 4px 0;
    line-height: 1;
}
.basket-item__icons:empty {
    display: none;
}
.basket-item__icons img {
    height: 20px;
    width: auto;
    margin-right: 4px;
    vertical-align: middle;
}
.basket-item__option {
    font-size: 12px;
    color: var(--bk-text-sub);
    margin: 4px 0 8px;
    line-height: 1.5;
}
.basket-item__price {
    margin: 8px 0 0;
    font-size: 15px;
    color: var(--bk-text);
}
.basket-item__price strong {
    font-weight: 700;
    font-size: 16px;
}

/* 적립금 */
.basket-item__reserve {
    text-align: center;
    font-size: 12px;
    color: var(--bk-text-sub);
}
.basket-item__reserve .label {
    display: block;
    margin-bottom: 2px;
}
.basket-item__reserve .value {
    color: var(--bk-text);
    font-weight: 500;
}

/* 배송비 */
.basket-item__delivery {
    text-align: center;
    font-size: 12px;
    color: var(--bk-text-sub);
}

/* 수량 */
.basket-item__quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.qty-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--bk-line);
    background: #fff;
    height: 32px;
}
.qty-btn {
    width: 28px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--bk-text);
    font-size: 16px;
    background: #fff;
    user-select: none;
}
.qty-btn:hover {
    background: var(--bk-bg-light);
}
.qty-group input.qty-input,
.qty-group input[type="text"] {
    width: 36px;
    height: 30px;
    border: none;
    border-left: 1px solid var(--bk-line);
    border-right: 1px solid var(--bk-line);
    text-align: center;
    font-size: 13px;
    color: var(--bk-text);
    background: #fff;
    padding: 0;
    -moz-appearance: textfield;
}
.qty-group input.qty-input::-webkit-outer-spin-button,
.qty-group input.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 옵션변경 버튼 */
.btn-option-modify {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--bk-text);
    background: #fff;
    border: 1px solid var(--bk-line);
    text-decoration: none;
    border-radius: 2px;
}
.btn-option-modify:hover {
    border-color: var(--bk-text);
}

/* 안내 문구 + 견적서 */
.basket-goods__note {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 16px;
    padding: 0 4px;
}
.basket-goods__note ul {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--bk-text-sub);
}
.basket-goods__note li {
    margin-top: 4px;
    line-height: 1.6;
}
.basket-goods__note em {
    color: var(--bk-text);
    font-style: normal;
    font-weight: 600;
}
.btn-estimate {
    flex-shrink: 0;
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--bk-line);
    background: #fff;
    color: var(--bk-text);
    font-size: 13px;
    text-decoration: none;
    border-radius: 2px;
}
.btn-estimate:hover {
    border-color: var(--bk-text);
}

/* 배송 메시지 */
.basket-delivery-msg {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bk-bg-light);
    font-size: 13px;
    text-align: center;
    border-radius: 2px;
}
.basket-delivery-msg p {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

/* ============================================
   우측 - 결제 정보
   ============================================ */
.basket-pay {
    position: sticky;
    top: 20px;
}

.basket-pay__box {
    border: 1px solid var(--bk-line);
    padding: 28px 24px 24px;
    background: #fff;
}

.basket-pay__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--bk-text);
}

.basket-pay__info {
    list-style: none;
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid var(--bk-line-strong);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.basket-pay__info li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--bk-text-sub);
}
.basket-pay__info .amount {
    color: var(--bk-text);
    font-weight: 400;
}
.basket-pay__info .amount strong {
    font-weight: 600;
}
.basket-pay__info .amount.minus {
    color: var(--bk-point);
}

.basket-pay__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--bk-line);
    font-size: 15px;
    font-weight: 700;
}
.basket-pay__total .amount {
    font-size: 18px;
    color: var(--bk-text);
    font-weight: 400;
}
.basket-pay__total .amount strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--bk-point);
    margin-right: 2px;
}

.basket-pay__point {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--bk-text-sub);
    text-align: right;
}

/* 결제 버튼 */
.basket-pay__buttons {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}
.btn-order {
    flex: 1;
    display: block;
    height: 54px;
    line-height: 54px;
    background: var(--bk-primary);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: 2px;
}
.btn-order:hover {
    background: #000;
}
.btn-gift {
    flex-shrink: 0;
    display: block;
    width: 60px;
    height: 54px;
    line-height: 54px;
    background: #fff;
    color: var(--bk-text);
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--bk-line);
    border-radius: 2px;
}
.btn-gift:hover {
    border-color: var(--bk-text);
}

/* 보조 버튼 */
.basket-pay__sub-buttons {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}
.btn-sub {
    flex: 1;
    display: block;
    height: 40px;
    line-height: 40px;
    background: #fff;
    color: var(--bk-text-sub);
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--bk-line);
    border-radius: 2px;
}
.btn-sub:hover {
    color: var(--bk-text);
    border-color: var(--bk-text);
}

/* 간편결제 */
.basket-quickpay {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.basket-quickpay > div,
.basket-quickpay > a,
.basket-quickpay > img {
    max-width: 100%;
}
#nhn_btn,
#payco_order_btn {
    display: block !important;
}

/* ============================================
   공지 이미지
   ============================================ */
.basket-notice-img {
    margin-top: 40px;
    text-align: center;
}
.basket-notice-img img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   추천상품 / 연관상품 / 관심상품 영역 (슬라이더)
   ============================================ */
.basket-recmd {
    margin-top: 80px;
    position: relative;
}

.basket-recmd__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.basket-recmd__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--bk-text);
}
.basket-recmd__desc {
    font-size: 14px;
    color: var(--bk-text-sub);
    margin: 0;
}
.basket-recmd__desc strong {
    color: var(--bk-point);
    font-weight: 700;
}

/* 네비 화살표 */
.basket-recmd__nav {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.recmd-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--bk-line);
    background: #fff;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity 0.15s, border-color 0.15s;
}
.recmd-nav-btn:hover {
    border-color: var(--bk-text);
}
.recmd-nav-btn.is-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.recmd-nav-btn span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid var(--bk-text);
    border-right: 1.5px solid var(--bk-text);
}
.recmd-nav-prev span {
    transform: rotate(-135deg);
    margin-left: 3px;
}
.recmd-nav-next span {
    transform: rotate(45deg);
    margin-right: 3px;
}

/* 뷰포트 (overflow hidden) */
.basket-recmd__viewport {
    overflow: hidden;
    width: 100%;
}

/* 리스트 (가로 flex 트랙) */
.basket-recmd__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.basket-recmd__list li {
    /* 한 줄에 정확히 6개씩 보이도록 너비 계산 */
    /* 6개 사이의 gap 5개 = 16px * 5 = 80px */
    flex: 0 0 calc((100% - 80px) / 6);
    min-width: 0;
}

/* 상품 카드 */
.recmd-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bk-bg-light);
    margin-bottom: 12px;
}
.recmd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.recmd-thumb:hover img {
    transform: scale(1.04);
}
.recmd-name-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.recmd-name {
    font-size: 13px;
    color: var(--bk-text);
    margin: 0 0 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 36px;
}
.recmd-price {
    margin: 0;
    font-size: 14px;
    color: var(--bk-text);
}
.recmd-price strong {
    font-weight: 700;
}
.recmd-price-original {
    margin-left: 6px;
    font-size: 12px;
    color: var(--bk-text-light);
    text-decoration: line-through;
}

/* ============================================
   기존 호환 (혹시 남는 클래스 보정)
   ============================================ */
#cartWrap { display: none; } /* 옛 구조 비활성 (사용 안 함) */

/* makeshop 기본 텍스트 입력 보정 */
.basket-item__quantity .txt-spin,
.basket-item__quantity input[type="text"] {
    width: 36px;
    height: 30px;
    border: none;
    border-left: 1px solid var(--bk-line);
    border-right: 1px solid var(--bk-line);
    text-align: center;
    font-size: 13px;
}
/* BASIC css end */

