/* ROWAY Korea storefront (/ko) — bổ sung cho css/style.css */

body.kr-store {
  /* Font thương hiệu không có chữ Hangul: để trình duyệt dùng font Hàn hệ thống cho phần chữ Hàn. */
  font-family: "Shopee Display", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}

.kr-notice {
  background: var(--fg);
  color: var(--bg);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
}

/* Hero */
.kr-hero {
  background: var(--surface);
  padding: 88px 0 80px;
}
.kr-hero .container { max-width: 760px; }
.kr-eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.kr-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.kr-hero-copy {
  margin: 0 0 32px;
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

/* Benefits */
.kr-benefits { border-bottom: 1px solid var(--line); }
.kr-benefits .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kr-benefits .container > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 16px;
  border-left: 1px solid var(--line);
}
.kr-benefits .container > div:first-child { border-left: 0; padding-left: 0; }
.kr-benefits strong { font-size: 14px; font-weight: 500; }
.kr-benefits span { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Checkout */
.kr-postcode-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.kr-postcode-row .form-group { flex: 0 1 180px; margin-bottom: 0; }
.kr-postcode-row .btn { white-space: nowrap; }
.kr-postcode-row + .form-group { margin-top: 16px; }

.kr-help {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.kr-help a { text-decoration: underline; }

.kr-agree {
  align-items: flex-start;
  margin: 8px 0 18px;
  font-size: 13px;
  line-height: 1.6;
}
.kr-agree a { text-decoration: underline; }

.kr-warning {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: #fbf1ef;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
}

.kr-complete-summary { margin: 0 0 24px; text-align: left; }

.kr-size-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* Guide */
.kr-guide h1 { font-size: 24px; font-weight: 500; margin: 0 0 8px; }
.kr-guide ul { margin: 0; padding-left: 18px; }

/* Footer */
.kr-footer .container { display: block; }
.kr-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 8px 0 24px;
  text-align: left;
}
.kr-footer-grid strong { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; }
.kr-footer-grid p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--muted); }
.kr-footer-grid a:hover { color: var(--fg); }
.kr-footer-bottom { font-size: 12px; color: var(--muted); }

@media (max-width: 700px) {
  .kr-notice { font-size: 11px; padding: 7px 12px; }
  .kr-hero { padding: 56px 0 52px; }
  .kr-benefits .container { grid-template-columns: 1fr; }
  .kr-benefits .container > div { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0; }
  .kr-benefits .container > div:first-child { border-top: 0; }
  .kr-footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* Danh mục */
/* body là flex cột: main.container có margin auto sẽ co theo nội dung, thanh danh mục dài làm tràn ngang trên điện thoại. */
body.kr-store > main.container { width: 100%; min-width: 0; }
.kr-category-page { padding-bottom: 72px; }
.kr-category-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; }
.kr-category-title h1 { margin: 0; font-size: 28px; font-weight: 500; }
.kr-category-title .muted { font-size: 13px; }
.kr-category-bar {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.kr-category-bar::-webkit-scrollbar { display: none; }
.kr-category-bar a {
  flex: 0 0 auto;
  padding: 9px 16px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.kr-category-bar a:hover { color: var(--fg); border-color: var(--fg); }
.kr-category-bar a.active { color: var(--bg); background: var(--fg); border-color: var(--fg); }
@media (max-width: 700px) {
  .kr-category-title h1 { font-size: 22px; }
  .kr-category-bar { margin-bottom: 20px; }
  .kr-category-bar a { padding: 8px 13px; font-size: 12px; }
}

/* Menu 3 gạch: mở từ mép trái nút (kiểu canh giữa của web Việt bị cắt ở mép màn hình) */
body.kr-store .category-dropdown { left: 0; transform: translateY(-6px); }
body.kr-store .nav-products.open .category-dropdown { transform: translateY(0); }

/* Bảng size tiếng Hàn */
.kr-size-dialog { max-width: 720px; width: calc(100vw - 32px); max-height: 86vh; overflow-y: auto; padding: 28px 24px 20px; background: var(--bg); }
.kr-size-head { margin: 0 0 16px; font-size: 18px; font-weight: 500; }
.kr-size-title { margin: 18px 0 10px; font-size: 14px; font-weight: 500; }
.kr-size-title:first-child { margin-top: 0; }
.kr-size-title span { color: var(--muted); font-weight: 400; font-size: 12px; }
.kr-size-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kr-size-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; white-space: nowrap; }
.kr-size-table th, .kr-size-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.kr-size-table thead th { background: var(--surface); font-weight: 500; color: var(--fg); }
.kr-size-table tbody th { font-weight: 500; }
.kr-size-grid td[data-size="M"] { background: #faf7f1; }
.kr-size-grid td[data-size="L"] { background: #f3ece0; }
.kr-size-grid td[data-size="XL"] { background: #ead9bf; }
.kr-size-grid td[data-size="2XL"] { background: #d9bc98; }
.kr-size-inline { margin-bottom: 12px; }
.kr-size-inline .kr-size-table { font-size: 12.5px; }
.kr-size-dialog .kr-size-note, .kr-size-inline .kr-size-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* Báo lỗi rõ ràng: chưa chọn màu/size, thiếu thông tin đặt hàng */
body.kr-store .selection-error.visible { margin: 4px 0 18px; font-weight: 600; background: #fff5f5; }
body.kr-store .option-group.kr-opt-missing > label,
body.kr-store .option-group.kr-opt-missing .option-label-row > label { color: var(--danger); }
body.kr-store .option-group.kr-opt-missing .size-options button:not(:disabled) { border-color: var(--danger); }
body.kr-store .option-group.kr-opt-missing .size-options { animation: kr-shake .35s ease; }
@keyframes kr-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { body.kr-store .option-group.kr-opt-missing .size-options { animation: none; } }
body.kr-store .checkout-main input.kr-invalid { border-color: var(--danger); background: #fff5f5; }
body.kr-store .kr-agree.kr-invalid { outline: 1px solid var(--danger); outline-offset: 4px; background: #fff5f5; }
body.kr-store .kr-agree + .field-error { margin: 8px 0 14px; }
body.kr-store .form-error-box.visible { background: #fff5f5; }
body.kr-store .form-error-box ul { margin: 8px 0 0; padding-left: 18px; }
body.kr-store .form-error-box li + li { margin-top: 4px; }
/* Lỗi ô mã bưu chính không đẩy lệch nút 주소 검색 */
body.kr-store .kr-postcode-row .form-group { position: relative; }
body.kr-store .kr-postcode-row .field-error { position: absolute; left: 0; top: 100%; width: max-content; max-width: calc(100vw - 32px); }
body.kr-store .kr-postcode-row:has(.field-error) { margin-bottom: 30px; }

/* Ảnh bảng size riêng của sản phẩm */
body.kr-store .kr-size-image { margin: 12px 0 16px; }
body.kr-store .kr-size-image img { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; border: 1px solid var(--border, #e5e5e5); }
