body {
  font-family: Phetsarath OT;
  margin: 20px;
  background-color: #6ae966;
}

h1 {
  text-align: center;
  color: #333;
}

.controls {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"], select {
  font-family: Phetsarath OT;
  padding: 8px;
  font-size: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
}

.product-card img {
  max-width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.product-name {
  font-weight: bold;
  margin-top: 10px;
}

.price {
  color: green;
  margin-top: 5px;
}

.btn-detail {
  font-family: Phetsarath OT;
  margin-top: 10px;
  padding: 8px 12px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* ปุ่มโซเชียล */
.btn-social {
  background-color:#0084FF;
  color:white;
  padding:10px 20px;
  border:none;
  border-radius:5px;
  cursor:pointer;
}

/* --------- Modal ---------- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  border: none;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
}

.prev { left: 10px; }
.next { right: 10px; }

/* -------- Dropdown -------- */
.dropdown {
  font-family: Phetsarath OT;
  position: relative;
  display: inline-block;
}

.dropbtn {
  background-color: white;
  border: 1px solid #ccc;
  padding: 8px 12px;
  font-family: Phetsarath OT;
  font-size: 16px;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 220px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
  border-radius: 8px;
  z-index: 999;
}

.menu-item {
  font-family: Phetsarath OT;
  padding: 10px;
  cursor: pointer;
  position: relative;
}

.menu-item:hover {
  background-color: #f1f1f1;
}

/* Submenu */
.has-submenu:hover .submenu {
  display: block;

  font-family: Phetsarath OT;
}

.submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: white;
  min-width: 180px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
  border-radius: 8px;
}

.submenu div {
  padding: 10px;
  cursor: pointer;
}

.submenu div:hover {
  background-color: #f1f1f1;
}

/* แสดง dropdown เมื่อ hover dropdown ปุ่มหลัก */
.dropdown:hover .dropdown-content {
  display: block;
}
