/* 총알핀 쇼핑몰 화면 — 로고 톤(골드 + 차콜) */
:root {
	--cgp-gold: #c9a04a;
	--cgp-gold-2: #e8c870;
	--cgp-gold-deep: #9a7428;
	--cgp-gold-soft: #f6eedb;
	--cgp-ink: #1c1c21;
	--cgp-ink-2: #2d2d34;
	--cgp-text: #26262b;
	--cgp-muted: #6c6c75;
	--cgp-bg: #faf8f3;
	--cgp-card: #ffffff;
	--cgp-line: #ebe4d3;
	--cgp-red: #c0392b;
	--cgp-radius: 14px;
	--cgp-gold-grad: linear-gradient(135deg, #f1d68a 0%, #c9a04a 45%, #a47a2c 100%);
}

/* ---------- 공통 ---------- */
body.cgp-site {
	font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
	background: var(--cgp-bg);
	color: var(--cgp-text);
	word-break: keep-all;
	-webkit-font-smoothing: antialiased;
}
.cgp-site :where(h1, h2, h3, h4, .wp-block-heading, .wp-block-post-title) {
	font-family: inherit;
	letter-spacing: -0.02em;
}
.cgp-site a { color: var(--cgp-gold-deep); }
.cgp-site .wp-site-blocks > main { margin-top: 0; }
.cgp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.cgp-m { display: none; }
@media (max-width: 600px) { .cgp-m { display: inline; } }

.cgp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 48px; padding: 0 22px; border-radius: 999px;
	font-weight: 700; font-size: 16px; text-decoration: none !important; line-height: 1;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	box-sizing: border-box;
}
.cgp-btn:active { transform: translateY(1px); }
.cgp-btn-gold { background: var(--cgp-gold-grad); color: var(--cgp-ink) !important; box-shadow: 0 6px 18px rgba(201, 160, 74, .35); }
.cgp-btn-gold:hover { box-shadow: 0 8px 22px rgba(201, 160, 74, .5); }
.cgp-btn-ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff !important; }
.cgp-btn-ghost:hover { border-color: var(--cgp-gold-2); color: var(--cgp-gold-2) !important; }
.cgp-btn-line { border: 1px solid var(--cgp-line); color: var(--cgp-text) !important; background: #fff; }
.cgp-btn-kakao { background: #fee500; color: #191600 !important; }

/* ---------- 헤더(템플릿 파트 .cgp-header) ---------- */
.cgp-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: saturate(160%) blur(8px);
	border-bottom: 1px solid var(--cgp-line);
}
.cgp-header .wp-block-site-logo img { width: 116px !important; height: auto !important; max-height: none; }
@media (max-width: 600px) { .cgp-header .wp-block-site-logo img { width: 92px !important; } }
.cgp-header .wp-block-navigation { font-weight: 600; font-size: 15px; }
.cgp-header .wp-block-navigation a { color: var(--cgp-ink) !important; }
.cgp-header .wp-block-navigation a:hover { color: var(--cgp-gold-deep) !important; }
.cgp-header .wc-block-mini-cart__button, .cgp-header .wc-block-customer-account a { color: var(--cgp-ink) !important; }
.cgp-header .wc-block-mini-cart__badge { background: var(--cgp-gold) !important; color: var(--cgp-ink) !important; }

/* ---------- 메인 히어로 ---------- */
.cgp-home { color: var(--cgp-text); }
.cgp-hero {
	position: relative; overflow: hidden;
	background:
		repeating-linear-gradient(-12deg, transparent 0 46px, rgba(232, 200, 112, .06) 46px 48px),
		radial-gradient(120% 90% at 85% 10%, #3a3325 0%, rgba(58, 51, 37, 0) 55%),
		linear-gradient(180deg, #202026 0%, var(--cgp-ink) 100%);
	color: #fff; padding: 64px 0 40px;
}
.cgp-hero::after {
	content: ""; position: absolute; right: -80px; top: 50%; width: 520px; height: 3px;
	background: linear-gradient(90deg, rgba(232, 200, 112, 0), var(--cgp-gold-2));
	transform: rotate(-12deg); opacity: .5;
}
.cgp-hero-eyebrow { color: var(--cgp-gold-2); font-weight: 700; font-size: 14px; letter-spacing: .08em; margin: 0 0 14px; }
.cgp-hero-title { color: #fff; font-size: clamp(30px, 6vw, 52px); line-height: 1.2; font-weight: 800; margin: 0 0 16px; }
.cgp-hero-title span { background: var(--cgp-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cgp-hero-sub { color: rgba(255, 255, 255, .78); font-size: clamp(15px, 2.2vw, 18px); line-height: 1.6; margin: 0 0 28px; }
.cgp-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.cgp-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 720px; }
.cgp-points li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(232, 200, 112, .22); border-radius: 12px; padding: 14px; }
.cgp-points strong { display: block; color: var(--cgp-gold-2); font-size: 16px; margin-bottom: 4px; }
.cgp-points span { color: rgba(255, 255, 255, .7); font-size: 13px; line-height: 1.4; }
@media (max-width: 600px) {
	.cgp-hero { padding: 44px 0 28px; }
	.cgp-points { grid-template-columns: 1fr; }
	.cgp-points li { display: flex; gap: 10px; align-items: baseline; padding: 11px 14px; }
	.cgp-points strong { margin: 0; min-width: 64px; }
	.cgp-hero-cta .cgp-btn { flex: 1; }
}

/* ---------- 섹션 ---------- */
.cgp-section { padding: 48px 0; }
.cgp-section-alt { background: #fff; border-top: 1px solid var(--cgp-line); border-bottom: 1px solid var(--cgp-line); }
.cgp-h2 { font-size: clamp(22px, 3.4vw, 28px); font-weight: 800; margin: 0 0 20px; color: var(--cgp-ink); }
.cgp-h2::before { content: ""; display: inline-block; width: 6px; height: 22px; border-radius: 3px; background: var(--cgp-gold-grad); margin-right: 10px; vertical-align: -3px; }

/* 탭 */
.cgp-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 0 0 18px; scrollbar-width: none; }
.cgp-tabs::-webkit-scrollbar { display: none; }
.cgp-tabs button {
	flex: none; border: 1px solid var(--cgp-line); background: #fff; color: var(--cgp-text);
	border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.cgp-tabs button.is-on { background: var(--cgp-ink); color: var(--cgp-gold-2); border-color: var(--cgp-ink); }

/* 상품 카드 */
.cgp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .cgp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cgp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.cgp-card {
	position: relative; display: flex; flex-direction: column; background: var(--cgp-card);
	border: 1px solid var(--cgp-line); border-radius: var(--cgp-radius); overflow: hidden;
	text-decoration: none !important; color: var(--cgp-text) !important;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cgp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(28, 28, 33, .08); border-color: var(--cgp-gold); }
.cgp-card[hidden] { display: none; }
.cgp-card-img { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cgp-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cgp-card-mark { font-weight: 800; font-size: clamp(18px, 2.6vw, 24px); letter-spacing: -0.02em; padding: 0 10px; text-align: center; }
.cgp-tone-1 { background: linear-gradient(135deg, #2d2d34, #1c1c21); color: var(--cgp-gold-2); }
.cgp-tone-2 { background: var(--cgp-gold-grad); color: var(--cgp-ink); }
.cgp-tone-3 { background: linear-gradient(135deg, #4a3c22, #2a2217); color: #f1d68a; }
.cgp-tone-4 { background: linear-gradient(135deg, #fbf5e6, #efe3c3); color: var(--cgp-ink); }
.cgp-card-badge { position: absolute; top: 10px; left: 10px; background: var(--cgp-red); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.cgp-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.cgp-card-cat { font-size: 12px; color: var(--cgp-muted); }
.cgp-card-name { font-size: 15px; line-height: 1.35; color: var(--cgp-ink); }
.cgp-card-opts { font-size: 12px; color: var(--cgp-muted); line-height: 1.4; }
.cgp-card-price { margin-top: auto; padding-top: 6px; font-weight: 800; font-size: 15px; color: var(--cgp-gold-deep); }
.cgp-card.is-out { opacity: .6; }
.cgp-card.is-out .cgp-card-price { color: var(--cgp-muted); }
.cgp-empty { color: var(--cgp-muted); }

/* 이용 방법 */
.cgp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cgp-steps li { background: var(--cgp-bg); border: 1px solid var(--cgp-line); border-radius: var(--cgp-radius); padding: 20px; }
.cgp-steps b { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; background: var(--cgp-ink); color: var(--cgp-gold-2); font-size: 15px; margin-bottom: 12px; }
.cgp-steps strong { display: block; font-size: 17px; margin-bottom: 6px; color: var(--cgp-ink); }
.cgp-steps span { color: var(--cgp-muted); font-size: 14px; line-height: 1.55; }
@media (max-width: 720px) { .cgp-steps { grid-template-columns: 1fr; } }

/* 안내 박스 */
.cgp-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 820px) { .cgp-two { grid-template-columns: 1fr; } }
.cgp-box { background: #fff; border: 1px solid var(--cgp-line); border-radius: var(--cgp-radius); padding: 22px; }
.cgp-box h3 { margin: 0 0 12px; font-size: 18px; color: var(--cgp-ink); }
.cgp-box ul { margin: 0; padding-left: 18px; }
.cgp-box li { margin: 0 0 8px; line-height: 1.6; font-size: 14px; }
.cgp-box-warn { border-color: #efd2cd; background: #fffaf8; }
.cgp-box-warn h3 { color: var(--cgp-red); }
.cgp-box-support { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--cgp-ink); border-color: var(--cgp-ink); color: #fff; }
.cgp-box-support h3 { color: var(--cgp-gold-2); }
.cgp-support-phone { font-size: 28px; font-weight: 800; color: #fff !important; text-decoration: none; }
.cgp-support-hours { margin: 0; color: #fff; font-weight: 700; font-size: 18px; line-height: 1.5; }
.cgp-support-note { margin: 0 0 6px; color: rgba(255, 255, 255, .65); font-size: 14px; }
.cgp-box-support .cgp-btn { min-height: 44px; font-size: 15px; }

/* ---------- 푸터 ---------- */
.cgp-footer { background: var(--cgp-ink); color: rgba(255, 255, 255, .6); padding: 32px 0 40px; font-size: 13px; line-height: 1.8; }
.cgp-footer a { color: rgba(255, 255, 255, .85) !important; text-decoration: none; margin-right: 16px; }
.cgp-footer a:hover { color: var(--cgp-gold-2) !important; }
.cgp-footer-links { margin-bottom: 12px; }
.cgp-footer-info span { display: inline-block; margin-right: 14px; }
.cgp-footer-hours { color: var(--cgp-gold-2); margin: 8px 0; }
.cgp-footer-copy { margin: 8px 0 0; color: rgba(255, 255, 255, .4); }
.cgp-site footer.wp-block-template-part { margin-top: 0; }

/* ---------- 상품 상세 ---------- */
.cgp-pbadges { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cgp-pbadges li { background: var(--cgp-gold-soft); color: var(--cgp-gold-deep); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; }
.cgp-pnotice { margin-top: 16px; border: 1px solid #efd2cd; background: #fffaf8; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; }
.cgp-pnotice p { margin: 0 0 4px; }
.cgp-pnotice strong { color: var(--cgp-red); margin-right: 4px; }

/* 권종 버튼(store.js 가 select 를 버튼으로 바꿈) */
.cgp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.cgp-chips button {
	min-width: 84px; min-height: 44px; padding: 0 14px; border-radius: 10px;
	border: 1.5px solid var(--cgp-line); background: #fff; color: var(--cgp-ink);
	font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.cgp-chips button.is-on { border-color: var(--cgp-gold); background: var(--cgp-gold-soft); color: var(--cgp-gold-deep); box-shadow: inset 0 0 0 1px var(--cgp-gold); }
.cgp-chips button:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.cgp-site table.variations select.cgp-hidden-select { position: absolute !important; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.cgp-site table.variations .reset_variations { display: none !important; }

/* ---------- 우커머스 버튼·가격 톤 ---------- */
.cgp-site .single_add_to_cart_button,
.cgp-site .wc-block-components-button:not(.is-link),
.cgp-site .woocommerce a.button.alt,
.cgp-site .woocommerce button.button.alt,
.cgp-site .wp-block-button__link.wc-block-components-product-button__button {
	background: var(--cgp-ink) !important; color: var(--cgp-gold-2) !important;
	border-radius: 12px !important; border: 0 !important; font-weight: 700 !important;
}
.cgp-site .single_add_to_cart_button:hover,
.cgp-site .wc-block-components-button:not(.is-link):hover { background: #000 !important; }
.cgp-site .wc-block-components-checkout-place-order-button,
.cgp-site #place_order { background: var(--cgp-gold-grad) !important; color: var(--cgp-ink) !important; }
.cgp-site .woocommerce-Price-amount { color: var(--cgp-ink); font-weight: 800; }
.cgp-site .product .summary .price { font-size: 24px; }
.cgp-site .woocommerce-message, .cgp-site .woocommerce-info { border-top-color: var(--cgp-gold) !important; }

/* 핀번호 표시(마이페이지) */
.cgp-site .cgp-pins h2 { font-size: 20px; }
.cgp-site .cgp-box h3 span { font-weight: 700; }

/* ---------- 메인: 테마 본문 폭 해제(전체 폭) ---------- */
body.cgp-site { overflow-x: hidden; }
.cgp-site .wp-block-post-content > .cgp-home,
.cgp-site .entry-content > .cgp-home {
	max-width: none !important;
	width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}
.cgp-site.home main.wp-block-group { padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; }
.cgp-site.home .wp-block-post-content { padding-left: 0; padding-right: 0; }
.cgp-home p:empty { display: none; }
.cgp-home .cgp-steps span, .cgp-home .cgp-points span { display: block; }

/* 이미지 없는 상품: 이름 타일 */
.cgp-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; width: 100%; border-radius: 10px; font-weight: 800; font-size: 13px; text-align: center; padding: 4px; box-sizing: border-box; line-height: 1.2; }
.cgp-tile-big { aspect-ratio: 16 / 11; border-radius: var(--cgp-radius); font-size: clamp(26px, 4vw, 40px); }
.woocommerce-cart-form .cgp-tile, .wc-block-cart-item__image .cgp-tile, .wc-block-components-order-summary-item__image .cgp-tile { width: 64px; font-size: 11px; }

/* ---------- 상품 화면: 결제수단·권종 선택 ---------- */
.cgp-buy { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 8px 0 0; }
.cgp-buy-h { font-size: 16px; font-weight: 800; margin: 18px 0 10px; color: var(--cgp-ink); }
.cgp-buy-h:first-child { margin-top: 0; }
.cgp-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cgp-method {
	position: relative; text-align: left; border: 1.5px solid var(--cgp-line); background: #fff; border-radius: 12px;
	padding: 12px; cursor: pointer; font: inherit; color: var(--cgp-text); display: flex; flex-direction: column; gap: 3px; min-height: 76px;
}
.cgp-method strong { font-size: 15px; color: var(--cgp-ink); }
.cgp-method span { font-size: 12px; color: var(--cgp-muted); line-height: 1.35; }
.cgp-method em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--cgp-red); }
.cgp-method.is-on { border-color: var(--cgp-gold); background: var(--cgp-gold-soft); box-shadow: inset 0 0 0 1px var(--cgp-gold); }
.cgp-method.is-on::after { content: "✓"; position: absolute; top: 8px; right: 10px; color: var(--cgp-gold-deep); font-weight: 800; }
@media (max-width: 520px) { .cgp-method { padding: 10px 8px; min-height: 68px; } .cgp-method span { display: none; } }

.cgp-units { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; background: #fff; border: 1px solid var(--cgp-line); border-radius: 14px; padding: 10px; }
@media (max-width: 520px) { .cgp-units { grid-template-columns: 1fr; } }
.cgp-unit { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1.5px solid var(--cgp-line); border-radius: 12px; padding: 12px 12px 12px 14px; background: #fff; }
.cgp-unit.is-picked { border-color: var(--cgp-gold); background: #fffdf6; }
.cgp-unit.is-out { opacity: .55; }
.cgp-unit-info { flex: 1; min-width: 0; cursor: pointer; }
.cgp-unit-label { display: block; font-size: 17px; font-weight: 800; color: var(--cgp-ink); margin-bottom: 2px; }
.cgp-unit-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.cgp-unit-regular { color: var(--cgp-muted); font-size: 12px; }
.cgp-unit-sale { font-size: 15px; color: var(--cgp-ink); }
.cgp-unit-rate { font-style: normal; font-size: 12px; font-weight: 800; color: var(--cgp-red); }
.cgp-unit-soldout { font-size: 13px; color: var(--cgp-muted); font-weight: 700; }
.cgp-qty { display: flex; align-items: center; border: 1px solid var(--cgp-line); border-radius: 10px; overflow: hidden; flex: none; }
.cgp-qty button { width: 36px; height: 40px; border: 0; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--cgp-ink); }
.cgp-qty button:active { background: var(--cgp-gold-soft); }
.cgp-qty input { width: 38px; height: 40px; border: 0; border-left: 1px solid var(--cgp-line); border-right: 1px solid var(--cgp-line); text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; padding: 0; }
.cgp-qty input::-webkit-outer-spin-button, .cgp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cgp-summary { background: #fff; border: 1px solid var(--cgp-line); border-radius: 14px; padding: 16px; box-shadow: 0 6px 20px rgba(28, 28, 33, .06); }
.cgp-summary-h { font-weight: 800; margin: 0 0 8px; color: var(--cgp-ink); }
.cgp-summary-lines { list-style: none; margin: 0 0 10px; padding: 0; font-size: 14px; }
.cgp-summary-lines li { display: flex; justify-content: space-between; padding: 4px 0; }
.cgp-summary-empty { color: var(--cgp-muted); justify-content: center !important; padding: 10px 0 !important; }
.cgp-summary-total { margin: 0; border-top: 1px solid var(--cgp-line); padding-top: 8px; }
.cgp-summary-total div { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.cgp-summary-total dt { color: var(--cgp-muted); }
.cgp-summary-total dd { margin: 0; }
.cgp-summary-final dt { color: var(--cgp-ink) !important; font-weight: 800; }
.cgp-summary-final dd { font-size: 20px; font-weight: 800; color: var(--cgp-red); }
.cgp-summary-method { text-align: right; margin: 2px 0 12px; font-size: 12px; color: var(--cgp-gold-deep); font-weight: 700; }
.cgp-summary-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.cgp-summary-btns .cgp-btn { border-radius: 12px; font-size: 16px; min-height: 50px; cursor: pointer; border: 0; }
.cgp-summary-btns .cgp-btn-line { border: 1px solid var(--cgp-line); }
.cgp-summary-btns .cgp-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
@media (max-width: 781px) {
	/* 모바일: 화면 아래 고정 바(최종 금액 + 버튼만) */
	.cgp-summary { position: sticky; bottom: 0; z-index: 20; border-radius: 14px 14px 0 0; margin: 0 -4px; padding: 10px 12px 12px; }
	.cgp-summary-h, .cgp-summary-lines, .cgp-summary-total div:not(.cgp-summary-final) { display: none; }
	.cgp-summary-total { border: 0; padding: 0; }
	.cgp-summary-final { align-items: center; }
	.cgp-summary-method { margin: 0 0 8px; }
	.cgp-summary-btns .cgp-btn { min-height: 46px; }
}

/* 장바구니·결제 상단 결제수단 안내 */
.cgp-paybanner { background: var(--cgp-gold-soft); border: 1px solid #ead9ad; border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; }
.cgp-paybanner strong { color: var(--cgp-gold-deep); }
.cgp-paybanner span { display: block; color: var(--cgp-muted); font-size: 12px; margin-top: 2px; }

/* 마이페이지 핀 보기 전 확인 */
.cgp-gate { background: #fff; border: 1px solid var(--cgp-line); border-radius: 14px; padding: 18px; }
.cgp-gate p { margin: 0 0 10px; line-height: 1.6; }
.cgp-gate-form { display: flex; gap: 8px; max-width: 360px; }
.cgp-gate-form input { flex: 1; font-size: 20px; letter-spacing: 6px; text-align: center; padding: 10px; border: 1px solid #d6d0c2; border-radius: 10px; min-width: 0; }
.cgp-gate-form button { background: var(--cgp-ink); color: var(--cgp-gold-2); border: 0; border-radius: 10px; padding: 0 18px; font-weight: 700; font-size: 15px; cursor: pointer; }
.cgp-gate-err { color: var(--cgp-red); font-weight: 700; }
.cgp-gate-note { font-size: 12px; color: var(--cgp-muted); margin: 10px 0 0 !important; }
