.product-list-section {
padding: 40px 0;
background-color: #fff;
width: 100%;
}

.section-title {
font-size: 28px;
font-weight: 600;
margin-bottom: 30px;
color: #141313;
position: relative;
width: fit-content;
}

.product-layout {
display: flex;
gap: 2rem;
align-items: flex-start;
}

.product-filter {
width: 260px;
flex-shrink: 0;
}

.styled-box {
background: #fff;
border-radius: 12px;
padding: 16px;
box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.filter-section {
margin-bottom: 2rem;
}

.filter-title {
font-size: 16px;
font-weight: 600;
border-bottom: 1px solid #e0e0e0;
padding-bottom: 4px;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
align-items: center;
}

.category-list {
list-style: none;
padding-left: 0;
margin: 0;
border-radius: 10px;
background: #f8f4ef;
box-shadow: 0 2px 8px rgba(0,0,0,0.03);
overflow: hidden;
}

.category-list li {
padding: 6px 0;
cursor: pointer;
font-size: 14px;
color: #333;
}

.category-list li span {
display: block;
}

.filter-section label {
display: block;
margin: 6px 0;
font-size: 14px;
cursor: pointer;
color: #333;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 8px;
  /* Đảm bảo không tràn ra ngoài sidebar */
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.color-btn {
  min-width: 60px;
  max-width: 100px;
  white-space: nowrap;
  background: #eee;
  color: #333;
  font-size: 13px;
  border-radius: 6px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.2s;
}

.color-btn:hover {
  background: #e0e0e0;
}

.product-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 24px;
flex: 1;
}

.product-card {
background-color: #fdf7f3;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
display: flex;
flex-direction: column;
align-items: stretch;
text-align: center;
transition: transform 0.2s ease-in-out;
position: relative;
padding: 18px 12px 16px 12px;
overflow: hidden;
max-height: 490px;
}

.product-image {
    width: 100%;
    aspect-ratio: 7/8; /* hoặc 5/6, 3/4 tuỳ ý */
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}


.product-image img {
width: 90%;
height: 90%;
object-fit: contain;
border-radius: 8px;
background: #fff;
transition: opacity 0.4s cubic-bezier(.4,0,.2,1);
position: absolute;
top: 5%;
left: 5%;
z-index: 1;
box-shadow: none;
display: block;
}

.product-image .main-img {
opacity: 1;
z-index: 1;
}

/* .product-image .hover-img {
opacity: 0;
z-index: 2;
pointer-events: none;
} */

/* .product-card:hover .product-image .hover-img {
opacity: 1;
}

.product-card:hover .product-image .main-img {
opacity: 0;
} */

.discount-label {
position: absolute;
top: 10px;
left: 10px;
background-color: #b65c3d;
color: #fff;
font-size: 13px;
font-weight: bold;
padding: 4px 10px;
border-radius: 6px;
z-index: 3;
line-height: 1;
}

.product-info {
padding: 0;
background: transparent;
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
}

.product-name {
font-size: 15px;
font-weight: 500;
color: #333;
margin: 8px 0 4px 0;
line-height: 1.4;
}

.price {
display: flex;
flex-direction: row;
gap: 8px;
margin-bottom: 8px;
align-items: baseline;
justify-content: center;
}

.price .sale {
font-size: 16px;
font-weight: bold;
color: #e53935;
}

.price .original {
font-size: 14px;
color: #999;
text-decoration: line-through;
}

.short-desc {
font-size: 13px;
color: #666;
margin: 8px 0 12px;
line-height: 1.4;
}

.color-list {
display: flex;
gap: 6px;
justify-content: center;
margin-bottom: 6px;
}

.color-list .color-btn {
width: 24px;
height: 24px;
border-radius: 50%;
border: 1px solid #ccc;
display: inline-block;
}

/* Thêm cuối file product-list.css */
.product-card.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-card.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.icon-actions {
  position: absolute;
  top: 12px;
  right: -50px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: right 0.4s ease;
  z-index: 5;
}

.icon-actions i {
  background: #fff;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.icon-actions i:hover {
  transform: scale(1.2);
}

.product-card:hover .icon-actions {
  right: 12px;
}
/* Thêm vào cuối file product-list.css */

/* Hiệu ứng nút xem chi tiết trượt lên khi hover */
.view-detail-btn {
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s ease;
  background: #b65c3d;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}

.product-card:hover .view-detail-btn {
  transform: translateY(0);
  opacity: 1;
}

.product-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.product-card .view-detail-btn {
  position: relative;
  bottom: 0;
  margin-top: auto;
}

/* Ẩn các phần không cần thiết khi chưa hover */
.short-desc,
.color-list,
.icon-actions,
.view-detail-btn {
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
  pointer-events: none;
}

/* Khi hover: hiện nút và icon */
.product-card:hover .icon-actions,
.product-card:hover .view-detail-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.icon-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}

.icon-actions i {
  background: #fff;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.icon-actions i:hover {
  transform: scale(1.2);
}

.view-detail-btn {
  background: #b65c3d;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  margin-top: auto;
  position: relative;
  z-index: 4;
}

.product-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.category-parent {
  margin-bottom: 2px;
}
.cat-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #a67c52;
  font-weight: 600;
  font-size: 15px;
  user-select: none;
  padding: 2px 0;
}
.cat-name.has-children {
  flex: 1;
}
.cat-arrow {
  font-size: 13px;
  margin-left: 6px;
  transition: transform 0.2s;
}
.category-parent.open .cat-arrow {
  transform: rotate(180deg);
}
.category-children {
  padding-left: 24px;
  margin: 0;
  background: #f9f6f2;
  border-left: 2px dashed #e7d6c7;
  display: none;
  transition: all 0.2s;
}

.category-parent.open > .category-children {
  display: block;
  animation: fadeInDown 0.3s;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px);}
  to { opacity: 1; transform: translateY(0);}
}

.category-children li {
  padding: 7px 0 7px 0;
  font-size: 14px;
  color: #b65c3d;
  transition: background 0.15s, color 0.15s;
  border-radius: 6px;
}

.category-children li a {
  color: #b65c3d;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 5px;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}

.category-children li a:hover {
  background: #f2e5d8;
  color: #a67c52;
  text-decoration: none;
}

/* --- Responsive cho danh sách sản phẩm --- */
@media only screen and (max-width: 1200px) {
  .product-list-section {
    padding: 24px 2vw 0 2vw;
  }
  .container,
  .product-list-section {
    max-width: 100vw;
  }
}

@media only screen and (max-width: 900px) {
  .product-list-section {
    padding: 18px 1vw 0 1vw;
  }
  .container.product-layout,
  .product-layout {
    flex-direction: column;
    gap: 14px;
    padding: 0;
    max-width: 100vw;
  }
  .product-filter {
    width: 100%;
    margin-bottom: 10px;
    min-width: 0;
    max-width: 100%;
    border-radius: 10px;
    padding: 12px 6px;
  }
  .product-list {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media only screen and (max-width: 600px) {
  .product-list-section {
    padding: 10px 0 0 0;
  }
  .container.product-layout,
  .product-layout {
    flex-direction: column;
    gap: 8px;
    padding: 0;
    max-width: 100vw;
  }
  .product-filter {
    width: 100%;
    margin-bottom: 8px;
    min-width: 0;
    max-width: 100%;
    padding: 8px 2px;
    border-radius: 8px;
  }
  .filter-title {
    font-size: 1rem;
    padding-bottom: 2px;
    margin-bottom: 6px;
  }
  .category-list li,
  .category-children li {
    font-size: 0.98rem;
    padding: 4px 0;
  }
  .product-list {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .product-card {
    padding: 7px 2px 7px 2px;
    border-radius: 8px;
    min-width: 0;
    max-width: 100%;
    box-shadow: 0 1px 6px rgba(182,92,61,0.07);
  }
  .product-image {
    border-radius: 7px;
    margin-bottom: 4px;
    min-height: 90px;
    height: 90px;
    max-height: 90px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .product-image img {
    border-radius: 6px;
    max-width: 90%;
    max-height: 90%;
    position: static;
    width: auto;
    height: auto;
  }
  .discount-label {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    top: 4px;
    left: 4px;
  }
  .product-name {
    font-size: 0.97rem;
    margin: 3px 0 1px 0;
    line-height: 1.2;
    min-height: 32px;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .price .sale {
    font-size: 0.98rem;
  }
  .price .original {
    font-size: 0.93rem;
  }
  .short-desc {
    font-size: 0.91rem;
    margin: 3px 0 5px;
  }
  .view-detail-btn {
    font-size: 0.95rem;
    padding: 5px 7px;
    border-radius: 5px;
    margin-top: 3px;
  }
  .icon-actions {
    top: 4px;
    right: 4px;
    gap: 4px;
    flex-direction: row;
    background: none;
    box-shadow: none;
    z-index: 10;
  }
  .icon-actions i {
    font-size: 0.98rem;
    padding: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(182,92,61,0.08);
    transition: background 0.2s, transform 0.2s;
  }
  .icon-actions i:hover {
    background: #f5e7df;
    transform: scale(1.12);
  }
  .pagination {
    margin: 10px 0 10px 0;
    gap: 4px;
  }
  .page-link {
    padding: 4px 7px;
    font-size: 0.95rem;
    border-radius: 5px;
  }
}