/* Woo Products Custom CSS */

.wpc-view-toggle {
  margin-bottom: 15px;
  text-align: left;
}
.wpc-toggle-btn {
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 10px;
  margin-left: 10px;
  cursor: pointer;
  color: #111;
  border-radius: 2px;
}
.wpc-toggle-btn.active {
  background-color: #fff;
  border-color: #111;
  color: #111;
}
button.wpc-toggle-btn:hover {
   background-color: #fff;
   border-color: #111;
   color: #111;
}
/* ===== Overlay: ẩn mặc định, hiện khi hover/focus ===== */
.wpc-thumb {
  position: relative;
  overflow: hidden;
}

/* Overlay full-cover */
.wpc-thumb .wpc-overlay {
  position: absolute;
  inset: 0;                  /* top:0; right:0; bottom:0; left:0; */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 50;               /* đảm bảo nằm trên ảnh và các phần tử khác */
}

/* Khi hover (desktop) hoặc có focus-within (keyboard/tap) -> hiện overlay */
.wpc-thumb:hover .wpc-overlay,
.wpc-thumb:focus-within .wpc-overlay,
.wpc-thumb.wpc-overlay-visible .wpc-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;      /* bật pointer khi hiển thị để link có thể click */
}

/* Nút link trong overlay */
.wpc-view-link {
  background: #ffffff;
  color: #111111;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  z-index: 60;
}

/* hover effect cho nút */
.wpc-view-link:hover {
  background: #13316b;
  color: #fff;
}
.wpc-overlay span {
  padding: 5px 8px;
  border: 1px solid #333;
  border-radius: 20px;
  background: #13316b;
  font-size: 13px;
}
.wpc-thumb-link {
  display: block;
  position: relative;
}

.wpc-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.wpc-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
}

.wpc-thumb-link:hover .wpc-overlay {
  opacity: 1;
}

/* GRID view */
/* Rule mặc định: auto responsive */
.wpc-products-wrap.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

/* Fix số cột cụ thể theo shortcode */
.wpc-products-wrap.grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.wpc-products-wrap.grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.wpc-products-wrap.grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.wpc-products-wrap.grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.wpc-products-wrap.grid.columns-6 { grid-template-columns: repeat(6, 1fr); }
.wpc-products-wrap.grid .wpc-product-item {
  border: 1px solid #eee;
  padding: 10px;
  text-align: center;
}
.wpc-products-wrap.grid .wpc-info {
	margin-bottom: 10px;
}
.wpc-products-wrap.grid.columns-6 h4.wpc-title a {
	font-size: 12px;
    font-weight: 400;
}
/* LIST view */
.wpc-products-wrap.list {
  display: block !important;
}

.wpc-products-wrap.list .wpc-product-item {
  display: flex;
  align-items: flex-start; /* canh trên thay vì giữa */
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}
.wpc-products-wrap.list .wpc-info {
   flex: 1;
   order: 2;
   text-align: left;
}
.wpc-products-wrap.list .wpc-thumb {
  order: 1;
  flex: 0 0 252px; /* ảnh nhỏ hơn một chút để có chỗ cho text */
  margin-right: 20px;
}

.wpc-products-wrap.list .wpc-title {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 600;
}

.wpc-products-wrap.list .wpc-price {
  font-size: 16px;
  color: #fff;
  font-weight: 500;
}

.wpc-products-wrap h4.wpc-title a {
    color: #333;
    text-transform: uppercase;
    font-size: 14px;
	margin: 0 0 8px;
    font-weight: 600;
}
.wpc-pagination {
    margin-top: 20px;
    text-align: right;
}
.wpc-products-wrap h4.wpc-title a:hover {
	color: #13316b;
}
/* wpc-pagination */
.wpc-pagination a,
.wpc-pagination span {
    display: inline-block;
    margin: 5px;
    padding: 5px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 2px;
	min-width: 2.5rem;
	text-align: center;
    transition: all 0.2s ease;
}
.wpc-pagination a:hover {
    background: #13316b;
    color: #fff;
}
.wpc-pagination .current {
    background: #13316b;
    color: #fff;
    border-color: #111;
}
@media only screen and (min-width: 768px) and (max-width: 1024px) {
	.wpc-categories-menu ul.wpc-cat-list {
		font-size: 12px;
	}
	.wpc-categories-menu .wpc-cat-header {
    	font-size: 12px;
    	padding: 20px 8px;
	}
}
/* ✅ Responsive cho mobile */
@media (max-width: 768px) {
  .wpc-products-wrap.grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .wpc-products-wrap.list .wpc-product-item {
    flex-direction: column;   /* stack dọc */
    align-items: flex-start;  /* căn trái */
  }

  .wpc-products-wrap.list .wpc-thumb {
    flex: 0 0 auto;
    margin: 0 0 10px 0;  /* cách dưới 10px */
    width: 100%;         /* ảnh full chiều ngang */
    max-width: 300px;    /* hoặc giữ max-width nếu muốn */
  }

  .wpc-products-wrap.list .wpc-info {
    order: 2;
    width: 100%;
    text-align: center;
  }
}
/* MENU */
.wpc-categories-menu {
  background: #2c2c2c;
  color: #fff;
  font-family: Arial, sans-serif;
}

.wpc-cat-header {
  background: #13316b;
  font-size: 14px;
  padding: 10px 10px;
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wpc-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wpc-cat-item {
  border-bottom: 1px solid #444;
}

.wpc-cat-item > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #eee;
  text-decoration: none;
  padding: 12px 15px;
  transition: background 0.3s;
}

.wpc-cat-item > a:hover {
  background: #444;
  color: #fff;
}

.wpc-cat-item.has-children > ul {
  display: none; /* Ẩn menu con mặc định */
  background: #2c2c2c;
}
/* Menu cha có position relative */
.wpc-cat-item.has-children {
    position: relative;
}
.wpc-cat-list .wpc-cat-item.active {
  background: #444;
  color: #fff;
}
/* Menu con hiện bên phải */
.wpc-cat-item.has-children > .sub-menu {
    position: absolute;
    top: 0;          /* Canh theo trên của menu cha */
    left: 90%;      /* Nằm bên phải menu cha */
    list-style: none;
    display: none;   /* Mặc định ẩn */
    z-index: 999;    /* Đảm bảo menu hiển thị trên các phần khác */
    min-width: 200px; /* Tùy chỉnh độ rộng */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); /* Optional */
}

/* Hiệu ứng hover bằng jQuery hoặc CSS */
.wpc-cat-item.has-children:hover > .sub-menu {
    display: block;
}
.wpc-cat-item.open > ul {
  display: block; /* Hiện khi open */
}

.wpc-cat-arrow {
  font-size: 12px;
  opacity: 0.7;
  cursor: pointer;
}
.wpc-cat-arrow i.fa.fa-angle-right,
.wpc-cat-arrow i.fa-angle-down{
    font-size: 18px;
    font-weight: 800;
}
/* Reset text align */
.wpc-cat-item a {
  display: flex;
  align-items: center;
  justify-content: space-between; /* text left + arrow right */
  text-decoration: none;
}

/* Icon bên trái (angle-double-right) */
.wpc-cat-item a i.fa-angle-double-right,
.wpc-cat-item a i.fa-list-alt{
  margin-right: 8px;
  color: #b34a4a;
}

/* Text category */
.wpc-cat-item .wpc-cat-name {
  flex: 1; /* đẩy arrow sang phải */
  text-align: left;
}

/* Icon mũi tên con (ở bên phải) */
.wpc-cat-item .wpc-cat-arrow {
  margin-left: auto;
}

.wpc-menu .sub-menu {
  display: none;
  padding-left: 15px;
}

.wpc-menu li.open > a {
  font-weight: bold;
}

.wpc-menu-toggle {
  float: right;
  cursor: pointer;
  font-size: 14px;
}


