/* ===========================================================
   All Products Grid (Based on Featured Products Grid)
   =========================================================== */

/* 1. Container */
.vcs-featured-grid {
	box-sizing: border-box;
	background: transparent;
	display: flex;
  justify-content: flex-start;
  margin-left: 2rem;
}
@media (max-width: 480px) {
  .vcs-featured-grid {
    justify-content: center;
    margin-left: 0;
  }
}

.vcs-featured-grid * {
	box-sizing: border-box;
}

/* Grid structure */
.vcs-featured-grid .vcs-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	max-width:clamp(968px, 75vw, 1440px);
	width:auto;
	gap: 1rem;
	align-items: stretch; /* ensure equal height boxes */
}

@media (min-width: 1920px){
  .vcs-featured-grid .vcs-grid{
    gap: 2rem;
    margin-left: 0;
  }
  
}

/* 2. Product Item */
.vcs-featured-grid .vcs-item {
	display: grid;
	background: #FFFFFFA6;
	border-radius: 15%;
	box-shadow: 0 0 5px #3333334D;
	height: 300px;
	width: 300px;
	max-width: 300px;
	justify-self: center;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	gap: 0;
}

@media (min-width: 1025px) and (max-width: 1600px) {
  .vcs-featured-grid .vcs-item {
    width: 230px;
    height: 230px !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 230px;
    max-height: 230px;
  }
}

/* 3. Thumbnail */
.vcs-featured-grid .vcs-thumb {
	width: 100%;
	/* Enforce thumbnail aspect ratio 1.45:1 (width : height)
	   Use aspect-ratio where supported and a sensible max-height
	   as a graceful fallback for older browsers. Images inside
	   use object-fit: cover to preserve cropping behavior. */
	max-height: 199px; /* prevent extremely tall thumbs on very wide containers */
	overflow: hidden;
	background: transparent;
	position: relative; /* for badge positioning */
  border-radius: 60px;
}

@media (max-width: 1600px) {
  .vcs-featured-grid .vcs-thumb {
    max-height: 100px;
    display: flex;
    justify-content: center;

  }
}

.vcs-featured-grid .vcs-thumb img {
	width: 100%;
	height: 199px;
	object-fit: contain;
	display: block;
}

@media (max-width: 1600px) {
  .vcs-featured-grid .vcs-thumb img {
    height: 100px;
    width: 100px;
  }
}

/* 4. Body (Title + Excerpt + Price) */
.vcs-featured-grid .vcs-body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding-left:2rem;
	padding-right:2rem;
	padding-bottom:0;
}

/* Title — two-line clamp (responsive, max size 1rem) */
.vcs-featured-grid .vcs-title {
	font-family: "Open Sans", sans-serif;
	/* Use clamp to allow fluid scaling but cap the maximum at 1rem */
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--e-global-color-text); /* changed to global Text color */
	margin: 0 0 0.5rem;

	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2; /* standard property for compatibility */
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: normal; /* allows line clamp to work properly */
}

/* Excerpt — two-line clamp */
.vcs-featured-grid .vcs-excerpt {
	font-family: "Open Sans", sans-serif;
	font-size: 1rem;     /* 20px */
	font-weight: 400;
	line-height: 1.875rem;  /* 30px */
	color: var(--e-global-color-text);
	margin: 0 0 0.5rem;

	line-clamp: 2; /* standard property for compatibility */
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Price */
.vcs-featured-grid .vcs-price {
	font-family: "Open Sans", sans-serif;
	font-size: 14px;     
	font-weight: 700;
	line-height: 1rem;  /* 30px */
	color: var(--e-global-color-primary);
	margin: 0;
}

/* Badge */
.vcs-featured-grid .vcs-badge {
	position: absolute;
	top: 25px;
	right: 20px;
	background: var(--e-global-color-accent);
	color: #FFFFFF;
	border-radius: 5px;
	padding: 5px;
	font-family: "Open Sans", sans-serif;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

/* Categories (similar style to price) */
.vcs-featured-grid .vcs-categories {
	font-family: "Open Sans", sans-serif;
	font-size: 14px;     /* 20px */
	font-weight: 700;
	line-height: 1rem;  /* 30px */
	color: var(--e-global-color-primary);
	margin: 0 0 0.25rem;
}

/* 5. CTA (bottom link + arrow icon) */
.vcs-featured-grid .vcs-cta {
	margin-top: auto; /* pushes CTA to bottom */
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 0 2rem 1.5rem;
	gap: 8px;
}

.vcs-featured-grid .vcs-cta a,
.vcs-featured-grid .vcs-cta{
	text-decoration: none;
	font-family: 'Open Sans';
	font-size: 15px;
	font-weight: 700;
	color: var(--e-global-color-accent);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color 0.2s ease, text-decoration 0.2s ease;
}



.vcs-featured-grid .vcs-cta a:hover,
.vcs-featured-grid .vcs-cta:hover{
	text-decoration: underline;
}

.vcs-featured-grid .vcs-cta svg{
	margin-bottom:-2px;
}

/* Pagination */
.vcs-pagination {
  width: 200px;
  height: 48px;
  position: relative;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: start;
  font-family: "Open Sans", sans-serif;
}

@media (max-width: 480px) {
  .vcs-pagination {
    width: 100%;
    box-sizing: border-box;
  }
}

.vcs-pagination__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  height: 48px;
}

.vcs-pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #555555;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.3s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}

.vcs-pagination__link:hover:not(.vcs-pagination__disabled):not(.vcs-pagination__page) {
  opacity: 0.8;
}

/* Hover state for prev/next buttons */
.vcs-pagination__prev:hover:not(.vcs-pagination__disabled),
.vcs-pagination__next:hover:not(.vcs-pagination__disabled) {
  opacity: 0.8;
}

.vcs-pagination__prev:active:not(.vcs-pagination__disabled),
.vcs-pagination__next:active:not(.vcs-pagination__disabled) {
  opacity: 0.6;
  transform: scale(0.95);
}

.vcs-pagination__link.vcs-pagination__disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.vcs-pagination__icon {
  width: 10px;
  height: 19px;
  display: block;
  flex-shrink: 0;
}

.vcs-pagination__page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  padding: 1rem;
  border-radius: 9999px;
  color: #555555;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  line-height: 1;
}

.vcs-pagination__link.vcs-pagination__page {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: transparent;
  transition: all 0.3s ease;
}

/* Hover state for page number links */
.vcs-pagination__link.vcs-pagination__page:hover {
  background-color: rgba(25, 114, 170, 0.1);
  color: #1972AA;
}

/* Active/Current page state */
.vcs-pagination__page.vcs-pagination__current {
  width: 14px;
  background-color: #1972AA;
  color: #ffffff;
  cursor: default;
}

.vcs-pagination__page.vcs-pagination__current:hover {
  background-color: #1972AA;
  color: #ffffff;
}

/* Active state for clicked page */
.vcs-pagination__link.vcs-pagination__page:active {
  background-color: rgba(25, 114, 170, 0.2);
  transform: scale(0.95);
}

/* Position prev button */
.vcs-pagination__prev {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

/* Position next button */
.vcs-pagination__next {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

/* ---------- Responsive: Tablet (iPad) và Phone: 2 columns ---------- */
/* Tablet: 768px — 1024px => 2 columns */
@media (min-width: 768px) and (max-width: 1024px) {
  .vcs-featured-grid .vcs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* giữ thumb max-height phù hợp cho tablet */
  .vcs-featured-grid .vcs-thumb { max-height: 420px; }

  /* đảm bảo item co giãn theo grid */
  .vcs-featured-grid .vcs-item {
    width: 100%;
    height: auto;           /* cho phép nội dung xác định chiều cao */  
  }
}

/* Phones: <= 767px => 2 columns (for larger phones) but stack to 1 column on very small screens */
@media (max-width: 767px) {
  .vcs-featured-grid .vcs-grid {
    /* 2 columns for most phones; change to 1 column below (<=480px) */
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .vcs-featured-grid .vcs-thumb { max-height: 360px; }
  .vcs-featured-grid .vcs-item {
    width: 100%;
    height: auto;
  }
}

/* Very small phones: <= 480px => 2 columns, 150x150 cards */
@media (min-width: 390px) and (max-width: 480px) {
    .vcs-featured-grid .vcs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-items: center; /* giúp card nằm đúng giữa */
	  width:400px;
  }

  .vcs-featured-grid .vcs-item {
      width: 160px;
      height: 160px;
      padding: 0;
      border-radius: 20px;
      overflow: hidden;        
      display: flex;
      flex-direction: column;
  }

    /* Thumbnail 80x80 */
  .vcs-featured-grid .vcs-thumb {
    width: 80px !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    margin: 0 auto;
    border-radius: 10px;
    overflow: visible;
    flex-shrink: 0;
  }

  .vcs-featured-grid .vcs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop đẹp */
  }

  /* Body section */
  .vcs-featured-grid .vcs-body {
    padding-left: 0.75rem !important;
	padding-right: 0.75rem;
    text-align: left;
    flex: 1;
    gap:5px;
  }

  /* Title: 10px */
  .vcs-featured-grid .vcs-title {
    font-size: 10px !important;
	line-height: 12px !important;
	margin: 0 0 3px !important;
	-webkit-line-clamp: 2;
	line-clamp: 2;
  }

  /* Ẩn excerpt vì quá nhỏ để hiển thị */
  .vcs-featured-grid .vcs-excerpt {
    display: none !important;
  }

	.vcs-featured-grid .vcs-categories{
		font-size: 8px !important;
		line-height: 1.3 !important;
		margin: 0 0 2px !important;
	}

  /* Price: 8px */
  .vcs-featured-grid .vcs-price {
    font-size: 8px !important;
	line-height: 1.3 !important;
	margin: 0 !important;
  }

  /* CTA */
  .vcs-featured-grid .vcs-cta {
    font-size: 8px !important;
	padding: 0 0.75rem 0.5rem !important;
	line-height: 1.3 !important;
	margin-top: auto;
  }

  /* Badge */
  .vcs-featured-grid .vcs-badge {
    font-size: 6px !important;
    padding: 3px 5px !important;
    top: 5px !important;
    right: -22px !important;
    border-radius: 4px !important;
  }

}
@media (max-width: 380px) {
  .vcs-featured-grid .vcs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-items: center; /* giúp card nằm đúng giữa */
	width:334px;
  }

  /* Card 150x150 */
.vcs-featured-grid .vcs-item {
    width: 150px;
    height: 150px;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;        
    display: flex;
    flex-direction: column;
}

  /* Thumbnail 80x80 */
  .vcs-featured-grid .vcs-thumb {
    width: 80px !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    margin: 0 auto;
    border-radius: 10px;
    overflow: visible;
    flex-shrink: 0;
  }

  .vcs-featured-grid .vcs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop đẹp */
  }

  /* Body section */
  .vcs-featured-grid .vcs-body {
    padding-left: 0.75rem !important;
	padding-right: 0.75rem;
    text-align: left;
    flex: 1;
  }

  /* Title: 10px */
  .vcs-featured-grid .vcs-title {
    font-size: 10px !important;
	line-height: 12px !important;
	margin: 0 0 3px !important;
	-webkit-line-clamp: 2;
	line-clamp: 2;
  }

  /* Ẩn excerpt vì quá nhỏ để hiển thị */
  .vcs-featured-grid .vcs-excerpt {
    display: none !important;
  }

	.vcs-featured-grid .vcs-categories{
		font-size: 8px !important;
		line-height: 1.3 !important;
		margin: 0 0 2px !important;
	}

  /* Price: 8px */
  .vcs-featured-grid .vcs-price {
    font-size: 8px !important;
	line-height: 1.3 !important;
	margin: 0 !important;
  }

  /* CTA */
  .vcs-featured-grid .vcs-cta {
    font-size: 8px !important;
	padding: 0 0.75rem 0.5rem !important;
	line-height: 1.3 !important;
	margin-top: auto;
  }

  /* Badge */
  .vcs-featured-grid .vcs-badge {
    font-size: 6px !important;
    padding: 3px 5px !important;
    top: 5px !important;
    right: -22px !important;
    border-radius: 4px !important;
  }
}
