/* ฟอนต์ทั้งหมด */
body {
  margin: 0;
  font-family: 'Prompt', sans-serif;
  background:#0d0d19;
  color:white;
}

/* SECTION TITLE */
.section-title {
  text-align:center;
  font-size:32px;
  color:#00aaff;
  margin-top:50px;
  margin-bottom:25px;
}


/* PRODUCT GRID */
.products .grid {
  max-width:1200px;
  margin: auto;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap:25px;
  padding:20px;
}

.item {
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(0,170,255,0.3);
  border-radius:12px;
  padding:15px;
  text-align:center;
  backdrop-filter:blur(8px);
  box-shadow:0 0 15px rgba(0,170,255,0.2);
  transition:0.3s;
}

.item:hover {
  transform:translateY(-5px);
  box-shadow:0 0 20px rgba(0,170,255,0.5);
}

.item img {
  width:100%;
  border-radius:10px;
  margin-bottom:10px;
}

.price {
  font-size:22px;
  margin-bottom:12px;
  color:#00c2ff;
}

.item button {
  background:#00aaff;
  color:white;
  padding:10px 22px;
  border:none;
  border-radius:8px;
  cursor:pointer;
  font-size:18px;
  font-weight:600;
  box-shadow:0 0 10px rgba(0,170,255,0.4);
}

.item button:hover {
  background:#0088d4;
}


/* FOOTER */
.footer {
  text-align:center;
  padding:20px;
  margin-top:50px;
  background:#001524;
  color:#00aaff;
  border-top:1px solid rgba(0,170,255,0.3);
}

.item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 350px; /* ความสูงกล่องปรับได้ */
}

.item img {
  height: 180px;          /* ทำให้รูปสูงเท่ากัน */
  object-fit: contain;    /* ไม่บิดรูป */
  margin-bottom: 10px;
}

.item h3,
.item .price {
  margin: 0;
  padding: 0;
}

.item button {
  margin-top: auto;       /* ดันปุ่มไปล่างสุดเสมอ */
}

/* ============= MOBILE RESPONSIVE ============= */

/* มือถือทั่วไป (ต่ำกว่า 600px) */
@media (max-width: 600px) {

  .section-title {
    font-size: 24px;
    margin-top: 30px;
  }

  .products .grid {
    grid-template-columns: repeat(2, 1fr); /* แสดง 2 คอลัมน์ในมือถือ */
    gap: 15px;
    padding: 10px;
  }

  .item {
    height: 300px; /* ลดความสูงให้เหมาะมือถือ */
    padding: 10px;
  }

  .item img {
    height: 140px; /* รูปขนาดกำลังดีบนมือถือ */
  }

  .price {
    font-size: 18px;
  }

  .item button {
    font-size: 16px;
    padding: 8px 16px;
  }

  .footer {
    font-size: 14px;
    padding: 15px;
  }
}

/* มือถือเล็กมาก (ต่ำกว่า 400px เช่น iPhone SE) */
@media (max-width: 400px) {

  .products .grid {
    grid-template-columns: repeat(1, 1fr); /* 1 คอลัมน์ */
  }

  .item {
    height: auto;  /* ปรับตามรูป */
  }

  .item img {
    height: 160px;
  }

  .item button {
    width: 100%;
    font-size: 16px;
  }
}

/* แท็บเล็ตแนวตั้ง (600–900px) */
@media (min-width: 600px) and (max-width: 900px) {

  .products .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .item {
    height: 330px;
  }

  .item img {
    height: 160px;
  }
}

