* {
    box-sizing:border-box;
}

html,
body {
    margin:0;
    padding:0;
}

body {
    font-family:-apple-system,
                BlinkMacSystemFont,
                "Segoe UI",
                "Noto Sans KR",
                sans-serif;
    background:#f7f7f7;
    color:#222;
    font-size:14px;
    overscroll-behavior-y:none;
}

/* 전체 영역 */
.live-wrap {
    width:100%;
    max-width:760px;
    margin:0 auto;
    padding:8px;
}

/* 상단 제목 */
.live-header {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    margin-bottom:8px;
}

.live-header h1 {
    margin:0;
    font-size:20px;
    line-height:1.2;
    letter-spacing:-0.7px;
}

.live-header p {
    margin:4px 0 0;
    color:#777;
    font-size:12px;
    line-height:1.4;
}

/* 상태창 숨김 */
.status-box {
    display:none !important;
}

/* 검색창 */
.search-panel {
    display:block;
    width:100%;
    padding:8px;
    margin-bottom:8px;
    background:#fff;
    border-radius:14px;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
}

#keyword {
    width:100%;
    height:54px;
    border:2px solid #ddd;
    border-radius:14px;
    padding:0 14px;
    font-size:20px;
    font-weight:500;
    outline:none;
    background:#fff;
}

#keyword:focus {
    border-color:#111;
}

#btnSearch,
#btnVoice {
    display:none;
}

/* 검색 결과 수 */
.count-box {
    min-height:24px;
    padding:0 3px;
    color:#666;
    font-size:13px;
    font-weight:700;
    display:flex;
    align-items:center;
}

/* 결과 슬라이더 */
.slider-wrap {
    position:relative;
    width:100%;
}

.result-slider {
    width:100%;
    overflow:hidden;
    border-radius:16px;
}

.result-track {
    display:flex;
    width:100%;
    transition:transform .25s ease;
}

.nav-btn,
.dots {
    display:none !important;
}

/* 상품 카드 */
.product-card,
.empty-card,
.loading-card,
.error-card {
    flex:0 0 100%;
    width:100%;
    min-width:100%;
    background:#fff;
    border-radius:16px;
    box-shadow:0 2px 10px rgba(0,0,0,.06);
    padding:10px;
}

.empty-card,
.loading-card,
.error-card {
    min-height:260px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    color:#777;
    font-size:15px;
    font-weight:700;
}

.error-card {
    color:#d03050;
}

/* 상품 상단 */
.product-top {
    display:grid;
    grid-template-columns:40% 60%;
    gap:8px;
    align-items:start;
}

/* 이미지 */
.product-img {
    min-width:0;
}

.product-img img {
    width:100%;
    height:auto;
    aspect-ratio:1 / 1.12;
    object-fit:cover;
    display:block;
    border-radius:12px;
    background:#eee;
}

.no-img {
    width:100%;
    aspect-ratio:1 / 1.12;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:#eee;
    color:#999;
    font-size:12px;
    font-weight:700;
}

/* 상품정보 */
.product-info {
    min-width:0;
	    line-height:3;

}

.product-info h2 {
    margin:0 0 4px;
    font-size:14px;
    line-height:1.35;
    letter-spacing:-0.4px;
    word-break:keep-all;
}

.gcode {
    margin-bottom:7px;
    color:#777;
    font-size:11px;
    font-weight:700;
}

/* 주문영역 */
.order-box {
    width:100%;
    margin-top:6px;
}

/* 라벨 + 입력칸 */
.price-line {
    display:grid;
    grid-template-columns:58px minmax(0, 1fr);
    align-items:center;
    gap:6px;
    margin-bottom:10px;
}

.price-line label {
    color:#333;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.price-line input,
.price-line select {
    width:100%;
    min-width:0;
    height:32px;
    border:1px solid #ddd;
    border-radius:7px;
    padding:0 7px;
    background:#fff;
    color:#222;
    font-size:13px;
    outline:none;
}

.price-line input:focus,
.price-line select:focus {
    border-color:#111;
}

/* 구매자 정보 */
.buyer-line {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
    margin-top:8px;
    margin-bottom:6px;
}

.buyer-line input,
.order-box > input {
    width:100%;
    height:32px;
    border:1px solid #ddd;
    border-radius:7px;
    padding:0 8px;
    background:#fff;
    color:#222;
    font-size:13px;
    outline:none;
}

.order-box > input {
    margin-bottom:6px;
}

.buyer-line input:focus,
.order-box > input:focus {
    border-color:#111;
}

/* 결제방식 */
.pay-type {
    width:100%;
    display:grid;
    grid-template-columns:58px minmax(0, 1fr);
    align-items:center;
    gap:6px;
    margin:8px 0 10px;
}

.pay-title {
    color:#333;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.pay-options {
    min-width:0;
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:nowrap;
}

.pay-option {
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin:0;
    color:#333;
    font-size:12px;
    font-weight:500;
    line-height:1;
    white-space:nowrap;
    cursor:pointer;
}

.pay-option input[type="radio"] {
    width:15px;
    height:15px;
    margin:0;
    padding:0;
    flex:0 0 auto;
    accent-color:#111;
}

/* 버튼 */
.button-line {
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
    margin-top:6px;
}

.cart-btn,
.order-btn {
    width:100%;
    height:38px;
    border:0;
    border-radius:8px;
    color:#fff;
    font-size:13px;
    font-weight:900;
    cursor:pointer;
}

.cart-btn {
    margin-top:8px;
    background:#555;
}

.order-btn {
    background:#111;
}

.cart-btn:disabled,
.order-btn:disabled {
    opacity:.6;
    cursor:default;
}

/* 홈 버튼 */
.home-btn {
    display:block;
    margin-top:12px;
    padding:11px;
    border-radius:9px;
    background:#111;
    color:#fff !important;
    font-size:14px;
    font-weight:900;
    text-align:center;
    text-decoration:none !important;
}

/* 더 작은 모바일 */
@media (max-width:380px) {
    .live-wrap {
        padding:6px;
    }

    #keyword {
        height:50px;
        font-size:20px;
    }

    .product-top {
        grid-template-columns:39% 61%;
        gap:6px;
    }

    .product-card {
        padding:8px;
    }

    .product-info h2 {
        font-size:13px;
    }

    .gcode {
        font-size:10px;
    }

    .price-line {
        grid-template-columns:52px minmax(0, 1fr);
        gap:5px;
    }

    .price-line label,
    .pay-title {
        font-size:11px;
    }

    .price-line input,
    .price-line select,
    .buyer-line input,
    .order-box > input {
        height:30px;
        font-size:12px;
    }

    .pay-type {
        grid-template-columns:52px minmax(0, 1fr);
        gap:5px;
    }

    .pay-options {
        gap:7px;
    }

    .pay-option {
        font-size:11px;
    }

    .pay-option input[type="radio"] {
        width:14px;
        height:14px;
    }
}

.buyer-line input::placeholder,
.order-box > input::placeholder {
    color:#555;
    font-weight:500;
    opacity:1;
}


/*
----------------------------------------------------------
상품 이미지 영역
----------------------------------------------------------
*/
.product-image-box {
    position:relative;
    width:100%;
    overflow:hidden;
    background:#f5f5f5;
}

.product-image-box img {
    display:block;
    width:100%;
    height:auto;
}


/*
----------------------------------------------------------
품절 이미지 레이어
----------------------------------------------------------
*/
.soldout-image-layer {
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:0;

    display:flex;
    align-items:center;
    justify-content:center;

    background:rgba(0, 0, 0, 0.58);

    z-index:5;
    pointer-events:none;
}

.soldout-image-text {
    padding:13px 22px;

    border:3px solid rgba(255, 255, 255, 0.96);
    border-radius:7px;

    color:#fff;
    font-size:30px;
    line-height:1;
    font-weight:900;
    letter-spacing:2px;

    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.7);

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.25);

    transform:rotate(-8deg);
}


/*
----------------------------------------------------------
재고상태 표시
----------------------------------------------------------
*/
.stock-status {
    display:inline-block;

    margin:6px 0 10px;
    padding:5px 11px;

    border-radius:20px;

    background:#eef7ff;
    color:#1976d2;

    font-size:13px;
    line-height:1.3;
    font-weight:700;
}

.stock-status.soldout {
    background:#fff0f0;
    color:#e53935;
}


/*
----------------------------------------------------------
재고없음 주문수량
----------------------------------------------------------
*/
.soldout-input {
    background:#f3f3f3 !important;
    border:1px solid #ddd !important;

    color:#e53935 !important;

    font-weight:800 !important;
    text-align:center;

    cursor:not-allowed;
}


/*
----------------------------------------------------------
비활성화 입력창
----------------------------------------------------------
*/
.product-card input:disabled {
    background:#f5f5f5;
    color:#999;
    cursor:not-allowed;
}


/*
----------------------------------------------------------
비활성화 버튼
----------------------------------------------------------
*/
.cart-btn:disabled,
.order-btn:disabled {
    background:#aaa !important;
    border-color:#aaa !important;
    color:#fff !important;

    cursor:not-allowed !important;

    opacity:0.85;
}


/*
----------------------------------------------------------
결제방식 제목
----------------------------------------------------------
*/
.pay-type-title {
    margin-bottom:8px;

    color:#333;

    font-size:14px;
    font-weight:700;
}


/*
----------------------------------------------------------
모바일 품절 표시
----------------------------------------------------------
*/
@media (max-width:600px) {

    .soldout-image-text {
        padding:10px 15px;

        border-width:2px;
        border-radius:5px;

        font-size:22px;
        letter-spacing:1px;
    }

    .stock-status {
        margin:5px 0 8px;
        padding:4px 9px;

        font-size:12px;
    }
}