@charset "UTF-8";

/* ==========================================================================
   화천(HWACHEON) Cart 장바구니
   ========================================================================== */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #ffffff !important;
    color: #111111;
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.main-container {
    width: 100%;
    overflow-x: hidden;
    padding-top: 4.5rem;
    box-sizing: border-box;
}

.max-layout-width {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-section-padding {
    padding: 5rem 0 8rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   1. 서브 히어로 배너
   ────────────────────────────────────────────────────────────────────────── */
.sub-hero-banner {
    width: 100%;
    background: #fafafa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 5rem 2rem 4.5rem;
    text-align: center;
    box-sizing: border-box;
}

.banner-inner {
    max-width: 800px;
    margin: 0 auto;
}

.sub-category-tag {
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: #888888;
    display: block;
    margin-bottom: 0.8rem;
}

.sub-page-title {
    font-family: 'Jost', sans-serif;
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #111111;
    margin: 0 0 1rem 0;
}

.sub-page-desc {
    font-size: 0.98rem;
    color: #666666;
    margin: 0;
    word-break: keep-all;
}

.cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3.5rem;
    align-items: flex-start;
}

.cart-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid #111111;
    margin-bottom: 1.5rem;
}

.btn-delete-selected {
    background: none;
    border: none;
    font-size: 0.88rem;
    color: #777777;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-delete-selected:hover {
    color: #111111;
    text-decoration: underline;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: #ffffff;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #111111;
    border-color: #111111;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: bold;
}

.checkbox-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: #111111;
}

.cart-item-list {
    display: flex;
    flex-direction: column;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 30px 100px 1fr 120px 120px;
    gap: 1.5rem;
    align-items: center;
    padding: 1.8rem 0;
    border-bottom: 1px solid #e2e2e2;
}

.cart-item-thumb {
    width: 100px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.item-cate {
    font-family: 'Jost', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #888888;
}

.item-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.item-name a {
    color: #111111;
    text-decoration: none;
}

.item-opt {
    font-size: 0.85rem;
    color: #777777;
    margin: 0;
}

.item-unit-price {
    font-size: 0.92rem;
    font-weight: 500;
    color: #111111;
}

/* ──────────────────────────────────────────────────────────────────────────
   2. 수량 조절 버튼 & 인풋 (가운데 정렬 완벽 보정)
   ────────────────────────────────────────────────────────────────────────── */
.cart-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    overflow: hidden;
    width: 100px;
    height: 34px;
    background: #ffffff;
    box-sizing: border-box;
}

.btn-qty {
    width: 30px;
    height: 100%;
    background: #fafafa;
    border: none;
    font-size: 1.1rem;
    color: #555555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: background 0.2s ease;
    user-select: none;
}

.btn-qty:hover {
    background: #e9ecef;
}

.qty-input {
    width: 40px;
    height: 100%;
    border: none;
    background: #ffffff;
    text-align: center !important;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111111;
    font-family: 'Jost', sans-serif;
    outline: none;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    -moz-appearance: textfield; /* 파이어폭스 기본 스피너 제거 */
}

/* 크롬, 사파리, 엣지용 기본 스피너 제거 */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subtotal-price {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111111;
    font-family: 'Jost', sans-serif;
}

.btn-remove-item {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.btn-remove-item:hover {
    color: #111111;
}

.cart-empty-msg {
    text-align: center;
    padding: 6rem 0;
    color: #777777;
}

.cart-empty-msg p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.btn-go-shop {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #111111;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. 우측: 주문 요약 카드
   ────────────────────────────────────────────────────────────────────────── */
.summary-card {
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    padding: 2.2rem;
    background: #fafafa;
}

.summary-title {
    font-family: 'Jost', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #111111;
    margin: 0 0 1.8rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #111111;
}

.summary-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #555555;
    margin-bottom: 1rem;
}

.summary-price-row span:last-child {
    color: #111111;
    font-weight: 500;
    font-family: 'Jost', sans-serif;
}

.delivery-notice {
    font-size: 0.82rem;
    color: #888888;
    margin: 0 0 1.5rem 0;
}

.summary-divider {
    height: 1px;
    background: #e2e2e2;
    margin: 1.5rem 0;
}

.total-row {
    font-size: 1.05rem;
    color: #111111;
    align-items: center;
}

.total-row strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111111;
    font-family: 'Jost', sans-serif;
}

.btn-checkout {
    width: 100%;
    height: 54px;
    background: #111111;
    color: #ffffff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-top: 2rem;
    transition: background 0.25s ease;
}

.btn-checkout:hover {
    background: #333333;
}

.btn-continue-shopping {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: #666666;
    text-decoration: none;
}

.btn-continue-shopping:hover {
    color: #111111;
    text-decoration: underline;
}

.reveal-element {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1023px) {
    .cart-layout-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 767px) {
    .sub-page-title {
        font-size: 2.1rem;
    }
    .cart-item-card {
        grid-template-columns: 24px 80px 1fr;
        gap: 1rem;
    }
    .cart-item-qty, .cart-item-subtotal {
        grid-column: span 3;
        justify-content: space-between;
    }
}