/* Phông nhung xanh, tiêu đề như tấm biển lễ, lưới ảnh dạng cột, xem lớn toàn màn hình */
:root {
  --velvet: #17261c;
  --velvet-2: #1f3326;
  --ivory: #f3efe4;
  --ivory-dim: #b9bfae;
  --gold: #cdb06a;
  --line: rgba(205,176,106,.28);
  --lb-bg: rgba(10,18,13,.97);
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
/* Đỏ nhung: phông lễ vu quy / thành hôn */
.theme-red {
  --velvet: #2a0f14;
  --velvet-2: #43171f;
  --ivory: #f7eee8;
  --ivory-dim: #d2b7b0;
  --gold: #dcb872;
  --line: rgba(220,184,114,.3);
  --lb-bg: rgba(22,7,10,.97);
}
/* Mực ấm: trang link tổng, trung tính để thẻ xanh và thẻ đỏ cùng nổi */
.theme-ink {
  --velvet: #1a1715;
  --velvet-2: #27221f;
  --ivory: #f3efe4;
  --ivory-dim: #b9b1a4;
  --gold: #cdb06a;
  --line: rgba(205,176,106,.24);
  --lb-bg: rgba(14,12,11,.97);
}
/* Trắng sang trọng: trang chủ và trang link tổng. Tên biến giữ nguyên để mọi thành phần dùng lại được:
   --velvet = nền, --ivory = chữ, --gold = vàng champagne */
.theme-ivory {
  --velvet: #fbfaf7;
  --velvet-2: #f3f0ea;
  --ivory: #1f1c18;
  --ivory-dim: #776f64;
  --gold: #a5824a;
  --line: rgba(165,130,74,.26);
  --lb-bg: rgba(251,250,247,.98);
  color-scheme: light;
}
.theme-green, .theme-red, .theme-ink, .theme-ivory { color: var(--ivory); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--velvet);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.center { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.muted { color: var(--ivory-dim); }
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.hero {
  text-align: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 56px);
  padding-bottom: 36px;
  background: radial-gradient(ellipse at 50% 0%, var(--velvet-2), var(--velvet) 70%);
}
.eyebrow { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  margin: 14px 0 10px;
  text-wrap: balance;
}
h1 .amp { color: var(--gold); font-style: normal; padding: 0 .12em; }
.date { font-family: var(--display); font-size: 22px; letter-spacing: .2em; color: var(--ivory-dim); font-variant-numeric: tabular-nums; }
.knot { display: block; margin: 22px auto 0; width: 34px; height: 34px; color: var(--gold); }
.notice { margin: 0 0 16px; padding: 10px 14px; border: 1px dashed var(--gold); color: var(--gold); font-size: 14px; }
.bar {
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  align-items: center; justify-content: space-between;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.bar p { margin: 0; color: var(--ivory-dim); font-size: 14px; flex: 1 1 320px; min-width: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  font: 500 14px var(--body);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.btn:hover, .btn:focus-visible { background: var(--gold); color: var(--velvet); outline: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.grid { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 56px; }
.grid .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tile {
  display: block; width: 100%;
  margin: 0; padding: 0; border: 0;
  background: var(--velvet-2);
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: var(--ar, 3 / 2);
}
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .4s; opacity: 0; }
.tile img.ok { opacity: 1; }
.tile:hover img { transform: scale(1.03); }
.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile .name {
  position: absolute; left: 10px; bottom: 8px;
  font-size: 11px; letter-spacing: .08em;
  color: var(--ivory); opacity: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
  transition: opacity .2s;
}
.tile:hover .name, .tile:focus-visible .name { opacity: .9; }
footer { text-align: center; color: var(--ivory-dim); font-size: 13px; padding-bottom: 40px; }

.lb {
  position: fixed; inset: 0; z-index: 50;
  background: var(--lb-bg);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.lb[hidden] { display: none; }
.lb-top, .lb-bot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.lb-count { font-variant-numeric: tabular-nums; color: var(--ivory-dim); font-size: 14px; letter-spacing: .06em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lb-stage { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 56px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(23,38,28,.6);
  color: var(--ivory); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--gold); color: var(--gold); outline: none; }
.icon-btn svg { width: 20px; height: 20px; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); }
.nav.prev { left: 6px; } .nav.next { right: 6px; }
.bar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.top-nav { text-align: left; margin-top: -32px; margin-bottom: 20px; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ivory-dim); text-decoration: none; font-size: 14px;
  padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px;
}
.back:hover, .back:focus-visible { color: var(--gold); border-color: var(--gold); outline: none; }
.back svg { width: 16px; height: 16px; }
.center-text { text-align: center; padding-block: 40px; }

/* Thẻ album trên trang link tổng: mỗi thẻ mang tông màu của album đó */
.cards {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  padding-block: 8px 56px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--velvet); color: var(--ivory);
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  text-decoration: none;
  transition: border-color .25s, transform .25s;
}
.card:hover, .card:focus-visible { border-color: var(--gold); transform: translateY(-2px); outline: none; }
.card-img { aspect-ratio: 3 / 2; background: var(--velvet-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .4s, transform .6s; }
.card-img img.ok { opacity: 1; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 20px 22px 22px; display: grid; gap: 6px; background: radial-gradient(ellipse at 50% 0%, var(--velvet-2), var(--velvet) 80%); }
.card-title { font-family: var(--display); font-style: italic; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; text-wrap: balance; }
.card-title .amp { color: var(--gold); font-style: normal; }
.card-meta { display: flex; gap: 14px; color: var(--ivory-dim); font-size: 14px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--gold); font-weight: 500; font-size: 14px; }
.card-cta svg { width: 16px; height: 16px; transition: transform .2s; }
.card:hover .card-cta svg { transform: translateX(3px); }

/* ───── Trang chính ───── */
.home-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.home-link:hover { color: var(--gold); }
.home-hero { padding-bottom: 28px; }
.home-hero h1 { font-style: normal; font-weight: 600; letter-spacing: .01em; font-size: clamp(48px, 9vw, 96px); margin-bottom: 6px; }
.tagline { margin: 0; color: var(--gold); font-size: 15px; letter-spacing: .08em; }
.intro { max-width: 60ch; margin: 14px auto 0; color: var(--ivory-dim); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.home-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; margin-top: 26px; font-size: 14px; }
.home-nav a { color: var(--ivory-dim); text-decoration: none; padding-block: 4px; border-bottom: 1px solid transparent; }
.home-nav a:hover, .home-nav a:focus-visible { color: var(--gold); border-color: var(--gold); outline: none; }
.home-section { padding-block: 28px 12px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 18px; }
.section-head h2, .contact h2 {
  margin: 0; font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(30px, 4.5vw, 42px); text-wrap: balance;
}
.section-head p { margin: 0; font-size: 14px; }
.empty-note { color: var(--ivory-dim); padding: 28px 0 40px; }
.home .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); padding-bottom: 28px; }
.home .card-title { font-size: clamp(26px, 3vw, 32px); }
.price-grid { display: grid; gap: 18px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.price-group h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { padding-block: 12px; border-bottom: 1px solid var(--line); }
.price-row { display: flex; align-items: baseline; gap: 10px; }
.price-name { font-weight: 500; min-width: 0; }
.price-dots { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--ivory-dim); opacity: .5; transform: translateY(-4px); }
.price-val { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-val small { font-family: var(--body); font-size: 12px; font-weight: 400; color: var(--ivory-dim); }
.price-note { margin: 4px 0 0; color: var(--ivory-dim); font-size: 13.5px; max-width: 60ch; }
.price-foot { margin: 18px 0 0; color: var(--ivory-dim); font-size: 13.5px; }
.contact { text-align: center; padding-block: 36px 40px; }
.contact .hero-actions { margin-top: 16px; }
@media (max-width: 480px) {
  .price-row { flex-wrap: wrap; }
  .price-dots { display: none; }
  .price-val { width: 100%; font-size: 20px; }
}

/* ───── Trắng sang trọng ───── */
.lux { background: var(--velvet); font-weight: 300; }
.lux .btn { border-color: var(--ivory); color: var(--ivory); font-weight: 400; letter-spacing: .04em; }
.lux .btn:hover, .lux .btn:focus-visible { background: var(--ivory); color: var(--velvet); }
.lux-hero {
  text-align: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
  padding-bottom: 40px;
}
.lux-handle {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11.5px; letter-spacing: .38em; text-transform: uppercase; color: var(--gold); font-weight: 400;
}
.lux-handle span { width: 36px; height: 1px; background: var(--gold); opacity: .7; }
.lux-hero h1 {
  font-family: var(--display); font-style: normal; font-weight: 500;
  font-size: clamp(52px, 10vw, 112px); line-height: 1; letter-spacing: .02em;
  margin: 22px 0 16px;
}
.lux-tagline { margin: 0; font-size: 12.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--ivory-dim); }
.lux-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 34px; margin-top: 40px; }
.lux-nav a {
  color: var(--ivory); text-decoration: none; font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase;
  padding-block: 6px; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s;
}
.lux-nav a:hover, .lux-nav a:focus-visible { color: var(--gold); border-color: var(--gold); outline: none; }

.lux-section { padding-block: 64px 8px; scroll-margin-top: 12px; }
.lux-head { text-align: center; margin-bottom: 40px; }
.lux-label { font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); font-weight: 400; }
.lux-head h2 {
  margin: 10px 0 0; font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.1; text-wrap: balance;
}
.lux-rule { display: block; width: 56px; height: 1px; margin: 22px auto 0; background: var(--gold); }
.lux-empty { text-align: center; color: var(--ivory-dim); font-style: italic; font-family: var(--display); font-size: 20px; margin: 0 0 24px; }

/* Thẻ khách căn giữa: 1 khách vẫn cân đối, nhiều khách tự xếp 2–3 thẻ một hàng */
.lux-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 56px 36px; }
.lux-card { display: block; flex: 0 1 380px; min-width: 0; text-decoration: none; color: var(--ivory); }
.lux #bang-gia .price-grid { max-width: 760px; margin-inline: auto; grid-template-columns: 1fr; }
.lux #bang-gia .price-group h3 { text-align: center; margin-bottom: 14px; }
.lux .price-foot { text-align: center; }
.lux-img {
  aspect-ratio: 4 / 3; overflow: hidden; background: var(--velvet-2);
  box-shadow: 0 1px 2px rgba(31,28,24,.06), 0 18px 40px -22px rgba(31,28,24,.35);
}
.lux-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .5s, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.lux-img img.ok { opacity: 1; }
.lux-card:hover .lux-img img, .lux-card:focus-visible .lux-img img { transform: scale(1.04); }
.lux-card:focus-visible { outline: 1px solid var(--gold); outline-offset: 8px; }
.lux-body { text-align: center; padding-top: 22px; }
.lux-kind { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 400; text-wrap: balance; }
.lux-title { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(28px, 3vw, 34px); line-height: 1.15; margin-top: 8px; }
.lux-title .amp { color: var(--gold); font-style: normal; }
.lux-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--ivory-dim); font-size: 13px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.lux .price-list li { border-color: var(--line); }
.lux .price-val { font-weight: 500; }
.lux .price-name { font-weight: 400; }
.lux .price-group h3 { font-weight: 400; letter-spacing: .3em; }
.lux .contact { padding-bottom: 56px; }
.lux-foot { text-align: center; padding-block: 40px; margin-top: 56px; border-top: 1px solid var(--line); color: var(--ivory-dim); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }

/* Trang link tổng tông trắng: thẻ album trắng, vạch màu cho biết album xanh hay đỏ */
.theme-ivory .card { background: #fff; border: 0; border-radius: 0; box-shadow: 0 1px 2px rgba(31,28,24,.06), 0 18px 40px -24px rgba(31,28,24,.35); }
.theme-ivory .card:hover, .theme-ivory .card:focus-visible { transform: translateY(-3px); }
.theme-ivory .card-body { background: #fff; text-align: center; justify-items: center; padding: 22px 22px 26px; }
.theme-ivory .card-meta { justify-content: center; }
.card.accent-green .card-img { border-bottom: 3px solid #3d6b4a; }
.card.accent-red .card-img { border-bottom: 3px solid #9b2335; }

/* ───── Tab Ảnh / Video trong album ───── */
.tabs { display: flex; justify-content: center; gap: 4px; margin: 4px auto 22px; padding: 4px; width: fit-content; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; }
.tabs button {
  appearance: none; border: 0; background: transparent; color: var(--ivory-dim);
  font: 500 14px var(--body); letter-spacing: .06em; padding: 9px 22px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.tabs button span { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.tabs button[aria-selected="true"] { background: var(--gold); color: var(--velvet); }
.tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.videos { display: grid; gap: 32px; padding-bottom: 56px; max-width: 1100px; margin: 0 auto; }
.video-card { background: var(--velvet-2); border: 1px solid var(--line); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .55; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame .play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7); background: rgba(0,0,0,.35); color: #fff; cursor: pointer;
  display: grid; place-items: center; transition: transform .2s, background .2s;
  backdrop-filter: blur(2px);
}
.video-frame .play svg { width: 34px; height: 34px; margin-left: 4px; }
.video-frame .play:hover, .video-frame .play:focus-visible { transform: scale(1.06); background: var(--gold); border-color: var(--gold); color: var(--velvet); outline: none; }
.video-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 20px; }
.video-info h3 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 500; font-size: 26px; }
.video-info p { margin: 2px 0 0; font-size: 13px; }

/* ───── Liên hệ: khối cuối trang + nút nổi ───── */
.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  margin: 8px 0 0; padding: 26px 28px;
  border: 1px solid var(--line); background: var(--velvet-2);
}
.contact-card-text { min-width: 0; }
.contact-card .hero-actions { margin: 0; justify-content: flex-start; }
.contact-brand { margin: 6px 0 2px; font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1.1; }
.contact-brand a { color: inherit; text-decoration: none; }
.contact-brand a:hover { color: var(--gold); }
.contact-brand span { font-family: var(--body); font-size: 13px; letter-spacing: .12em; color: var(--gold); }
.contact-card p.muted { margin: 2px 0 0; font-size: 13.5px; }
.theme-ivory .contact-card { background: #fff; border-color: var(--line); }

.btn-zalo { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .contact-card { padding: 22px 18px; }
}

/* ───── Lối vào quản trị ───── */
.admin-link { color: inherit; text-decoration: none; opacity: .75; white-space: nowrap; }
.admin-link:hover, .admin-link:focus-visible { color: var(--gold); opacity: 1; }
.admin-bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  background: var(--ivory); color: var(--velvet); font-size: 13px;
}
.admin-bar span { opacity: .7; }
.admin-bar a { color: inherit; font-weight: 500; text-decoration: none; padding: 4px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; }
.admin-bar a:hover, .admin-bar a:focus-visible { background: var(--velvet); color: var(--ivory); outline: none; }

/* ───── Nút cài app ───── */
.install-ui { display: grid; justify-items: center; gap: 8px; }
.install-btn svg { width: 16px; height: 16px; }
.ios-hint { margin: 0; color: var(--ivory-dim); font-size: 13px; max-width: 40ch; text-align: center; }

.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn.ready { background: var(--gold); color: var(--velvet); }
.toast {
  position: fixed; z-index: 60;
  left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
  max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 10px;
  background: var(--ivory); color: var(--velvet);
  font-size: 14px; text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
@media (max-width: 640px) {
  .lb-stage { padding: 0; }
  .nav { display: none; }
  .grid, .grid .col { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
