/* =========================================================
   LPN Group – Landing Page
   ========================================================= */

:root {
  --lpn-red: #eb2a2e;
  --lpn-red-label: rgba(255, 0, 0, .69);
  --lpn-black: #000;
  --lpn-gray-text: #7e7e7e;
  --lpn-btn-bg: #f0f2f5;
  --lpn-btn-border: #e5e5e5;
  --lpn-footer-bg: #6d6d6e;
  --lpn-card-bg: #575757;
  --lpn-radius: 20px;
  --lpn-font: "Inter", "Noto Sans Thai", sans-serif;
}

body {
  font-family: var(--lpn-font);
  color: var(--lpn-black);
  background: #f2f4f7;
}

/* container 1200px ตามดีไซน์ */
@media (min-width: 1240px) {
  .container { max-width: 1224px; } /* 1200 + padding */
}

/* ===================== HEADER ===================== */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 40px 0;
}
.header-logo img {
  width: 110px;
  height: auto;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, .15));
}
.header-icons {
  display: flex;
  gap: 20px;
}
.header-icon img {
  width: 45px;
  height: 45px;
  transition: transform .2s;
}
.header-icon:hover img { transform: scale(1.08); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  height: 930px;
  background: url("../images/hero-paper.jpg") center / cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0 auto 0 0;
  width: 81.25%; /* 1560 / 1920 */
  background: linear-gradient(90deg, rgba(139, 150, 154, .3), rgba(139, 150, 154, 0));
  mix-blend-mode: multiply;
}
.hero-container { position: relative; }
.hero-text {
  margin-top: 58px;
  color: #fff;
}
.hero-sub {
  font-size: 40px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 9px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, .15);
}
.hero-title {
  font-size: 70px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  text-shadow: 0 4px 15px rgba(0, 0, 0, .25);
}

/* ===================== PRODUCTS ===================== */
.products {
  position: relative;
  background: #fff;
  padding: 101px 0 100px;
  overflow: hidden;
}
.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
}
/* ตำแหน่งลายตกแต่งอ้างอิงกึ่งกลางจอ (ดีไซน์ 1920) */
.deco-1 { width: 423px; top: 33px;  left: calc(50% + 108px); }
.deco-2 { width: 343px; top: 576px; left: calc(50% + 462px); }
.deco-3 { width: 332px; top: 776px; left: calc(50% - 717px); }

.section-title {
  font-size: 60px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 10px;
}
.section-desc {
  font-size: 18px;
  line-height: 1.4;
  color: var(--lpn-gray-text);
  margin-bottom: 20px;
}
.select-title {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--lpn-red);
  margin-bottom: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px 24px;
}
.category-btn {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 74px;
  padding: 15px 34px 15px 20px;
  background: var(--lpn-btn-bg);
  border: 1px solid var(--lpn-btn-border);
  border-radius: var(--lpn-radius);
  font-family: inherit;
  font-size: 18px;
  line-height: 1.2;
  text-align: left;
  color: var(--lpn-black);
  transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.category-btn .arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--lpn-red);
  transition: transform .2s;
}
.category-btn:hover,
.category-btn:focus-visible {
  background: #fff;
  border-color: var(--lpn-red);
  box-shadow: 0 6px 18px rgba(235, 42, 46, .12);
  outline: none;
}
.category-btn:hover .arrow { transform: translate(4px, -50%); }

/* ===================== PRODUCT MODAL ===================== */
.product-modal .modal-dialog { max-width: 1200px; }
.product-modal .modal-content {
  border: 0;
  border-radius: var(--lpn-radius);
  padding: 14px 50px 50px;
}
.modal-backdrop.show {
  opacity: 1;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(13px);
}
.modal-head {
  position: relative;
  padding-top: 40px;
  margin-bottom: 30px;
}
.modal-cat-title {
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--lpn-red);
  margin: 0;
  padding-right: 50px;
}
.btn-modal-close {
  position: absolute;
  top: 0;
  right: -40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
}
.btn-modal-close img { width: 40px; height: 40px; }
.product-modal .modal-body { padding: 0; }

.factory-row {
  display: grid;
  grid-template-columns: 356px 1fr;
  gap: 16px;
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--lpn-btn-border);
}
.factory-row:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.factory-card {
  position: relative;
  height: 166px;
  border-radius: var(--lpn-radius);
  overflow: hidden;
  background: var(--lpn-btn-bg);
}
.factory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.factory-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: var(--lpn-red-label);
  border-radius: var(--lpn-radius);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-content: start;
}
.item-card {
  min-height: 75px;
  padding: 14px 20px;
  background: var(--lpn-btn-bg);
  border: 1px solid var(--lpn-btn-border);
  border-radius: var(--lpn-radius);
}
.item-name {
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.item-gsm {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  line-height: 1;
}
.modal-empty {
  padding: 20px 0;
  color: var(--lpn-gray-text);
  font-size: 18px;
}
.modal-empty a { color: var(--lpn-red); }

/* ===================== FOOTER ===================== */
.site-footer {
  position: relative;
  background: var(--lpn-footer-bg);
  color: #fff;
  padding: 60px 0 30px;
  overflow: hidden;
}
.footer-watermark {
  position: absolute;
  width: 597px;
  top: 11px;
  left: calc(50% + 313px);
  pointer-events: none;
}
.footer-title {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 30px;
}
.branch-card {
  height: 100%;
  padding: 30px;
  background: var(--lpn-card-bg);
  border-radius: var(--lpn-radius);
}
.branch-card.is-main { background: var(--lpn-red); }
.branch-name {
  font-size: 25px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 13px;
}
.branch-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 50px;
}
.branch-links a {
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
}
.branch-links a img {
  width: 40px;
  height: 40px;
  margin-right: 0;
}
.branch-links a:nth-child(2) img { margin-right: 10px; }
.branch-links a:hover { text-decoration: underline; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}
.copyright {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
}
.footer-fb svg { display: block; transition: transform .2s; }
.footer-fb:hover svg { transform: scale(1.08); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1199.98px) {
  .hero { height: 760px; }
  .hero-sub { font-size: 34px; }
  .hero-title { font-size: 58px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-watermark { left: auto; right: -120px; }
}

@media (max-width: 991.98px) {
  .header-inner { padding: 24px 24px 0; }
  .header-logo img { width: 84px; }
  .header-icon img { width: 40px; height: 40px; }
  .hero { height: 640px; }
  .hero-text { margin-top: 0; }
  .hero-sub { font-size: 26px; }
  .hero-title { font-size: 44px; }
  .section-title { font-size: 46px; }
  .select-title { font-size: 26px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
  .deco-1 { left: auto; right: -140px; }
  .deco-3 { left: -160px; }

  .product-modal .modal-content { padding: 10px 24px 30px; }
  .btn-modal-close { right: -10px; }
  .factory-row { grid-template-columns: 1fr; }
  .factory-card { height: 180px; }
}

@media (max-width: 575.98px) {
  .header-inner { padding: 16px 16px 0; }
  .header-logo img { width: 64px; }
  .header-icons { gap: 12px; }
  .header-icon img { width: 36px; height: 36px; }
  .hero { height: 520px; background-position: 65% center; }
  .hero-overlay { width: 100%; background: linear-gradient(90deg, rgba(60, 66, 70, .45), rgba(60, 66, 70, .05)); }
  .hero-sub { font-size: 18px; }
  .hero-title { font-size: 32px; }

  .products { padding: 60px 0; }
  .section-title { font-size: 36px; }
  .section-desc { font-size: 16px; }
  .select-title { font-size: 22px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .category-btn { min-height: 58px; padding: 10px 26px 10px 12px; font-size: 14px; border-radius: 14px; }
  .category-btn .arrow { right: 10px; width: 12px; height: 12px; }
  .deco-2 { display: none; }

  .item-grid { grid-template-columns: 1fr; gap: 10px; }
  .item-name, .factory-name { font-size: 16px; }
  .modal-cat-title { font-size: 22px; }

  .site-footer { padding: 48px 0 24px; }
  .footer-title { font-size: 24px; }
  .branch-card { padding: 22px; }
  .branch-name { font-size: 19px; }
  .branch-links { gap: 4px 24px; }
  .branch-links a { font-size: 16px; }
  .footer-watermark { width: 380px; right: -140px; top: auto; bottom: 0; }
  .footer-bottom { flex-direction: column-reverse; align-items: flex-start; }
  .copyright { font-size: 13px; }
}
