/* ==========================================================
   lp.css — CSS dùng chung cho mọi landing page
   Thiết kế mobile-first. Desktop có 2 chế độ:
     <body class="lp-desktop-a">  → Khung mobile ở giữa màn hình (mặc định)
     <body class="lp-desktop-b">  → Giao diện desktop rộng, lưới nhiều cột
   ========================================================== */

:root {
  --lp-max-mobile: 480px;   /* bề rộng khung mobile trên desktop (chế độ A) */
  --lp-max-desktop: 1120px; /* bề rộng nội dung tối đa (chế độ B) */
  --lp-bg-outside: #f2f2f2; /* nền hai bên khung (chế độ A) — LP có thể ghi đè */
  --lp-gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; line-height: 1.5; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

/* Khung chính của trang: mọi nội dung nằm trong <main class="lp"> */
.lp { width: 100%; margin: 0 auto; overflow-x: hidden; background: #fff; }
.lp-section { padding-inline: var(--lp-gutter); }

/* Lưới: mobile 1 cột, desktop (chế độ B) tự thành nhiều cột */
.lp-grid { display: grid; gap: var(--lp-gutter); grid-template-columns: 1fr; }

/* Chỉ hiện trên mobile / chỉ hiện trên desktop */
.lp-only-desktop { display: none !important; }

/* ---------- Chế độ A: khung mobile ở giữa ---------- */
@media (min-width: 768px) {
  body.lp-desktop-a { background: var(--lp-bg-outside); }
  body.lp-desktop-a .lp {
    max-width: var(--lp-max-mobile);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, .12);
  }
  /* Thanh cố định đáy (nút mua, gọi…) cũng gói trong khung */
  body.lp-desktop-a .lp-fixed-bottom {
    left: 50% !important; right: auto !important;
    width: 100%; max-width: var(--lp-max-mobile);
    transform: translateX(-50%);
  }
}

/* ---------- Chế độ B: desktop rộng ---------- */
@media (min-width: 900px) {
  body.lp-desktop-b .lp-section {
    max-width: var(--lp-max-desktop);
    margin-inline: auto;
    padding-inline: 32px;
  }
  body.lp-desktop-b .lp-grid--2 { grid-template-columns: repeat(2, 1fr); }
  body.lp-desktop-b .lp-grid--3 { grid-template-columns: repeat(3, 1fr); }
  body.lp-desktop-b .lp-grid--4 { grid-template-columns: repeat(4, 1fr); }
  /* Hero 2 cột: chữ bên trái, ảnh bên phải */
  body.lp-desktop-b .lp-split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  }
  body.lp-desktop-b .lp-only-mobile { display: none !important; }
  body.lp-desktop-b .lp-only-desktop { display: revert !important; }
}
