/* ==========================================================================
   GreenBacklink - 영카트(쇼핑) 공통 테마
   장바구니 / 상품상세(포인트충전 등) / 공통 카드·버튼·폼·가격 토큰 일원화
   메인(홈) lqd / start-hub-3 디자인 언어에 토큰 정렬 (deep teal #032A3E · 딥그린 #07473c · 민트 #00CB99)
   ========================================================================== */

:root {
    /* 메인(홈) lqd / start-hub-3 팔레트에 정렬 — mypage-ui.css 와 동일 톤 */
    --gbs-green: #07473c;          /* home --lqd-color-green : 딥그린 */
    --gbs-green-dark: #032A3E;     /* home --lqd-color-primary : 가장 진한 */
    --gbs-green-bright: #00CB99;   /* home --lqd-color-green-500 : 시그니처 민트 */
    --gbs-green-soft: #e1f2e6;     /* home --lqd-color-green-100 */
    --gbs-green-tint: #f7f7f8;     /* home --lqd-color-gray-100 */
    --gbs-bg: #f7f7f8;             /* home gray-100 중립 배경 */
    --gbs-ink: #1f2b33;            /* 홈 톤 near-black teal : 제목/값 */
    --gbs-sub: #737588;            /* home --lqd-body-text-color : 보조 텍스트 */
    --gbs-muted: #9aa0ab;
    --gbs-line: #ECEEF1;           /* 홈 톤 중립 라이트 보더 */
    --gbs-radius: 20px;            /* 홈 lqd 카드 라운드 */
    --gbs-radius-sm: 12px;
    --gbs-radius-input: 8px;
    --gbs-shadow: 0 18px 50px rgba(3, 42, 62, 0.06);
    --gbs-shadow-hover: 0 26px 60px rgba(36, 57, 91, 0.15);
}

/* ---- 페이지 래퍼 / 헤더 ------------------------------------------------- */
.gbshop-section {
    background: var(--gbs-bg);
    /* 홈과 동일 폰트 보장 (lqd base.css → Pretendard) */
    font-family: var(--lqd-text-font-family, 'Pretendard', 'Be Vietnam Pro', sans-serif);
}

.gbshop-head {
    max-width: 1200px;
    margin: 0 auto;
    padding: 46px 20px 6px;
    text-align: center;
}
.gbshop-head h2 {
    margin: 0 0 10px;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    color: var(--gbs-ink);
    letter-spacing: -.02em;
}
.gbshop-head h2::after {
    content: "";
    display: block;
    width: 52px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 99px;
    background: var(--gbs-green);
}
.gbshop-head p { margin: 0; color: var(--gbs-sub); font-size: 15px; line-height: 1.6; }
.gbshop-head p strong { color: var(--gbs-green); }

.gbshop-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 20px 100px; }

/* ---- 세그먼트 탭 (마이페이지 톤과 동일) -------------------------------- */
.gbshop-tabs {
    display: inline-flex;
    gap: 4px;
    margin: 22px auto 0;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--gbs-line);
    border-radius: 999px;
    box-shadow: var(--gbs-shadow);
}
.gbshop-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gbs-sub);
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.gbshop-tabs a:hover { color: var(--gbs-green); background: var(--gbs-green-soft); }
.gbshop-tabs a.is-active {
    color: #fff;
    background: var(--gbs-green);
    box-shadow: 0 6px 16px rgba(3, 42, 62, .22);
}
.gbshop-tabs a.is-active:hover { color: #fff; background: var(--gbs-green-dark); }

/* ==========================================================================
   공통 카드 / 버튼 / 가격
   ========================================================================== */
.gbshop-card {
    background: #fff;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius);
    box-shadow: var(--gbs-shadow);
    overflow: hidden;
}
.gbshop-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--gbs-line);
}
.gbshop-card__head::before {
    content: "";
    width: 5px;
    height: 18px;
    border-radius: 99px;
    background: var(--gbs-green);
    display: inline-block;
}
.gbshop-card__head h2,
.gbshop-card__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--gbs-ink);
    letter-spacing: -.01em;
}
.gbshop-card__body { padding: 22px 24px; }

.gbshop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: var(--gbs-radius-sm);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .15s ease, border-color .18s ease;
}
.gbshop-btn--solid { background: var(--gbs-green); color: #fff; box-shadow: 0 8px 20px rgba(3, 42, 62, .22); }
.gbshop-btn--solid:hover { background: var(--gbs-green-dark); color: #fff; transform: translateY(-1px); }
.gbshop-btn--outline { background: #fff; color: var(--gbs-green-dark); border: 1.5px solid #cfe6d8; }
.gbshop-btn--outline:hover { background: var(--gbs-green-soft); color: var(--gbs-green-dark); }
.gbshop-btn--ghost { background: var(--gbs-green-tint); color: var(--gbs-ink); }
.gbshop-btn--ghost:hover { background: var(--gbs-green-soft); color: var(--gbs-green-dark); }
.gbshop-btn--block { width: 100%; }

.gbshop-price { color: var(--gbs-green-dark); font-weight: 800; }

/* ==========================================================================
   장바구니 (shop/cart.php)
   ========================================================================== */
.gbshop-cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

.gbshop-cart-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 4px 2px 16px;
}
.gbshop-cart-tools button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: none;
    background: none;
    color: var(--gbs-sub);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}
.gbshop-cart-tools button:hover { color: #c0392b; }
.gbshop-cart-tools button i { font-size: 12px; }

.gbshop-cart-list { display: flex; flex-direction: column; gap: 14px; }

.gbshop-cart-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius);
    box-shadow: var(--gbs-shadow);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.gbshop-cart-item:hover { border-color: #cfe6d8; box-shadow: var(--gbs-shadow-hover); }

.gbshop-cart-item__chk { flex-shrink: 0; }
.gbshop-cart-item__chk input { width: 18px; height: 18px; accent-color: var(--gbs-green); cursor: pointer; }
.gbshop-cart-item__chk label { display: none; }

.gbshop-cart-item__thumb {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border-radius: var(--gbs-radius-sm);
    overflow: hidden;
    background: var(--gbs-green-tint);
    border: 1px solid var(--gbs-line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gbs-muted);
    font-size: 12px;
}
.gbshop-cart-item__thumb a { display: block; width: 100%; height: 100%; }
.gbshop-cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.gbshop-cart-item__body { flex: 1; min-width: 0; }
.gbshop-cart-item__name { font-size: 16px; font-weight: 700; line-height: 1.4; }
.gbshop-cart-item__name a { color: var(--gbs-ink); text-decoration: none; }
.gbshop-cart-item__name a:hover { color: var(--gbs-green); }
.gbshop-cart-item__name b { font-weight: 700; }
.gbshop-cart-item__opt { margin-top: 8px; font-size: 12.5px; color: var(--gbs-sub); }
.gbshop-cart-item__opt .sod_opt {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--gbs-green-soft);
    border: 1px solid #cfe6d8;
    color: var(--gbs-green-dark);
}
.gbshop-cart-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--gbs-sub);
}
.gbshop-cart-item__meta b { color: var(--gbs-ink); font-weight: 700; }

.gbshop-cart-item__price { flex-shrink: 0; text-align: right; min-width: 110px; }
.gbshop-cart-item__price .amt { font-size: 19px; font-weight: 800; color: var(--gbs-green-dark); white-space: nowrap; }
.gbshop-cart-item__price .lbl { display: block; margin-bottom: 4px; font-size: 12px; color: var(--gbs-muted); }

.sod_option_btn { margin-top: 10px; }
.sod_option_btn .mod_options {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius-sm);
    background: #fff;
    color: var(--gbs-sub);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.sod_option_btn .mod_options:hover { border-color: #cfe6d8; color: var(--gbs-green-dark); background: var(--gbs-green-soft); }

/* 합계 / 주문 사이드 카드 */
.gbshop-cart-aside { position: sticky; top: 86px; }
.gbshop-summary {
    background: #fff;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius);
    box-shadow: var(--gbs-shadow);
    overflow: hidden;
}
.gbshop-summary__head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--gbs-line);
    font-size: 16px;
    font-weight: 800;
    color: var(--gbs-ink);
    background: var(--gbs-green-tint);
}
.gbshop-summary__body { padding: 20px 22px; }
.gbshop-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    font-size: 14.5px;
    color: var(--gbs-sub);
}
.gbshop-summary__row .v { font-weight: 600; color: var(--gbs-ink); }
.gbshop-summary__row.is-point .v { color: var(--gbs-green); font-weight: 700; }
.gbshop-summary__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 16px 18px;
    border-radius: var(--gbs-radius-sm);
    background: var(--gbs-green-soft);
}
.gbshop-summary__total .lbl { font-size: 15px; font-weight: 800; color: var(--gbs-ink); }
.gbshop-summary__total .amt { font-size: 24px; font-weight: 900; color: var(--gbs-green-dark); letter-spacing: -.02em; }
.gbshop-summary__act { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.cart-naverpay { margin-top: 4px; }

.gbshop-empty {
    padding: 70px 20px;
    text-align: center;
    color: var(--gbs-sub);
    background: #fff;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius);
    box-shadow: var(--gbs-shadow);
    font-size: 15px;
}
.gbshop-empty i { display: block; margin-bottom: 12px; font-size: 36px; color: #cdded5; }
.gbshop-empty .gbshop-btn { margin-top: 22px; }

/* ==========================================================================
   상품 상세 / 포인트충전 (skin/shop/basic/item.form.skin.php) - 스코프 오버라이드
   마크업/폼 필드/JS 변경 없이 CSS 만으로 브랜드 톤 적용
   ========================================================================== */
#sit { max-width: 1180px; margin: 0 auto; }
#sit_ov_from #sit_ov_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}
#sit_ov_from #sit_pvi { flex: 1 1 360px; min-width: 280px; }
#sit_ov_from #sit_pvi_big {
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius);
    overflow: hidden;
    background: var(--gbs-green-tint);
}
#sit_ov_from #sit_pvi_big img { width: 100%; height: auto; display: block; }

#sit_ov_from #sit_ov {
    flex: 1 1 420px;
    min-width: 300px;
    background: #fff;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius);
    box-shadow: var(--gbs-shadow);
    padding: 26px 28px;
}
#sit_ov_from #sit_title {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 800;
    color: var(--gbs-ink);
    line-height: 1.35;
    letter-spacing: -.01em;
    margin: 0 0 10px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gbs-green);
}
#sit_ov_from #sit_desc { color: var(--gbs-sub); font-size: 14.5px; line-height: 1.65; margin: 0 0 6px; }
#sit_ov_from #sit_opt_info { color: var(--gbs-muted); font-size: 13px; margin: 0 0 16px; }

#sit_ov_from .sit_ov_tbl { width: 100%; border-collapse: collapse; margin: 6px 0 4px; }
#sit_ov_from .sit_ov_tbl th,
#sit_ov_from .sit_ov_tbl td {
    padding: 12px 4px;
    text-align: left;
    border-bottom: 1px solid var(--gbs-line);
    font-size: 14px;
    vertical-align: middle;
}
#sit_ov_from .sit_ov_tbl th { width: 110px; color: var(--gbs-sub); font-weight: 700; }
#sit_ov_from .sit_ov_tbl td { color: var(--gbs-ink); font-weight: 600; }
#sit_ov_from .sit_ov_tbl .tr_price td strong { font-size: 22px; font-weight: 900; color: var(--gbs-green-dark); }

#sit_ov_from .sit_option { margin-top: 18px; }
#sit_ov_from .sit_option h3,
#sit_ov_from #sit_sel_option h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--gbs-ink);
    margin: 0 0 10px;
}
#sit_ov_from #sit_sel_option { margin-top: 18px; }
#sit_ov_from #sit_opt_added { list-style: none; margin: 0; padding: 0; }
#sit_ov_from .sit_opt_list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: var(--gbs-green-tint);
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius-sm);
}
#sit_ov_from .sit_opt_subj { font-weight: 700; color: var(--gbs-ink); font-size: 14px; }
#sit_ov_from .opt_count { display: inline-flex; align-items: center; gap: 8px; }
#sit_ov_from .sit_qty_minus,
#sit_ov_from .sit_qty_plus {
    width: 34px;
    height: 34px;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius-sm);
    background: #fff;
    color: var(--gbs-sub);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#sit_ov_from .sit_qty_minus:hover,
#sit_ov_from .sit_qty_plus:hover { border-color: var(--gbs-green); color: var(--gbs-green); }
#sit_ov_from .num_input {
    width: 56px;
    height: 34px;
    text-align: center;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius-input);
    font-size: 14px;
    font-weight: 700;
    color: var(--gbs-ink);
}
#sit_ov_from .num_input:focus { outline: none; border-color: var(--gbs-green); box-shadow: 0 0 0 3px rgba(7, 71, 60, .15); }
#sit_ov_from .sit_opt_prc { color: var(--gbs-green-dark); font-weight: 700; font-size: 14px; }

#sit_ov_from select,
#sit_ov_from input[type="text"]:not(.num_input) {
    padding: 9px 11px;
    border: 1px solid var(--gbs-line);
    border-radius: var(--gbs-radius-input);
    font-size: 14px;
    color: var(--gbs-ink);
    background: #fff;
}
#sit_ov_from select:focus,
#sit_ov_from input[type="text"]:focus { outline: none; border-color: var(--gbs-green); box-shadow: 0 0 0 3px rgba(7, 71, 60, .15); }

#sit_ov_from #sit_tot_price {
    margin: 18px 0 4px;
    padding: 16px 18px;
    border-radius: var(--gbs-radius-sm);
    background: var(--gbs-green-soft);
    font-weight: 800;
    color: var(--gbs-ink);
    text-align: right;
}
#sit_ov_from #sit_tot_price strong,
#sit_ov_from #sit_tot_price .price { color: var(--gbs-green-dark); }

#sit_ov_from #sit_ov_btn { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
#sit_ov_from #sit_ov_btn .sit_btn_cart,
#sit_ov_from #sit_ov_btn .sit_btn_buy {
    flex: 1 1 140px;
    min-height: 52px;
    border: none;
    border-radius: var(--gbs-radius-sm);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, transform .15s ease;
}
#sit_ov_from #sit_ov_btn .sit_btn_cart {
    background: #fff;
    color: var(--gbs-green-dark);
    border: 1.5px solid #cfe6d8;
}
#sit_ov_from #sit_ov_btn .sit_btn_cart:hover { background: var(--gbs-green-soft); }
#sit_ov_from #sit_ov_btn .sit_btn_buy {
    background: var(--gbs-green);
    color: #fff;
    box-shadow: 0 8px 20px rgba(3, 42, 62, .22);
}
#sit_ov_from #sit_ov_btn .sit_btn_buy:hover { background: var(--gbs-green-dark); transform: translateY(-1px); }
#sit_ov_from #sit_ov_btn .sit_btn_wish {
    width: 52px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--gbs-line);
    border-radius: var(--gbs-radius-sm);
    color: var(--gbs-sub);
    background: #fff;
    text-decoration: none;
}
#sit_ov_from #sit_ov_btn .sit_btn_wish:hover { border-color: var(--gbs-green); color: var(--gbs-green); }

#sit_ov_from #sit_star_sns { margin: 4px 0 14px; color: var(--gbs-sub); font-size: 13px; }
#sit_ov_from #sit_ov_soldout { color: #c0392b; font-weight: 700; margin: 14px 0; }

/* ==========================================================================
   반응형 — 기기별 콘텐츠 폭 + 레이아웃
   브레이크포인트: 2560(QHD) / 1920(FHD) / 1440(노트북)
                  / 1280·1024(태블릿가로) / 992·768(태블릿세로) / 480(모바일)
   콘텐츠 래퍼(.gbshop-head/.gbshop-wrap/#sit)만 중앙 정렬로 휑함 제거.
   ========================================================================== */

/* --- QHD(2560+) : 과도한 여백 방지로 약간만 넓힘(중앙 유지) --- */
@media (min-width: 2560px) {
    .gbshop-head,
    .gbshop-wrap { max-width: 1320px; }
    #sit { max-width: 1320px; }
}

/* --- 노트북/소형 데스크탑(~1439) : 표준(기본값 사용) --- */

/* --- 태블릿 가로(~1279) : 좌우 여백 유동, 장바구니는 2열 유지 --- */
@media (max-width: 1279px) {
    .gbshop-head,
    .gbshop-wrap { max-width: 100%; }
    .gbshop-cart { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
}

/* --- 태블릿 세로(~991) : 장바구니 1열 스택(합계 카드 하단으로) --- */
@media (max-width: 991px) {
    .gbshop-cart { grid-template-columns: 1fr; }
    .gbshop-cart-aside { position: static; }
    /* 상품상세 좌우 2열 → 세로 스택 */
    #sit_ov_from #sit_ov_wrap { gap: 22px; }
    #sit_ov_from #sit_pvi,
    #sit_ov_from #sit_ov { flex: 1 1 100%; }
}

/* --- 태블릿 세로/모바일(~767) : 카드 컴팩트 + 풀폭 버튼 --- */
@media (max-width: 767px) {
    .gbshop-head { padding-top: 32px; }
    .gbshop-head h2 { font-size: clamp(21px, 6vw, 26px); }
    .gbshop-tabs { width: 100%; justify-content: space-between; border-radius: 14px; }
    .gbshop-tabs a { flex: 1; justify-content: center; padding: 11px 6px; font-size: 13px; min-height: 44px; }
    .gbshop-wrap { padding: 22px 14px 90px; }

    /* 장바구니 아이템 = 세로 카드 스택 */
    .gbshop-cart-item { flex-wrap: wrap; gap: 14px; padding: 16px; }
    .gbshop-cart-item__body { flex: 1 1 100%; order: 3; }
    .gbshop-cart-item__price { flex: 1 1 100%; order: 4; text-align: left; }
    .gbshop-cart-item__price .lbl { display: inline; }
    .gbshop-cart-item__price .amt { font-size: 18px; }

    /* 합계 / 주문 버튼 풀폭 + 터치영역 */
    .gbshop-summary__total .amt { font-size: 22px; }
    .gbshop-btn { min-height: 48px; }

    /* 상품상세 버튼 풀폭 */
    #sit_ov_from #sit_ov { padding: 22px 18px; }
    #sit_ov_from #sit_ov_btn .sit_btn_cart,
    #sit_ov_from #sit_ov_btn .sit_btn_buy { flex: 1 1 100%; }
    #sit_ov_from .sit_opt_list { gap: 10px; }
}

/* --- 모바일(~480) : 최소 여백, 가로스크롤 제거 --- */
@media (max-width: 480px) {
    .gbshop-wrap { padding: 18px 12px 80px; }
    .gbshop-card__body { padding: 18px 16px; }
    .gbshop-cart-item { padding: 14px; gap: 12px; }
    .gbshop-cart-item__thumb { width: 64px; height: 64px; }
    .gbshop-cart-item__name { font-size: 15px; }
    .gbshop-summary__body,
    .gbshop-summary__act { padding-left: 18px; padding-right: 18px; }
    #sit_ov_from .sit_opt_list { flex-direction: column; align-items: stretch; }
    #sit_ov_from .opt_count { justify-content: space-between; }
}

/* --- 폴드/플립(≤359) --- */
@media (max-width: 359px) {
    .gbshop-tabs a span { font-size: 12px; }
    .gbshop-cart-item__thumb { width: 56px; height: 56px; }
}
