/* select.css */

body {
  background-color: #f8f9fa;
  margin: 0;
  font-family: 'DM Sans', sans-serif;
}

/* Adjust header for white background */
.header.dark-bg {
  background: #ffffff;
  color: #111;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.header.dark-bg .logo {
  color: #111;
}

.header.dark-bg svg {
  stroke: #111;
}

/* Main Container */
.select-container {
  max-width: 1200px;
  margin: 140px auto 40px;
  padding: 0 20px;
  text-align: center;
}

.select-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1c2331;
  margin-bottom: 40px;
  line-height: 1.4; /* เพิ่มความสูงบรรทัดป้องกันขอบตัด */
  padding-top: 10px; /* เพิ่มพื้นที่ด้านบนตัวอักษร */
}

/* Grid Layout */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  justify-items: center;
}

/* Card Styling */
.category-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background: #000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Image Wrapper */
.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.85; /* Darken slightly so text pops */
}

.category-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

/* Price Tag */
.price-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #ff99cc; /* Pink from reference */
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* Content Area (Text Overlay) */
.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  text-align: center;
  z-index: 2;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-desc {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .select-container {
    margin-top: 160px; /* เพิ่มระยะจาก Header ให้มากขึ้น */
  }
  
  .category-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .card-image-wrapper {
    height: 220px;
  }
}
