/*
 * 해외 16개 언어 시즌 화면 보정(2026-12-04, 사장님 «홀리데이 할인 모든 언어에 반영 / 영문판 기준으로 동일하게»).
 *
 * ★SeasonHead 가 공개 스위치 `SEASON_LOCALES`(src/lib/intlRollout.mjs)에 든 언어 페이지에만 싣는다. ko·en·ko-intl 과 스위치 밖 언어
 *   HTML 에는 이 파일 링크가 없다 — season.css·christmas-2026.css(`?v=`)를 고치면 모든 페이지 HTML 이 바뀌어서 따로 두었다.
 * ★이 파일을 고치면 SeasonHead 의 `season-intl.css?v=` 날짜 글자를 올린다(브라우저 캐시).
 * ★새로 쓰는 규칙은 논리 속성(inline-start/end)으로 쓴다(계획 §2-4). 물리 속성을 덮을 때만 `[dir="rtl"]` 로 묶는다.
 */

/*
 * ── 1. 휴대폰·세로판 히어로 높이 = 내용 높이 ─────────────────────────────
 * 배지·기간 한 줄은 행사 달력 글자 그대로라(christmas2026.mjs 빌드 단언) 줄일 수 없다. en 47자 · nl 85자 · ru 96자 —
 * en 높이 식(christmas-2026.css «영문은 배지가 두 줄»: 246px + 190.11vw)은 배지 두 줄까지만 맞는다. 세 줄이 되면 제품 윗변이
 * «혜택 보기» 버튼 밑으로 들어간다. 세로판 그림은 높이 맞춤 cover 라 제품 윗변 = 히어로 높이 × 681/1402 다.
 * SeasonHeroMedia 의 작은 스크립트가 버튼 줄 아래 끝을 재 `--season-hero-fit`(그 끝 + 16px 이 제품 윗변이 되는 높이)을 단다.
 * 여기서는 max(en 식, 그 값) — 스크립트가 못 돌면 en 식 그대로다(배지 두 줄까지 맞음). 넓은 화면(가로판)은 패널이 그림 옆이라 상관없다.
 */
@media (max-width: 601px) {
 html[data-season="christmas-2026"] .p_section_0:not([data-hero-slide="brand"]):has(.season-hero-media[data-season-hero-layout="low"]) { min-height: max(calc(246px + 190.11vw), var(--season-hero-fit, 0px)); }
}
@media (min-width: 602px) and (max-width: 767px), (min-width: 768px) and (max-width: 1100px) and (max-aspect-ratio: 13/10) {
 html[data-season="christmas-2026"] .p_section_0:not([data-hero-slide="brand"]):has(.season-hero-media[data-season-hero-layout="low"]) { min-height: max(1052px, 125vw, var(--season-hero-fit, 0px)); }
}

/*
 * ── 2. 아랍어(rtl) ─────────────────────────────────────────
 * - 히어로: 그림 자리 식(christmas-2026.css object-position)은 «패널 왼쪽, 제품 오른쪽» 을 전제로 한다. 그림은 뒤집지 않는다
 *   (제품 사진·로고). 글 칸 배치만 왼쪽에 두고(direction ltr), 칸 안의 글은 오른쪽에서 읽는다(direction rtl).
 * - «→» 화살표는 읽는 방향으로 뒤집는다. 금액·할인율은 숫자 방향을 따로 묶는다(USD 1,599 가 «1,599 USD» 로 읽히지 않게).
 */
html[dir="rtl"][data-season="christmas-2026"] .p_section_0:not([data-hero-slide="brand"]):has(.season-hero-tabs) .p_text_wrap { direction: ltr; }
html[dir="rtl"][data-season="christmas-2026"] .p_section_0:not([data-hero-slide="brand"]):has(.season-hero-tabs) .p_text_wrap > div { direction: rtl; }
html[dir="rtl"] :is(.season-hero-lead__more, .season-hero-links__btn) > span[aria-hidden="true"] { display: inline-block; transform: scaleX(-1); }
/* 탭 이름 «PRO+» 는 rtl 문단에서 «+PRO» 로 보인다(끝의 + 가 중립 글자) — 탭마다 첫 글자 방향을 따른다(아랍어 브랜드 탭은 rtl 그대로). */
html[dir="rtl"] .season-hero-tabs [role="tab"] { unicode-bidi: plaintext; }
html[dir="rtl"] :is(.season-hero-lead__price s, .season-hero-lead__price b, .season-slide__models td, .season-slide__rate) { direction: ltr; unicode-bidi: isolate; }

/*
 * ── 3. 글자 체계 ─────────────────────────────────────────
 * - 일본어·중국어: 한자·가나 사이에서 줄을 바꾸되 문장부호(。、」)로 줄을 시작하지 않는다(season.css 는 이미 비한국어 word-break normal).
 * - 태국어·힌디어: 위아래로 붙는 성조·모음 부호(마트라)가 좁은 줄 간격·음수 자간에서 잘린다 — 시즌 글자 칸만 넓힌다.
 */
html:is(:lang(ja), :lang(zh)) :is(.season-hero-lead, .season-hero-tabs, .season-hero-links, .season-slide, .season-badge) { word-break: normal; line-break: strict; }
html:is(:lang(th), :lang(hi)) :is(.season-hero-lead__badge, .season-hero-lead__model, .season-hero-lead__more, .season-hero-links__btn, .season-hero-tabs [role="tab"], .season-slide__eyebrow, .season-slide__title, .season-slide__points li, .season-badge, .season-btn) { line-height: 1.5; letter-spacing: normal; }
