/* ================= ROOT ================= */
:root {
  --pink-main: #c4007a;
  --pink-dark: #9c005f;
  --pink-light: #e753a0;
  --white: #fff;
  --dark: #222;
  --shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Kanit', sans-serif;
}

/* ================= HEADER ================= */
.site-header {
  background: var(--pink-main);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* ================= NAVBAR ================= */
.navbar {
  width: 100%;
}

.nav-container {
  max-width: 1300px;
  height: 72px;
  margin: auto;
  padding: 0 24px;

  display: flex;
  align-items: center;
}
 .nav-wrapper{justify-content: space-between;}
/* ===== LEFT (LOGO) ===== */
.nav-left {
  flex: 0 0 auto;
}

.nav-logo img {
  height: 44px;
  display: block;
}

/* ===== MENU (DESKTOP) ===== */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 30px;

  margin-left: auto; /* 🔥 ดันไปขวาสุด */
}

.nav-menu a,
.submenu-toggle {
  color: var(--white);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

/* ===== HOVER EFFECT (DESKTOP ONLY) ===== */
@media (min-width: 1024px) {
  .nav-menu a::after,
  .submenu-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--pink-light);
    transition: .3s;
  }

  .nav-menu a:hover::after,
  .submenu-toggle:hover::after {
    width: 100%;
  }

  .nav-menu a:hover,
  .submenu-toggle:hover {
    color: #555455;
  }
}

/* ===== SUBMENU ===== */
.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--white);
  box-shadow: var(--shadow);
  list-style: none;
}

.submenu.active {
  display: block;
}

.submenu a {
  display: block;
  padding: 12px 16px;
  color: var(--dark);
}

.submenu a:hover {
  background: #ffe6f3;
}

/* ================= HAMBURGER ================= */
.HamMenu {
  display: none;
  cursor: pointer;
  margin-left: 16px;
}

.HamMenu span {
  width: 28px;
  height: 3px;
  background: var(--white);
  display: block;
  margin: 6px 0;
  transition: .4s;
}

/* Animate */
.HamMenu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.HamMenu.active span:nth-child(2) {
  opacity: 0;
}
.HamMenu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ================= MOBILE / TABLET ================= */
@media (max-width: 1023px) {

  .HamMenu {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--pink-main);
    flex-direction: column;
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.2);
  }

  .nav-menu a,
  .submenu-toggle {
    padding: 16px;
    width: 100%;
  }

  .submenu {
    position: static;
    background: var(--pink-dark);
    box-shadow: none;
  }

  .submenu a {
    color: var(--white);
  }
}

/* ================= ROOT ================= */
:root {
  --pink-main: #c4007a;
  --pink-dark: #9c005f;
  --pink-light: #e753a0;
  --white: #fff;
  --dark: #222;
  --shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Kanit', sans-serif;
}

/* ================= HEADER ================= */
.site-header {
  background: var(--pink-main);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* ================= NAVBAR ================= */
.navbar {
  width: 100%;
}

.nav-container {
  max-width: 1300px;
  height: 72px;
  margin: auto;
  padding: 0 24px;

  display: flex;
  align-items: center;
}

/* ===== LEFT (LOGO) ===== */
.nav-left {
  flex: 0 0 auto;
}

.nav-logo img {
  height: 44px;
  display: block;
}

/* ===== MENU (DESKTOP) ===== */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 32px;

  margin-left: auto; /* 🔥 ดันไปขวาสุด */
}

.nav-menu a,
.submenu-toggle {
  color: var(--white);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

/* ===== HOVER EFFECT (DESKTOP ONLY) ===== */
@media (min-width: 1024px) {
  .nav-menu a::after,
  .submenu-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--pink-light);
    transition: .3s;
  }

  .nav-menu a:hover::after,
  .submenu-toggle:hover::after {
    width: 100%;
  }

  .nav-menu a:hover,
  .submenu-toggle:hover {
    color: #6e6c6c;
  }
}

/* ===== SUBMENU ===== */
.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--white);
  box-shadow: var(--shadow);
  list-style: none;
}

.submenu.active {
  display: block;
}

.submenu a {
  display: block;
  padding: 12px 16px;
  color: var(--dark);
}

.submenu a:hover {
  background: #ffe6f3;
}

/* ================= HAMBURGER ================= */
.HamMenu {
  display: none;
  cursor: pointer;
  margin-left: 16px;
}

.HamMenu span {
  width: 28px;
  height: 3px;
  background: var(--white);
  display: block;
  margin: 6px 0;
  transition: .4s;
}

/* Animate */
.HamMenu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.HamMenu.active span:nth-child(2) {
  opacity: 0;
}
.HamMenu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ================= MOBILE / TABLET ================= */
@media (max-width: 1023px) {

  .HamMenu {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--pink-main);
    flex-direction: column;
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.2);
  }

  .nav-menu a,
  .submenu-toggle {
    padding: 16px;
    width: 100%;
  }

  .submenu {
    position: static;
    background: var(--pink-dark);
    box-shadow: none;
  }

  .submenu a {
    color: var(--white);
  }
}


 /* ===== Sections ===== */
    section { padding: 4rem 1.5rem; }
a{text-decoration: none; color: #ffffff;
  .hover{color: var(--pink-light);}
}


.p{padding: 3rem;}
    .hero {
      background: linear-gradient(135deg, var(--pink-light), #fff);
      text-align: center;
    }

    .hero h1 { color: var(--pink-main); font-size: 2.5rem; margin-bottom: 1rem; }
    .hero p { max-width: 600px; margin: auto; color: var(--gray); }

    .container { max-width: 1200px; margin: auto;column-gap:1rem }

    h2 { color: var(--pink-main); margin-bottom: 2rem; text-align: center; }

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 1.5rem;
    }
/* ================= START Product CARD ================= */ 
.product-section {
  padding: 4rem 0;
  background: #fff;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  font-weight: 600;
}

/* ================= OUTER PADDING (2rem รอบ card) ================= */
.product-wrapper {
  padding: 2rem;
}

/* ================= GRID ================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Desktop = 4 ใบ */
  gap: 2rem;
}

/* ================= CARD ================= */
.product-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: transform .3s ease, box-shadow .3s ease;

  /* สำคัญ: ไม่จัดกึ่งกลางแนวตั้ง */
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.15);
}

/* ================= IMAGE ================= */
.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 1rem;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.product-card:hover img {
  transform: scale(1.06);
}

/* ================= TEXT ================= */
.product-info {
  text-align: center;
  margin-top: auto; /* ดันข้อความลงด้านล่าง */
}

.product-info h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.product-info .price {
  font-size: 1rem;
  font-weight: 600;
  color: #e64c8b;
}

/* ================= TABLET ================= */
@media (max-width: 991px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================= MOBILE ================= */
@media (max-width: 575px) {
  .product-wrapper {
    padding: 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}
/* ================= End Product CARD ================= */ 

    /* ===== Footer ===== */
    footer {
      background: linear-gradient(90deg, var(--pink-dark), var(--pink-main));
      color: #fff;
      margin-top: 3rem;
    }

    .footer-content {
      max-width: 1200px;
      margin: auto;
      padding: 2.5rem 1.5rem;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 2rem;
    }

    .footer-content h3 { margin-bottom: 1rem; }

    .footer-bottom {
      text-align: center;
      padding: 1rem;
      background: rgba(0,0,0,.1);
      font-size: 0.9rem;
    }
  
/* ================= POLICY SECTION ================= */
.policy-section {
  padding: 4rem 0;
  background: #fff5f8;
}

.policy-header h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-weight: 600;
}

/* ================= IMAGE FRAME ================= */
.policy-image-wrapper {
  max-width: 900px;
  margin: 0 auto 3rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.policy-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ================= POLICY GRID ================= */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: auto;
}

/* ================= POLICY CARD ================= */
.policy-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform .3s ease, box-shadow .3s ease;
}

.policy-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  text-decoration: none;
  color: #333;
}

.policy-card i {
  font-size: 2.4rem;
  color: #e64c8b;
  margin-bottom: 1rem;
}

.policy-card h4 {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.policy-card span {
  font-size: 0.9rem;
  color: #777;
}

.policy-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.15);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .policy-grid {
    grid-template-columns: 1fr;
  }

  .policy-card a {
    padding: 1.5rem;
  }
}

/* ================= MAP RESPONSIVE ================= */
.contact-section {
  background-color: #fff;
}

/* Thumbnail */
.map-thumb {
  cursor: zoom-in;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Modal */
.map-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.map-modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

.map-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

.email-link {
  color: #d63384;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* Modal background */
.email-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* Modal box */
.email-modal-content {
  background: var(--pink-light);
  padding: 25px;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.email-modal-content h4 {
  margin-bottom: 15px;
  text-align: center;
}

/* Close button */
.email-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 26px;
  cursor: pointer;
}

/* label ใช้สีจากตัวแปร */
.email-label {
  color: var(--pinkmain);
  font-weight: 600;
}

/* ปุ่มให้เข้าธีม */
.email-modal-content .btn-primary {
  background-color: var(--pinkmain);
  border-color: var(--pinkmain);
}

.condolences-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/*======= ถวายอาลัย ======= */
/* Overlay */
.condolences-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;                 /* ซ่อนไว้ก่อน */
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

/* เมื่อถูกเปิด */
.condolences-modal.show {
  display: flex;
  animation: fadeInBg 0.5s ease forwards;
}

/* กล่องเนื้อหา */
.condolences-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.9);
  opacity: 0;
  animation: zoomFade 0.6s ease forwards;
}

/* รูป */
.condolences-img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  display: block;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

/* ปุ่มปิด */
.condolences-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Animation */
@keyframes fadeInBg {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomFade {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
