/* MaPhuket Vintage — โปสการ์ด น่ารัก วินเทจ */
:root {
  --vt-paper: #f5eedc;
  --vt-paper-dark: #e8dcc4;
  --vt-ink: #3d2914;
  --vt-ink-soft: #5c4a32;
  --vt-coral: #c45c3e;
  --vt-coral-dark: #a3472e;
  --vt-sage: #5a7a6a;
  --vt-sage-light: #7a9a88;
  --vt-mustard: #d4a853;
  --vt-sky: #6b8cae;
  --vt-sky-light: #8fadc8;
  --vt-border: #c4b08a;
  --vt-shadow: 4px 4px 0 rgba(61, 41, 20, 0.18);
  --vt-radius: 14px;
  --vt-font-display: "Chonburi", "Kanit", sans-serif;
  --vt-font-cute: "Mali", "Kanit", sans-serif;
}

body {
  padding-top: 0 !important;
}

body.mp-body {
  font-family: var(--vt-font-cute);
  color: var(--vt-ink-soft);
  background-color: var(--vt-paper);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(212, 168, 83, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(107, 140, 174, 0.1) 0%, transparent 35%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30h60M30 0v60' stroke='%23c4b08a' stroke-width='0.4' opacity='0.35'/%3E%3C/svg%3E");
  background-attachment: fixed;
  padding-top: var(--mp-nav-h, 64px) !important;
}

body.mp-body .mp-top-cta {
  display: none !important;
}

nav.mp-navbar.navbar.fixed-top {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  margin: 0;
  z-index: 1050;
}

/* —— Nav วินเทจ —— */
nav.mp-navbar.navbar {
  background: var(--vt-paper) !important;
  border-bottom: 3px dashed var(--vt-border) !important;
  box-shadow: 0 3px 0 var(--vt-paper-dark) !important;
  min-height: 0;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

@media (max-width: 991px) {
  body.mp-body {
    padding-top: 54px !important;
  }

  nav.mp-navbar.navbar {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
  }

  nav.mp-navbar .navbar-brand {
    padding: 0.2rem 0.45rem;
  }

  nav.mp-navbar .navbar-brand img {
    max-height: 42px;
  }
}

body.mp-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.mp-body > main,
body.mp-body > footer,
body.mp-body > section,
body.mp-body > .container {
  position: relative;
  z-index: 1;
}

h1, h2, h3, .mp-section-title, .mp-tour-card__title {
  font-family: var(--vt-font-display);
  color: var(--vt-ink);
}

/* —— Nav วินเทจ (brand + links) —— */
nav.mp-navbar .navbar-brand {
  background: #fff8ef;
  border: 2px solid var(--vt-border);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow);
}

nav.mp-navbar .navbar-nav .nav-link {
  color: var(--vt-ink) !important;
  font-family: var(--vt-font-cute);
  font-weight: 600 !important;
}

nav.mp-navbar .navbar-nav .nav-link:hover {
  color: var(--vt-coral) !important;
}

nav.mp-navbar .mp-btn-book {
  background: var(--vt-coral) !important;
  border: 2px solid var(--vt-ink) !important;
  border-radius: 999px !important;
  box-shadow: var(--vt-shadow) !important;
  font-family: var(--vt-font-cute) !important;
}

.mp-top-cta {
  background: #fff8ef;
  border-bottom: 2px dashed var(--vt-border);
}

.mp-top-cta__line { background: var(--vt-sage) !important; }
.mp-top-cta__tel { background: var(--vt-coral) !important; }
.mp-top-cta__form { background: var(--vt-mustard) !important; color: var(--vt-ink) !important; }

/* —— Carousel โปสการ์ด —— */
.mp-carousel .carousel-item img {
  border: 3px solid var(--vt-border);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow);
}

.mp-contact-strip {
  background: var(--vt-sage) !important;
  border: 2px solid var(--vt-ink);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow);
  font-family: var(--vt-font-cute);
}

.mp-page-intro {
  border-bottom: 2px dashed var(--vt-mustard);
}

.mp-page-intro h1 {
  font-size: clamp(1.3rem, 4vw, 1.85rem);
  color: var(--vt-coral-dark);
}

/* —— การ์ดทัวร์ โปสการ์ด —— */
.mp-tour-card {
  background: #fff8ef;
  border: 2px solid var(--vt-border);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.mp-tour-card:hover {
  transform: translate(-2px, -3px);
  box-shadow: 6px 6px 0 rgba(61, 41, 20, 0.22);
}

.mp-tour-card__img-wrap img {
  border-bottom: 2px dashed var(--vt-border);
}

.mp-tour-card__title a {
  color: var(--vt-ink);
}

.mp-tour-card__title a:hover {
  color: var(--vt-coral);
}

/* —— ปุ่ม —— */
.mp-btn-primary,
.mp-btn-accent {
  font-family: var(--vt-font-cute);
  font-weight: 700;
  border: 2px solid var(--vt-ink) !important;
  border-radius: 999px !important;
  box-shadow: 3px 3px 0 rgba(61, 41, 20, 0.2) !important;
  transition: transform 0.15s, box-shadow 0.15s !important;
}

.mp-btn-primary {
  background: var(--vt-sky) !important;
  color: #fff !important;
}

.mp-btn-accent {
  background: var(--vt-coral) !important;
  color: #fff !important;
}

.mp-btn-primary:active,
.mp-btn-accent:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(61, 41, 20, 0.2) !important;
}

/* —— CTA hooks —— */
.mp-cta-hooks-section {
  padding: 1rem 0;
}

.mp-cta-hook {
  background: #fff8ef;
  border: 2px solid var(--vt-border);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow);
}

.mp-cta-hook__title {
  font-family: var(--vt-font-display);
  font-size: 1rem;
  color: var(--vt-coral-dark);
}

.mp-section-title {
  color: var(--vt-ink);
  position: relative;
  display: inline-block;
}

.mp-section-title::after {
  content: "✦";
  margin-left: 0.35rem;
  color: var(--vt-mustard);
  font-size: 0.85em;
}

.mp-section-sub {
  font-family: var(--vt-font-cute);
  color: var(--vt-ink-soft);
}

/* —— Trust bar —— */
.mp-trust-bar {
  background: #fff8ef !important;
  border: 2px solid var(--vt-border) !important;
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow);
  padding: 0.85rem 1rem !important;
}

.mp-trust-bar::before {
  display: none;
}

.mp-trust-bar__inner {
  gap: 0.65rem 0.75rem;
}

.mp-trust-item {
  color: var(--vt-ink) !important;
}

.mp-trust-item__icon {
  background: #fff !important;
  border: 2px solid var(--vt-border) !important;
  color: var(--vt-coral-dark) !important;
  font-size: 0.95rem;
}

.mp-trust-item strong {
  color: var(--vt-ink) !important;
  font-family: var(--vt-font-display);
  font-size: 0.85rem;
}

.mp-trust-item span {
  color: var(--vt-ink-soft) !important;
  opacity: 1 !important;
  font-size: 0.75rem;
}

.mp-trust-item--highlight {
  background: rgba(212, 168, 83, 0.15);
  border-radius: 10px;
  padding: 0.35rem 0.45rem;
}

.mp-trust-item--highlight .mp-trust-item__icon {
  background: var(--vt-mustard) !important;
  color: var(--vt-ink) !important;
  border-color: var(--vt-ink) !important;
}

/* —— ทัวร์สุ่ม 8 การ์ด —— */
.mp-tours-random {
  margin: 1.25rem 0 0;
  padding-top: 0.5rem;
}

.mp-tour-grid--random {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 991px) {
  .mp-tour-grid--random {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .mp-tour-grid--random {
    grid-template-columns: 1fr;
  }
}

/* —— Footer —— */
.mp-footer {
  background: var(--vt-ink);
  border-top: 4px solid var(--vt-mustard);
  font-family: var(--vt-font-cute);
}

.mp-footer h3 {
  font-family: var(--vt-font-display);
  color: var(--vt-mustard);
}

.mp-sticky-bar a {
  font-family: var(--vt-font-cute);
  font-weight: 700;
}

/* —— CTA 4 การ์ด + carousel มือถือ —— */
.mp-cta-hooks-grid--desktop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 991px) {
  .mp-cta-hooks-grid--desktop {
    display: none;
  }
}

.mp-cta-carousel {
  margin: 0 -0.25rem;
  padding-bottom: 2rem;
}

.mp-cta-carousel .carousel-inner {
  border-radius: var(--vt-radius);
}

.mp-cta-carousel .carousel-item {
  padding: 0 0.35rem 0.5rem;
}

.mp-cta-carousel .mp-cta-hook {
  min-height: 220px;
  margin: 0;
}

.mp-cta-carousel .carousel-indicators {
  bottom: -0.25rem;
}

.mp-cta-carousel .carousel-indicators li {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--vt-border);
}

.mp-cta-carousel .carousel-indicators .active {
  background-color: var(--vt-coral);
}

.mp-cta-carousel .carousel-control-prev,
.mp-cta-carousel .carousel-control-next {
  width: 36px;
  height: 36px;
  top: 42%;
  background: rgba(61, 41, 20, 0.45);
  border-radius: 50%;
}

/* —— NPC fixbot ขวาล่าง ตามจอ —— */
.mp-npc {
  position: fixed !important;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--mp-sticky-h, 56px) + max(12px, env(safe-area-inset-bottom, 0px)));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(320px, calc(100vw - 24px));
  pointer-events: none;
}

@media (min-width: 992px) {
  .mp-npc {
    bottom: max(18px, env(safe-area-inset-bottom, 18px));
  }
}

.mp-npc--ready .mp-npc__avatar {
  pointer-events: auto;
}

.mp-npc__avatar {
  position: relative;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 2.5px solid var(--vt-ink);
  border-radius: 50%;
  background: #fff8ef;
  box-shadow: var(--vt-shadow);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: mp-npc-idle 3.5s ease-in-out infinite;
}

.mp-npc--open .mp-npc__avatar {
  animation: none;
  transform: scale(0.92);
  box-shadow: 2px 2px 0 rgba(61, 41, 20, 0.15);
}

.mp-npc__avatar:hover {
  transform: scale(1.06);
  box-shadow: 5px 5px 0 rgba(61, 41, 20, 0.2);
}

.mp-npc__sprite {
  display: block;
  width: 100%;
  height: 100%;
}

.mp-npc__ping {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--vt-coral);
  border-radius: 50%;
  opacity: 0;
  animation: mp-npc-ping 2.8s ease-out infinite;
}

.mp-npc--hint .mp-npc__ping {
  animation: none;
  opacity: 0.5;
}

.mp-npc__hint {
  position: absolute;
  right: calc(100% + 8px);
  bottom: 50%;
  transform: translateY(50%) scale(0.85);
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  font-family: var(--vt-font-cute);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vt-ink);
  background: #fff8ef;
  border: 2px solid var(--vt-ink);
  border-radius: 12px 12px 4px 12px;
  box-shadow: var(--vt-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}

.mp-npc--hint .mp-npc__hint,
.mp-npc--open .mp-npc__hint {
  opacity: 1;
  transform: translateY(50%) scale(1);
}

.mp-npc--hint-swap .mp-npc__hint {
  animation: mp-npc-hint-pop 0.35s ease;
}

@keyframes mp-npc-hint-pop {
  0% { transform: translateY(50%) scale(0.92); opacity: 0.7; }
  60% { transform: translateY(50%) scale(1.04); opacity: 1; }
  100% { transform: translateY(50%) scale(1); opacity: 1; }
}

.mp-npc__panel {
  pointer-events: auto;
  width: min(300px, calc(100vw - 28px));
  padding: 0.85rem 0.9rem 0.75rem;
  background: #fff8ef;
  border: 2.5px solid var(--vt-ink);
  border-radius: var(--vt-radius);
  box-shadow: 6px 6px 0 rgba(61, 41, 20, 0.22);
  animation: mp-npc-pop 0.35s ease;
  position: relative;
  overflow: hidden;
}

.mp-npc__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px dashed var(--vt-border);
}

.mp-npc__name {
  display: block;
  font-family: var(--vt-font-display);
  font-size: 1.05rem;
  color: var(--vt-coral-dark);
  line-height: 1.2;
}

.mp-npc__role {
  font-size: 0.68rem;
  color: var(--vt-sage);
  font-weight: 600;
}

.mp-npc__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2px solid var(--vt-ink);
  border-radius: 50%;
  background: var(--vt-paper);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--vt-ink);
}

.mp-npc__stamp {
  position: absolute;
  top: 12px;
  right: 36px;
  font-family: var(--vt-font-display);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--vt-coral);
  opacity: 0.35;
  transform: rotate(-12deg);
  border: 2px solid var(--vt-coral);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  pointer-events: none;
}

.mp-npc__bubble {
  min-height: 4.5rem;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.65rem;
  background: var(--vt-paper);
  border: 1.5px dashed var(--vt-border);
  border-radius: 10px;
}

.mp-npc__text {
  margin: 0;
  font-family: var(--vt-font-cute);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--vt-ink);
  white-space: pre-wrap;
}

.mp-npc__tour {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--vt-sky);
  line-height: 1.45;
  white-space: pre-wrap;
}

.mp-npc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mp-npc__btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.4rem 0.55rem;
  font-family: var(--vt-font-cute);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  border: 2px solid var(--vt-ink);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(61, 41, 20, 0.15);
  transition: transform 0.12s;
}

.mp-npc__btn:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.mp-npc__btn--main {
  background: var(--vt-sky);
  color: #fff !important;
}

.mp-npc__btn--ghost {
  background: var(--vt-paper);
  color: var(--vt-ink);
}

.mp-npc__btn--line {
  background: var(--vt-sage);
  color: #fff !important;
  flex: 1 1 100%;
}

@keyframes mp-npc-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes mp-npc-ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes mp-npc-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mp-npc__avatar,
  .mp-npc__ping {
    animation: none !important;
  }
  .mp-npc__panel {
    animation: none;
  }
}

@media (max-width: 380px) {
  .mp-npc__hint {
    display: none;
  }
}
