/* ═══════════════════════════════════════════════════════
   PROID Digital Card v2 — main.css
═══════════════════════════════════════════════════════ */

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Montserrat", Sans-serif;
  font-size: 15px;
  color: #222;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: #f0f0f0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

ul,
ol {
  list-style: none;
}

* {
  -webkit-tap-highlight-color: transparent;
}

/* ── Tokens ── */
:root {
  --accent: #995e01;
  --accent-text: #ffffff;
  --gold: var(--accent);
  --gold-btn: var(--accent);
  --gold-light: #c8a84b;
  --border: #e5e5e5;
  --text: #000;
  --text-sub: #000;
  --text-muted: #888888;
  --card-max: 500px;
  --radius: 20px;
  --radius-sm: 10px;
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 0px;
}

/* ═══════════════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════════════ */
.card {
  width: 100%;
  max-width: var(--card-max);
  background: #fff;
}

/* ═══════════════════════════════════════════════════════
   NAV TABS
═══════════════════════════════════════════════════════ */
.nav-tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-tab {
  flex: 1;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  color: #000;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer;
  user-select: none;
  text-transform: uppercase;
  position: relative;
}

.nav-tab.active {
  color: var(--accent);
  /* Defaulting to theme color for better contrast on white, but check comment */
  /* User said text color for navbar text, but usually it needs to contrast background. I'll stick to theme color for the active tab for now unless it looks wrong. Actually, let's follow the user exactly if they insist. */
  font-weight: 700;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--accent);
  /* Theme color for underline */
  border-radius: 3px 3px 0 0;
}

.nav-tab:not(.active):hover {
  color: var(--gold);
  background: rgba(var(--accent-rgb, 139, 105, 20), 0.06);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.verified-badge svg {
  fill: #19904B;
}

/* ═══════════════════════════════════════════════════════
   HOME
═══════════════════════════════════════════════════════ */
.banner {
  position: relative;
  height: 165px;
  overflow: hidden;
  background: #ccc;
}

.banner img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-logo {
  position: absolute;
  top: 10px;
  left: 12px;
  width: auto;
  height: 80px;
  max-width: 100px;
  object-fit: contain;
}

.avatar-row {
  display: flex;
  justify-content: center;
  margin-top: -75px;
  position: relative;
  z-index: 2;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid #fff;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  background: #ddd;
  transition: opacity 0.15s, transform 0.15s;
}

.avatar-link {
  display: inline-block;
  border-radius: 50%;
  line-height: 0;
}

.avatar-link:hover .avatar {
  opacity: 0.88;
  transform: scale(1.03);
}

.identity {
  text-align: center;
  padding: 10px 16px 4px;
}

.identity-name {
  font-size: 1.25rem;
  font-weight: bolder;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-transform: uppercase;
  margin-bottom: 0px;
}

.verified-badge {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: -2px;
}

.identity-title {
  font-size: 15px;
  color: var(--text-sub);
  margin-top: 0;
  line-height: 26px;
  margin-bottom: 0;
}

.identity-company {
  font-size: 15px;
  color: var(--text-sub);
}

.identity-dept {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}

.quick-actions {
  display: flex;
  gap: 20px;
  padding: 9px 16px 15px 16px;
  justify-content: center;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 11px 9px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  transition: opacity 0.15s, transform 0.12s;
  text-transform: uppercase;
  border: 2px solid var(--accent-text);
}

.btn-action:active {
  opacity: 0.8;
  transform: scale(0.96);
}

.btn-action.gold {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-action.gold svg {
  color: var(--accent-text);
  stroke: var(--accent-text);
}

.btn-action.outline {
  background: #fff;
  color: var(--gold-btn);
  border: 1.5px solid var(--gold-btn);
}

.btn-action svg {
  width: 16px;
  height: 16px;
}


.contact-list {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
  min-height: 50px;
  width: 100%;
  text-align: left;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
}

.contact-row:active {
  border-color: var(--gold-light);
}

.cr-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cr-icon svg {
  width: 20px;
  height: 20px;
}

.cr-icon.rounded {
  border-radius: 50%;
}

.cr-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.cr-text {
  flex: 1;
  font-size: 15px;
  font-weight: 400;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-row {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}

.ic-phone {
  background: #2DC84B;
}

.ic-email {
  background: #EA4335;
}

.ic-web {
  background: #1A73E8;
}

.ic-map {
  background: #FF6B35;
}

.ic-bank {
  background: #3F51B5;
}

.ic-tax {
  background: #FF9800;
}

.ic-lang {
  background: #607D8B;
}

.ic-custom-link {
  background: transparent !important;
}

.ic-custom-link svg {
  width: 100% !important;
  height: 100% !important;
}

.clear {
  clear: both;
}

.map-icon svg {
  width: 43px;
  height: 50px;
}

/* ═══════════════════════════════════════════════════════
   INTRODUCE
═══════════════════════════════════════════════════════ */
.intro-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 16px;
}

.intro-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.intro-company-banner {
  background: var(--gold-btn);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 12px 16px;
  margin: 0 12px 14px;
  border-radius: 6px;
  line-height: 20px;
}

.intro-bio {
  font-size: 15px;
  padding: 0 16px 24px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-sub);
}

.intro-bio p {
  font-size: 15px;
}

.intro-bio strong {
  color: var(--text);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   VIDEO
═══════════════════════════════════════════════════════ */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 12px;
}

.video-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
}

.video-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px 14px 10px;
  color: var(--text);
  line-height: 1.35;

}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ═══════════════════════════════════════════════════════
   SHOP
═══════════════════════════════════════════════════════ */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 14px 12px 24px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
}

.product-card:active {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transform: scale(0.98);
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f5f5f5;
  display: block;
  margin: 0 auto;
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 10px 10px 4px;
  color: var(--text);
  line-height: 1.6;
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  padding: 0 10px 12px;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.card-footer {
  text-align: center;
  padding: 18px 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #000;
  border-top: 1px solid var(--border);
}

.footer-badge {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 6px;
}

.footer-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 15px;
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════
   MODAL OVERLAY
═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  backdrop-filter: blur(3px);
  animation: overlayFadeIn 0.2s ease forwards;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-overlay.closing {
  animation: overlayFadeOut 0.25s ease forwards;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes overlayFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════
   MODALS — slide up on mobile, fade-in centered on desktop
═══════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--card-max);
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 20px 20px 36px;
  z-index: 300;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalSlideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.modal[hidden] {
  display: none;
}

.modal.closing {
  animation: modalSlideDown 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes modalSlideUp {
  from {
    transform: translateX(-50%) translateY(100%);
  }

  to {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes modalSlideDown {
  from {
    transform: translateX(-50%) translateY(0);
  }

  to {
    transform: translateX(-50%) translateY(105%);
  }
}

/* Floating close X — rendered outside .modal so it's never clipped */
#global-close-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

#global-close-btn[hidden] {
  display: none;
}

#global-close-btn:active {
  background: rgba(0, 0, 0, 0.9);
}

#global-close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text);
  text-transform: uppercase;
}

.social-qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  min-height: 200px;
}

.social-qr-container img,
.social-qr-container canvas {
  width: 200px !important;
  height: 200px !important;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
}

.id-modal-label {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── QR modal buttons ── */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-wrap canvas,
.qr-wrap img {
  border-radius: 6px;
  margin-bottom: 16px;
}

.qr-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #000;
  border-radius: 30px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: #f5f5f5;
  margin-bottom: 10px;
  text-transform: uppercase;
  transition: border-color 0.15s;
}

.qr-action-btn:active {
  background: #f5f5f5;
  border-color: var(--gold);
}

.qr-action-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Expiry modal ── */
.modal-expired {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-expired.active {
  display: flex !important;
}

.expired-inner {
  text-align: center;
  padding: 32px;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin: 20px;
}

.expired-icon {
  font-size: 48px;
  color: #fb8888;
  margin-bottom: 20px;
  display: block;
  font-weight: 700;
}

.expired-title {
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #000;
  line-height: 1.4;
}

.expired-sub {
  font-size: 14px;
  color: #555;
  margin-bottom: 24px;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.5;
}

.btn-expired-copy {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px 20px;
  width: 100%;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-expired-copy:active {
  background: #e5e5e5;
}

.btn-expired-zalo {
  background: #0068ff;
  color: #fff;
  border-radius: 30px;
  padding: 13px 20px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(0, 104, 255, 0.2);
}

.btn-expired-zalo:active {
  opacity: 0.9;
}

.btn-expired-copy svg,
.btn-expired-zalo svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.card-locked-blur {
  filter: blur(10px) grayscale(0.2);
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s ease;
  transform: scale(1.02);
  /* Slight scale for depth */
}

/* ── Bank modal ── */
.bank-qr-img {
  width: 100%;
  max-width: 330px;
  border-radius: var(--radius);
  margin: 0 auto 14px;
  display: block;
}

.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.bank-label {
  font-size: 19px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.bank-value {
  font-size: 0.88rem;
  font-weight: 600;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-btn);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 19px;
  font-weight: 700;
  margin-top: 14px;
  width: 100%;
  justify-content: center;
  transition: opacity 0.15s;
  text-transform: uppercase;
}

.btn-copy:active {
  opacity: 0.8;
}

.btn-copy svg {
  width: 16px;
  height: 16px;
}

.accdetail {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.6;
}

/* ── Tax modal ── */
.tax-info {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-sub);
}

.tax-info strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.tax-row {
  margin-bottom: 8px;
}

/* Staggered slide-up animation for tax rows */
@keyframes taxRowIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tax-row-anim {
  opacity: 0;
  animation: taxRowIn 0.3s ease forwards;
}

/* ── Zalo modal ── */
.zalo-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-zalo-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: #0068FF;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  transition: opacity 0.15s;
  text-align: center;
  text-transform: uppercase;
}

.btn-zalo-action:active {
  opacity: 0.8;
}

.btn-zalo-action.outline {
  background: #fff;
  color: #0068FF;
  border: 1.5px solid #0068FF;
}

.btn-zalo-action svg {
  width: 22px;
  height: 22px;
}

/* ═══════════════════════════════════════════════════════
   ADDRESS MODAL
═══════════════════════════════════════════════════════ */
.addr-text {
  font-size: 0.88rem;
  line-height: 2.0;
  color: var(--text-sub);
  padding: 0 4px 14px;
  word-wrap: break-word;
  word-break: break-word;
}

.addr-map-wrap {
  width: 100%;
  min-height: 450px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 15px;
  background: #f0f0f0;
}

.addr-map-wrap iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

.modal-iframe-container {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 15px;
  background: #f0f0f0;
  position: relative;
  border: 1px solid var(--border);
}

.modal-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ═══════════════════════════════════════════════════════
   PRODUCT DETAIL MODAL
═══════════════════════════════════════════════════════ */
.modal-product {
  padding: 0 0 40px;
  border-radius: 0;
  max-height: 100vh;
  top: 0;
  bottom: auto;
  overflow-y: auto;
}

/* Hero image */
.pd-hero {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0ede8;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

/* Thumbnail strip */
.pd-thumbs {
  display: -webkit-box;
  /* gap: 8px; */
  padding: 9px 17px;
  /* overflow-x: auto; */
  /* scrollbar-width: none; */
  flex-direction: row;
  align-items: center;
  width: max-content;
  margin: 0px auto;
}

.pd-thumbs::-webkit-scrollbar {
  display: none;
}

.pd-thumb {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 6px;
  /* overflow: hidden; */
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
  display: flex;
  justify-content: center;
  overflow: hidden;
  margin: 0 5px;
}

.pd-thumb.active {
  border-color: var(--gold);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  object-fit: cover;
}

/* Product link button */
.pd-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 14px;
  padding: 11px 20px;
  background: #fff;
  border: 1.5px solid #bbb;
  border-radius: 30px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  text-transform: uppercase;
  transition: border-color 0.15s;
}

.pd-link-btn:active {
  border-color: var(--gold);
}

.pd-link-btn svg {
  width: 15px;
  height: 15px;
}

/* Product body */
.pd-body {
  padding: 4px 14px 16px;
}

.pd-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  line-height: 1.35;
  text-align: center;
  font-size: 19px;
}

.pd-price {
  font-size: 19px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
  text-align: center;
}

.pd-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-sub);
}

/* ═══════════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.70);
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 0.22s ease forwards;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.closing {
  animation: lbFadeOut 0.22s ease forwards;
}

@keyframes lbFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes lbFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.lb-counter {
  position: absolute;
  top: 18px;
  left: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  font-weight: 600;
}


.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.lb-close:active {
  background: rgba(255, 255, 255, 0.3);
}

.lb-close svg {
  width: 20px;
  height: 20px;
}

.save-vcf {
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(139, 105, 20, 0.2);
  transition: all 0.2s;
  width: auto;
  margin: 0 auto;
}

.lb-img-wrap {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
}

.lb-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.lb-img.changing {
  opacity: 0;
  transform: scale(0.96);
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.lb-prev:active,
.lb-next:active {
  background: rgba(255, 255, 255, 0.35);
}

.lb-prev {
  left: 10px;
}

.lb-next {
  right: 10px;
}

.lb-prev svg,
.lb-next svg {
  width: 24px;
  height: 24px;
}

/* ═══════════════════════════════════════════════════════
   LANGUAGE MODAL
═══════════════════════════════════════════════════════ */
.lang-radio-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 4px 0 20px;
  flex-wrap: wrap;
}

.lang-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
}

.lang-radio-input {
  width: 18px;
  height: 18px;
  accent-color: #2563EB;
  /* blue radio dot matching screenshot */
  cursor: pointer;
}

.btn-change-lang {
  display: block;
  width: 100%;
  padding: 19px;
  background: #E63028;
  color: #fff;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-buy {
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: block;
  text-align: center;
  border: 1px solid var(--accent);
  transition: all 0.2s ease;
}

.btn-change-lang:active {
  opacity: 0.85;
  transform: scale(0.98);
}

/*    WECHAT / KAKAO ID MODAL  ══ */
.id-modal-label {
  font-size: 0.88rem;
  color: var(--text-sub);
  text-align: center;
  margin-bottom: 14px;
}

.id-modal-label strong {
  color: var(--text);
  font-weight: 700;
}

.id-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.lang-input-group input {
  width: 99%;
  height: 48px;
  border: 1px solid #000;
  border-radius: 10px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
  margin: 0 auto 12px auto;
  padding-left: 3px;
}

.pass_title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 11px;
  text-align: center;
  text-transform: uppercase;
}

.lang-error {
  color: #E63028;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════
   SKELETON
═══════════════════════════════════════════════════════ */
@keyframes shimmer {
  0% {
    background-position: -500px 0
  }

  100% {
    background-position: 500px 0
  }
}

#skeleton {
  width: 100%;
  max-width: var(--card-max);
}

.sk-banner {
  height: 180px;
}

.sk-avatar {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  margin: -52px auto 0;
  border: 4px solid #f0f0f0;
}

.sk-banner,
.sk-avatar {
  background: linear-gradient(90deg, #e0e0e0 25%, #ebebeb 50%, #e0e0e0 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.3s infinite linear;
}

.sk-line {
  height: 14px;
  border-radius: 7px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, #e0e0e0 25%, #ebebeb 50%, #e0e0e0 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.3s infinite linear;
}

.sk-line.w60 {
  width: 60%;
}

.sk-line.w40 {
  width: 40%;
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  background-color: var(--accent);
  color: var(--accent-text);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(10px);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:active {
  transform: scale(0.9);
}

#back-to-top svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (min-width: 481px) {
  body {
    padding-top: 0px;
  }

  /* Desktop: modal is centered — override slide animation with fade+drop */
  .modal {
    border-radius: 18px;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    max-height: 95%;
    animation: modalCenterIn 0.28s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }

  .modal.closing {
    animation: modalCenterOut 0.22s ease forwards;
  }

  .modal-product {
    border-radius: 18px;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    max-height: 92vh;
  }
}

/* Desktop centered modal animations — separate from mobile slide */
@keyframes modalCenterIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 20px));
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes modalCenterOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  to {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 16px));
  }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  :root {
    --card-max: 100%;
  }
}

/* ── Address Modal & Map ─────────────────────────────── */
.addr-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 20px;
  padding: 0 4px;
}

.modal-iframe-container {
  width: 100%;
  height: 400px;
  max-height: 50vh;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 15px;
  background: #f0f0f0;
  position: relative;
  border: 1px solid var(--border);
}

.modal-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.addr-map-wrap {
  width: 100%;
  height: 400px;
  background: #f4f4f4;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid #eee;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  margin-top: 20px;
}

.addr-map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Flag language button in nav ── */
.nav-tab-flag {
  font-size: 20px;
  padding: 2px 8px;
  flex: 0 0 auto;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-tab-flag:hover {
  border-bottom-color: var(--accent);
}

/* ── Expiry popup — matches screenshot design ── */
.modal-expired {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.expired-inner {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  animation: expiredIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes expiredIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.expired-icon-wrap {
  margin-bottom: 18px;
}

.expired-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff0f0;
  border: 2px solid #ffcccc;
  color: #e53935;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.expired-title {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  color: #111;
  line-height: 1.5;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

.btn-expired-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  background: #f5f5f5;
  border: 1.5px solid #ddd;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
  cursor: pointer;
  margin-bottom: 12px;
  text-transform: uppercase;
  transition: background 0.15s;
}

.btn-expired-copy:active {
  background: #ebebeb;
}

.btn-expired-copy svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-expired-zalo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  background: #0068ff;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 104, 255, 0.28);
  transition: opacity 0.15s;
}

.btn-expired-zalo:active {
  opacity: 0.88;
}

.btn-expired-zalo svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Language flag pill in nav ── */
.nav-lang-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto 2px auto auto;
  padding: 0;
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  transition: background 0.15s, transform 0.15s;
}

.nav-lang-pill:hover {
  background: rgba(var(--accent-rgb, 139, 105, 20), 0.08);
  transform: scale(1.1);
}

.nav-lang-pill:active {
  transform: scale(0.93);
}

.nav-lang-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.10);
}

.nav-lang-flag svg {
  width: 100%;
  height: 100%;
  display: block;
  /* Scale up slightly so the flag fills the circle without letterboxing */
  transform: scale(1.15);
}

/* ── Expiry popup — exact match to client screenshot ── */
.modal-expired {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.expired-inner {
  text-align: center;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.expired-icon {
  font-size: 48px;
  color: #e74c3c;
  font-weight: 900;
  margin-bottom: 16px;
  line-height: 1;
  display: block;
}

.expired-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: #111;
  line-height: 1.5;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.btn-expired-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: #fff;
  border: 1.5px solid #111;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
  cursor: pointer;
  margin-bottom: 12px;
  text-transform: uppercase;
  transition: background 0.15s;
  box-sizing: border-box;
}

.btn-expired-copy:active {
  background: #f5f5f5;
}

.btn-expired-zalo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: #0068ff;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.3);
  transition: opacity 0.15s;
  box-sizing: border-box;
}

.btn-expired-zalo:active {
  opacity: 0.88;
}

/* ── Language flag pill in nav — premium design (consolidated above) ── */

/* ── Language row icon — flag emoji ── */
.cr-icon-lang {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border-radius: 8px;
}