* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #e5ead0; 
  color: #333;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 2em;
  background-color: #333;
  color: white;
  max-height: 60px;
}

header a {
  text-decoration: none;
  color: #fff;
}

/*Search Bar Style*/

.search-bar {
  max-width: 400px;
  flex-grow: 1;
  display: flex;
  margin-left: 100px;
}

.search-bar button {
  border-radius: 50px;
  background-color: #e5ead0;
  margin-left: 10px;
}

.search-bar input {
  padding: 10px;
  width: 300px;
  font-size: 1em;
  border: none;
  border-radius: 50px;
  outline: none;
}

.search-bar button:hover {
  background-color: #ffe0cc;
}

/*Responsive Searchbar 18/12/67 */
@media (max-width: 480px) {
  .search-bar {
    max-width: 280px;
    display: flex;
  }

  .search-bar button {
    margin-left: -40px;
  }

  .search-bar input {
    font-size: 10px;
    width: 250px;
  }

  .search-bar button {
    margin-left: -40px;
    margin-right: 10px;
  }
}

/**/

/*Responsive 18/12/67 */

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}
@media (max-width: 768px) {
  .nav-links {
      display: none; /* ซ่อนเมนูในหน้าจอขนาดเล็ก */
  }
  .menu-toggle {
      display: block; /* แสดงปุ่ม Toggle เมนู */
  }
}

@media (max-width: 480px) {
  .logo {
      font-size: 18px; /* ลดขนาดโลโก้ */
  }
  .featured h1 {
      font-size: 16px;
  }
}
img {
  max-width: 100%;
  height: auto;
}

nav {
  position: relative;
}

.menu-toggle {
  display: none;
  background-color: #333;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
}

/*Sale %*/
.discount-badge {
  position:absolute;
  width: 80px;
  background-color: #ff5722;
  color: white;
  padding: 5px 4px;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

.product-image .discount-badge {
  transition: transform 0.3s ease;
}

.discount-badge :hover {
  transform: scale(1.05);
}

/* Con-1*/
.con-1 h2 {
  display: flex;
  margin-top: 20px;
  align-items: center;
  justify-content: center;
  font-size: 2em;
}

/*category*/

.category-list {
  display: flex;
  margin: 0 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 5px;
  margin-top: 10px;
}

.category-list h4 {
  text-align: center;
  max-width: 100%;
  max-height: 80px;
}

.categories a {
  text-align: center;
  color: #333;
  text-decoration: none;
}

.category-list .category {
  background-color: #fff;
  padding: 10px;
  text-align: center;
  border-radius: 20px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.category img {
  max-width: 100%;
  max-height: 80px;
  text-align: center;
}

.category-list:hover {
  transform: scale(1.05);
}

.category:hover {
  transform: scale(1.05);
}

.categories {
  display: flex;
  align-items: center;
  justify-content: center;
}
/*Responsive 17/12/67*/
@media (max-width: 768px) {
  .category {
    flex: 1 1 calc(33.33% - 10px);
  }
}

@media (max-width: 480px) {
  .category {
    flex: 1 1 calc(10% - 10px);
  }

  .category img {
    min-width: 10px;
  }

  .categories .category-list {
    min-width: 10px;
  }

  .categories .category-list .category h4 {
    font-size: 10px;
  }

  .product-card .product-image img {
    width: auto;
    max-height: 250px;
  }

}


/*Product pricing*/
.col .product-pricing {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 15px;
}

.product-pricing .og-price {
  text-decoration: line-through;
  color: #999;
  font-size: 1rem;
  margin-bottom: 10px;
}

.product-pricing .sale-price {
  color: #ff5722;
  font-size: 1.4rem;
  font-weight: bold;
}


/* Video grid section */
.products {
  padding: 30px 20px;
}

.products h2 {
  font-size: 2em;
  margin-bottom: 30px;
  text-align: center;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.product-card .product-image {
  background-color:  #e5ead0;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.product-image img {
  max-width: 100%;
  border-radius: 8px;
  max-height: 250px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.product-image h3 {
  margin-top: 5px;
  font-size: 1.2em;
}

.product-image p {
  margin-bottom: 10px;
  margin-top: 10px;
  font-size: 1.2em;
}

.product-image a {
  color: #333;
  text-decoration: none;
}

.product-image:hover {
  transform: scale(1.05);
}

button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

button:hover {
  background-color: #0056b3;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #333;
  color: white;
}

/* ทำให้ Product Card Responsive */
.products .product-card {
  flex: 1 1 calc(25% - 10px); /* 4 คอลัมน์ */
  margin: 5px;
}

@media (max-width: 1024px) {
  .products .product-card {
      flex: 1 1 calc(33.33% - 10px); /* 3 คอลัมน์ */
  }
}

@media (max-width: 768px) {
  .products .product-card {
      flex: 1 1 calc(50% - 10px); /* 2 คอลัมน์ */
  }
}

@media (max-width: 480px) {
  .products .product-card {
      flex: 1 1 100%; /* 1 คอลัมน์ */
  }
}

/* เมนู Navigation */
.nav-links {
  display: flex;
}

@media (max-width: 768px) {
  .nav-links {
      display: none;
      flex-direction: column;
  }
  .menu-toggle {
      display: block;
  }
}


/* Responsive Design */
@media (max-width: 480px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #333;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
  }

  .nav-links li {
    text-align: center;
    padding: 1rem 0;
  }

  .nav-links.show {
    display: flex;
  }

  .product {
    width: 100%;
    max-width: 300px;
  }

  /*.featured .h1 {
    width: 100%;
  }*/

  

  

}

@media screen and (max-width: 480px) {
  img {
    width: 100%;
  }

  .mySwiper {
    width: 100%;
    height: 35vh;
  }


  .featured .h1 {
    text-align: center;
    font-size: 10px;
    margin-top: 40px;
  }

 
}

/*RESPONSIVE AI FIX
@media (max-width: 768px) {
  .menu-toggle {
      display: block;
  }
  .nav-links {
      display: none;
      flex-direction: column;
      position: absolute;
      background-color: #333;
      top: 60px;
      right: 0;
      width: 100%;
      padding: 1rem;
  }
  .nav-links.show {
      display: flex;
  }
  .nav-links a {
      padding: 10px;
      text-align: center;
      border-bottom: 1px solid #555;
  }
}

@media (max-width: 480px) {
  .mySwiper {
      width: 100%;
      height: auto;
  }
  .featured h1 {
      font-size: 1.2em;
      text-align: center;
  }
}

@media (max-width: 1024px) {
  .products {
      grid-template-columns: repeat(3, 1fr); /* 3 คอลัมน์ */
  }
}
@media (max-width: 768px) {
  .products {
      grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ */
  }
}
@media only screen and (max-width: 480px) {
  .products {
      grid-template-columns: 1fr; /* 1 คอลัมน์ */
  }
}

img {
  max-width: 100%;
  height: auto;
}



/*Responsive 17/12/67*/
/* Menu Toggle */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    background-color: #333;
    width: 100%;
    padding: 1rem;
    z-index: 100;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #555;
  }
}

/**/

/*Responsive 17/12/67*/
@media (max-width: 768px) {
  .search-bar {
    margin: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #333;
    padding: 1rem 0;
    position: absolute;
    top: 60px;
    left: 0;
    z-index: 100;
  }

  .nav-links.show {
    display: flex;
  }
}

/*17/1/68*/
@media (max-width: 480px) {
  .logo {
      font-size: 20px; /* ลดขนาดโลโก้ */
  }
  .seach-bar {
      width: 80px;
  }
  .text {
      width: 40%;
  }
}



