/* ===== Wrapper Layout ===== */
.wcps-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 !important;
}

/* ===== Sidebar (Category) ===== */
.wcps-sidebar {
  width: 20%;
  max-width: 200px !important;
  border-right: 1px solid #ddd;
  border-left: 1px solid #ddd;
  height: 960px;
  overflow-y: scroll;
  overflow-x: hidden;

  /* Optional: smooth scroll */
  scroll-behavior: smooth;
}

/* Scrollbar Styling for WebKit (Chrome, Edge, Safari) */
.wcps-sidebar::-webkit-scrollbar {
  width: 8px; /* width of scrollbar */
}

.wcps-sidebar::-webkit-scrollbar-track {
  background: transparent; /* track background transparent */
}

.wcps-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.5); /* black with 50% opacity */
  border-radius: 4px;
}

/* Firefox support */
.wcps-sidebar {
  scrollbar-color: rgba(0, 0, 0, 0.5) transparent;
  scrollbar-width: thin;
}
/* end sidebar */

/* Header for Category List */
.wcps-cat-header {  
  min-width: 200px;
  min-height: 45px;
  padding: 0; 
}


/* --- List Style (Desktop) --- */
.wcps-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wcps-cat-list li {
  margin: 0;
  border-bottom: 1px solid #cccccce3 !important;  
}

.wcps-cat-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #ffffff !important; /* สี */
  transition: color 0.3s ease, background-color 0.3s ease;
}

.wcps-cat-item:hover,
.wcps-cat-item.active {
  color: #f8d407 !important; 
  background-color: #1a1a1a !important;  
}
 
.wcps-short-description {
  font-size: 14px;
  color: #ffffff !important;
  margin: 10px 0;
  text-align: center !important;
  padding-left:10px;
  padding-right:10px;
}

/* ราคาที่ลด */
.wcps-regular-price {
  font-size: 16px;
  color: #ffffff !important;
  text-align: center;
  font-weight: bold;
}

/* --- Dropdown (Mobile) --- */
.wcps-category-select {
  display: none;
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 16px;
}

/* ===== Product Area ===== */
.wcps-products {
  width: 79%; 

}

/* ===== Product Grid desktop ===== */
.wcps-product-grid {
  list-style: none;  
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ตลอด */
  /* grid-template-columns: repeat(auto-fill, minmax(370px, 1fr)); */
  gap: 1px;
  padding: 0;
  padding-bottom: 30px;
  margin: 0;
  margin-top: 0;
}

/* การ์ดสินค้า */
.wcps-product-item {
    padding: 0 !important;
    width: 100%;
    max-width: 450px; /* ขนาดการ์ดแต่ละใบ */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #3699D3 0%, #212565 100%) !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 350px; /* ความสูงของแต่ละการ์ดให้เท่ากัน */
    overflow: hidden;
}

 

/* รูปสินค้า */
.wcps-product-item img {
    width: 100%;
    height: 290px !important;
    object-fit: cover;
    margin-bottom: 10px;
}


.wcps-product-item:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

 

/* ===== Product Info ===== */
.wcps-product-item h4 {
  font-size: 18px;
  text-align: center;
  margin: 10px 0 5px;
  padding: 0 20px;
  color: #ffffff;
  font-style: italic;
}

.wcps-product-item p {
  margin: 0;
  color: #666666;
  font-weight: bold;
  text-align: center;
}

/* ===== Price Filter ===== */
.wcps-price-filter {
  display:none; /*temp hide*/
  margin-bottom: 15px;
}

.wcps-price-filter input {
  width: 100px;
  padding: 5px;
  margin-right: 5px;
}

.wcps-price-filter button {
  padding: 6px 12px;
  background-color: #0073aa;
  color: white;
  border: none;
  cursor: pointer;
}

/* ===== Pagination ===== */
.wcps-pagination {
  margin-top: 20px;
  text-align: center;
}

.wcps-pagination a {
  margin: 0 5px;
  text-decoration: none;
  color: #0073aa;
}

.wcps-pagination a:hover {
  text-decoration: underline;
}



.wcps-no-products {
  color: #ffcc00 !important;
  font-style: italic;
  text-align: center;
  padding: 20px;
}



/* price style*/
.wcps-product-price {
    background-color: none;  
    border: 2px solid #9098AD !important;
    border-radius: 20px !important;
    padding: 2px 16px 2px 16px;
    display: inline-block;
    color: #ecf0f3 !important;           
    font-weight: bold;
    text-align: center; 
    margin-top: 10px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.wcps-price-link {
    text-decoration: none;
    margin-bottom: 20px;
    text-align: center;
}

.wcps-price-link:hover .wcps-product-price {
    background-color: #d6ecff; /* สีพื้นเมื่อ hover */
    border-color: #1c86ee;     /* สีขอบเมื่อ hover */
    color: #003366 !important;
}
/*end price style*/

.wcps-loading {
  color: #ffc107;
  text-align: center;
  font-weight: bold;
  padding: 20px;
  font-size: 16px;
}

.loading-icon {
  margin-right: 8px;
  animation: spin 1.2s linear infinite;
  display: inline-block;
}

/* Optional: อนิเมชันหมุน */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/* ===== Responsive (Mobile) ===== */
@media (max-width: 768px) {
   
  .wcps-cat-list {
    display: none; /* ซ่อน ul li */
  }


 

	/* ===== Product Grid mobile ===== */

 .wcps-product-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* บังคับ 2 คอลัมน์บนมือถือ */
    }
	
.wcps-product-item {
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
}

.wcps-product-item img {
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 10; /* หรือ 1.55 */
    object-fit: cover;
}

.wcps-short-description { 
  padding-left:10px;
  padding-right:10px;
}
  .wcps-category-select {
    display: block; /* แสดง dropdown */
	background-color:#E8F2FF;
	margin-top:20px;
    padding-left:10px;
    padding-right:10px;
  }

  .wcps-products {
    width: 100%;
    padding:10px;
  }

  .wcps-wrapper {
    flex-direction: column;
    padding: 5px;;
  }

.wcps-sidebar {
    width: 100% !important;   /* เต็มความกว้างมือถือ */
    max-width: 100% !important;
    height: auto;             /* ปรับความสูงตามเนื้อหา หรือกำหนดใหม่ */
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #ddd; /* เส้นล่างแทน */
  }


}