/* =================================================================
 * base.css — 디자인 토큰과 기본 스타일
 * 색상·폰트·간격은 전부 여기 변수로 모아둔다. 값을 바꾸면 사이트 전체에 반영된다.
 * ================================================================= */

/* ---- 웹폰트 ---- */

/* haruharu wonder 피그마 글꼴 : 제목 Gill Sans · 본문 Calibri.
   두 글꼴은 맥 · 윈도에 깔려 있으면 그대로 쓰고(파일을 배포하지 않으므로 라이선스 문제 없음),
   없으면 피그마 대체 글꼴 Lato(제목) · Carlito(본문, Calibri 와 글자 폭이 같음)를 받아 쓴다. 영문 사이트라 라틴 문자 부분만 넣었다 (구글 폰트, OFL) */
@font-face { font-family: Lato; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-300.woff2") format("woff2"); }
@font-face { font-family: Lato; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-400.woff2") format("woff2"); }
@font-face { font-family: Lato; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-700.woff2") format("woff2"); }
@font-face { font-family: Carlito; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/carlito-latin-400.woff2") format("woff2"); }
@font-face { font-family: Carlito; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/carlito-latin-700.woff2") format("woff2"); }
/* Inter : 관리자 화면 숫자용 (admin.css --font-num) */
@font-face { font-family: Inter; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }

/* ---- 디자인 토큰 ---- */

:root {
	/* 색 */
	/* haruharu wonder 피그마 「02 COLOR」 */
	--sky: #DCEBF6;            /* 섹션 배경 · 공지바 */
	--mist: #EEF5FB;           /* 보조 배경 */
	--blush: #FBE9E5;          /* 텍스처 · 스토리 섹션 */
	--coral: #E4675F;          /* CTA 버튼 · 소제목 · 별점 (패키지 워드마크 색). 버튼과 소제목에만 쓴다 */
	--coral-hover: #D0544C;
	--navy: #1F3442;           /* 푸터 · 숫자 */

	--brand: #2B2B2B;          /* Ink : 가격 · 강조 · 테두리 */
	--brand-hover: #3a3a3a;
	--accent: var(--coral);    /* 별점 */
	--danger: #d93025;         /* 오류·경고·찜 하트 (코랄과 구분되는 빨강) */
	--point: var(--sky);       /* 상단 공지바 · 배지 (위에 검은 글자) */
	--soft: var(--mist);       /* 옅은 배경 : 카드 · 섹션 */
	--ink: #2B2B2B;            /* 본문 · 보조 버튼 */

	/* 예전 제품별 색 이름 (장바구니 · 주문서 사진 배경에 쓰는 이름이라 남겨 두고 값만 새 색으로). pink → Sky · mint → Mist · yellow → Blush */
	--tone-pink: #BBD6EC;   --tone-pink-soft: var(--sky);
	--tone-mint: #D3E4F2;   --tone-mint-soft: var(--mist);
	--tone-yellow: #F3CFC6; --tone-yellow-soft: var(--blush);
	--tone-silver: #c9cbce;

	--fg: #2B2B2B;             /* 본문 글자 (Ink) */
	--fg-muted: #5a5a5a;       /* 보조 글자 */
	--fg-subtle: #8b8b8b;      /* 더 옅은 글자 (할인 전 가격) */
	--bg: #ffffff;
	--surface: var(--mist);    /* 카드·섹션 배경 */
	--border: #e5e5e5;

	/* 글꼴 : 본문 Calibri(대체 Carlito) Regular 15–19 / 1.6 · 제목 Gill Sans(대체 Lato) Light */
	--font-body: Calibri, Carlito, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
	--font-point: "Gill Sans", "Gill Sans MT", Lato, -apple-system, BlinkMacSystemFont, sans-serif;
	--fw-point: 300;           /* 제목 굵기 (Light) */

	/* 글자 크기 */
	--fs-xs: 0.8125rem;
	--fs-sm: 0.875rem;
	--fs-base: 1rem;
	--fs-lg: 1.125rem;
	--fs-xl: 1.5rem;
	--fs-2xl: 2rem;
	--fs-3xl: clamp(2rem, 4vw, 2.75rem);
	--fs-hero: clamp(2.25rem, 5vw, 3.75rem);

	/* 간격 */
	--sp-xs: 8px;
	--sp-sm: 16px;
	--sp-md: 24px;
	--sp-lg: 40px;
	--sp-xl: 64px;
	--sp-section: clamp(64px, 9vw, 120px);

	/* 레이아웃 */
	--page-width: 1383px;      /* 기획안 콘텐츠 폭 1303 + 양옆 여백 40 (헤더 · 배너 · 상품 목록이 모두 1303 폭) */
	--page-margin: clamp(20px, 4vw, 40px);
	--radius: 14px;
	--radius-sm: 8px;
	--radius-pill: 999px;      /* 버튼 (피그마 알약 모양) */

	--ease: cubic-bezier(0.2, 0.7, 0.3, 1);
	--shadow: 0 10px 30px rgb(0 0 0 / 0.06);
}

/* ---- 리셋 ---- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }

/* 제목은 포인트 서체 (Gill Sans Light) */
h1, h2, h3 { font-family: var(--font-point); font-weight: var(--fw-point); letter-spacing: -0.01em; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* 스크린리더 전용 */
/* hidden 속성은 어떤 display 값보다 우선한다.
   (.empty { display:grid } 같은 규칙이 브라우저 기본 [hidden]을 덮어쓰는 문제 방지) */
[hidden] { display: none !important; }

.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

/* 페이지 공통 컨테이너 */
.container {
	width: 100%;
	max-width: var(--page-width);
	margin-inline: auto;
	padding-inline: var(--page-margin);
}

.section { margin-block: var(--sp-section); }

/* 섹션 제목 */

body.no-scroll { overflow: hidden; }

/* ── 비밀번호 보기 단추 ────────────────────────────────────────────────
   assets/default/custom.js 의 listener_password_toggle 이 만들어 넣는다.
   고객 화면(.input)과 관리자 화면(.in) 양쪽에서 함께 쓴다.
   -------------------------------------------------------------------- */
.pw-wrap {
	position: relative;
	display: block;
}
.pw-wrap > input {
	/* 단추와 글자가 겹치지 않도록 오른쪽을 비워준다 */
	padding-inline-end: 42px;
}

.pw-eye {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-end: 6px;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--fg-subtle, #8a8a8a);
	cursor: pointer;
	transition: color 0.15s ease, background-color 0.15s ease;
}
.pw-eye:hover { color: var(--fg, #222); background: rgb(0 0 0 / 0.05); }
.pw-eye:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 1px;
}
.pw-eye svg { width: 19px; height: 19px; }
.pw-eye[aria-pressed="true"] { color: var(--brand); }
