.products {
    padding: 2rem 0 1.5rem 0;
}

.section-products-grid {
  max-width: 1000px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0px, 1fr));
  grid-template-rows: repeat(3, 250px);
  gap: 1rem;
  margin: 1rem auto 2rem auto;
}

@media (min-width: 768px) {
  .section-product-card:nth-child(1) {
    grid-column: 1 / 6;
  }
  
  .section-product-card:nth-child(2) {
    grid-column: 2 / 7;
  }
  
  .section-product-card:nth-child(3) {
    grid-column: 3 / 8;
  }
}

.section-product-card  {
  background: transparent;
  border-radius: 20px;
  border: 1px solid var(--text-light);
  position: relative;
  overflow: hidden;
}

.section-product-card img {
  border-radius: 20px;
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.section-product-card-name {
  width: 100%;
  height: 100%;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: end;
  /* background: linear-gradient(0deg, rgb(100, 100, 100) 0%, rgba(172, 157, 159, 0.884) 30%, rgba(247, 132, 141, 0.2) 60%, transparent 100%); */
  /* background: linear-gradient(0deg, rgba(201, 42, 55, 0.9) 0%, rgba(158, 32, 42, 0.5) 20%, rgba(230,0,18, 0.2) 60%, transparent 100%); */
  background: rgba(255, 0, 0, 0.3);
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  transform: scaleY(0%);
  transform-origin: bottom;
  transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
  .section-product-card-name {
    opacity: 1;
    transform: scaleY(100%);
    background: rgba(255, 0, 0, 0.05);
    
    &:hover {
      background: rgba(255, 0, 0, 0.3);
    }
  }
}

.section-product-card-name h4 {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--white);
}

.section-product-card:hover {
  border: 1px solid var(--primary-color);
}

.section-product-card:hover .section-product-card-name {
  transform: scaleY(100%);
  opacity: 1;
}

.section-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #ff4757);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 2;
}

.section-product-card:hover::before {
    transform: scaleX(1);
}

/* Products Page */

.products-hero {
    background-image: url("../../public/images/PruebasEléctricas1.jpg");
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.products-hero-background {
    background: rgba(0, 0, 0, 0.6);
    width: 100%;
    min-height: 60vh;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
}

.all-products {
    padding: 3rem 0px;
}

.products-category-header {
  margin-bottom: 1.5rem;
}

.products-category-header h2 {
  font-size: 2rem;
  border-bottom: 2px solid var(--text-light);
  color: var(--text-dark);
  @media (max-width: 768px) {
    line-height: 2.3rem;
  }
}

.products-category-header p {
  margin-top: 1rem;
  color: var(--text-light);
  @media (min-width: 768px) {
    max-width: 90%;
  }
}

.all-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0px, 1fr));
    margin-top: 1rem;
    margin-bottom: 2rem;
    gap: 1rem;
}

.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: var(--card-border);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px) !important;
    border-color: var(--primary-color);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 10;
    background: linear-gradient(90deg, var(--primary-color), #ff4757);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-actions {
    margin: 1.5rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.unavaliable {
  padding: 0.5rem 2rem;
  background: var(--text-light);
  border-radius: 20px;
  color: white;
}

.product-card .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.product-card:hover .image-overlay {
    opacity: 1;
}

.product-card .overlay-icon {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.8);
    transition: transform 0.4s ease;
}

.product-card:hover .overlay-icon {
    transform: scale(1);
}