/* BanKey — layout 2 cột: cột trái giới thiệu, cột phải form danh sách + segmented */
[hidden] { display: none !important; }

:root {
  --paper: #faf8f5;
  --ink: #141312;
  --sub: #5c5854;
  --line: #e8e4de;
  --line-2: #d4cec6;
  --card: #ffffff;
  --accent: #0f766e;
  --accent-hover: #0d5c56;
  --accent-soft: #e6f5f3;
  --focus: #0f766e;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --shadow: 0 20px 50px rgba(20, 19, 18, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(1040px, 100% - 40px);
  margin-inline: auto;
}

/* —— Header —— */
.head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 92%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.head__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.head__logo {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.head__logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.head__nav {
  display: none;
  align-items: center;
  gap: 8px;
}

.head__nav a {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--sub);
}

.head__nav a:hover {
  background: rgba(20, 19, 18, 0.05);
  color: var(--ink);
  text-decoration: none;
}

.head__burger {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.head__burger:hover {
  border-color: var(--line-2);
}

.head__menu {
  display: none;
  flex-direction: column;
  padding: 0 0 12px;
  gap: 2px;
}

.head__menu.is-open {
  display: flex;
}

.head__menu a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.head__menu a:hover {
  background: rgba(20, 19, 18, 0.05);
  text-decoration: none;
}

@media (min-width: 768px) {
  .head__burger {
    display: none;
  }
  .head__nav {
    display: flex;
  }
  .head__menu {
    display: none !important;
  }
}

/* —— Layout 2 cột —— */
.layout {
  display: grid;
  gap: 36px;
  padding: 32px 0 56px;
  flex: 1;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 440px);
    gap: 48px;
    align-items: start;
    padding: 48px 0 64px;
  }

  .side {
    position: sticky;
    top: 72px;
  }
}

/* —— Cột trái —— */
.side__h {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.side__accent {
  color: var(--accent);
}

.side__lede {
  margin: 0 0 32px;
  color: var(--sub);
  font-size: 15px;
  max-width: 42ch;
}

.side__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side__step {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 14px;
  padding-bottom: 22px;
}

.side__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}

.side__dot {
  position: relative;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.side__step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side__step-body strong {
  font-size: 15px;
  font-weight: 700;
}

.side__step-body span {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.45;
}

/* —— Card đặt hàng —— */
.main-col {
  min-width: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

.card__top {
  padding: 22px 22px 8px;
}

.card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card__cap {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--sub);
}

.card__block {
  padding: 16px 22px 8px;
}

.card__block--seg {
  padding-top: 22px;
}

.label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sub);
}

/* Danh sách chọn (radio-row) */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: 22px 48px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fbfaf8;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.row:hover {
  border-color: var(--line-2);
  background: var(--card);
}

.row:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.row.is-selected {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--accent);
}

.row__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  position: relative;
}

.row.is-selected .row__radio {
  border-color: var(--accent);
}

.row.is-selected .row__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.row__thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.row__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row__mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--m, var(--accent));
}

.row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.row__name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.row__meta {
  font-size: 12px;
  color: var(--sub);
}

/* Segmented */
.segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: #f3f1ee;
  border: 1px solid var(--line);
}

.seg {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  min-height: 72px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.seg:hover {
  background: rgba(255, 255, 255, 0.65);
}

.seg:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.seg.is-selected {
  background: var(--card);
  border-color: var(--line-2);
  box-shadow: 0 6px 20px rgba(20, 19, 18, 0.06);
}

.seg--hint.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(15, 118, 110, 0.12);
}

.seg__hint {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.seg__d {
  font-size: 14px;
  font-weight: 700;
}

.seg__p {
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
}

.seg.is-selected .seg__p {
  color: var(--accent);
}

.seg__stock {
  font-size: 10px;
  font-weight: 500;
  color: #22c55e;
  margin-top: 1px;
}

.seg--soldout {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.seg--soldout .seg__d { text-decoration: line-through; color: #9ca3af; }
.seg--soldout .seg__p { text-decoration: line-through; color: #9ca3af; }
.seg--soldout .seg__stock { color: #ef4444; text-decoration: none; }

/* Footer card */
.card__foot {
  padding: 20px 22px 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfaf8 0%, var(--card) 40%);
}

.bill {
  margin-bottom: 18px;
}

.bill__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.bill__row + .bill__row {
  margin-top: 8px;
}

.bill__k {
  color: var(--sub);
  flex-shrink: 0;
}

.bill__v {
  font-weight: 600;
  text-align: right;
  line-height: 1.35;
}

.bill__v--off {
  color: #15803d;
}

.bill__row--sum {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px dashed var(--line);
}

.bill__sum {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.pay {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent);
  transition: background 0.15s ease, transform 0.1s ease;
}

.pay:hover {
  background: var(--accent-hover);
}

.pay:active {
  transform: scale(0.99);
}

.pay:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.pay:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.pay:disabled:hover {
  background: var(--accent);
}

.fine {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.45;
}

/* —— Page footer —— */
.foot {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  font-size: 12px;
  color: var(--sub);
  text-align: center;
}

.empty-msg {
  margin: 0;
  font-size: 14px;
  color: var(--sub);
  padding: 16px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: #fbfaf8;
}

.card__block--coupon {
  padding-bottom: 12px;
}

.coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.coupon__input {
  flex: 1 1 140px;
  min-width: 0;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.coupon__input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.coupon__btn {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
}

.coupon__btn:hover {
  opacity: 0.92;
}

.coupon__btn--ghost {
  background: var(--card);
  color: var(--sub);
  border: 1px solid var(--line);
}

.coupon__btn--ghost:hover {
  border-color: var(--line-2);
  color: var(--ink);
}

.coupon-msg {
  margin: 10px 0 0;
  font-size: 13px;
  min-height: 1.2em;
}

.coupon-msg.is-ok {
  color: #15803d;
}

.coupon-msg.is-err {
  color: #b91c1c;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
