a:link {
  text-decoration: none;
}

/* Container for video and filter side by side */
.video-and-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  margin: 40px 100px;
  gap: 20px;
}

/* Wrap the video in a responsive container to maintain aspect ratio */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1300px; /* default max width */
  aspect-ratio: 16 / 9; /* Maintains 16:9 aspect ratio */
}

/* Style for the video element */
#hls-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  border: 3px solid black;
  box-shadow: 0 7px 35px rgba(0, 0, 0, 0.9);
}

/* Style for the unmute button */
#unmuteBtn {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  font-family: 'Arial', sans-serif;
  letter-spacing: 1px;
}

#unmuteBtn:hover {
  background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

#unmuteBtn:active {
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transform: translateY(0);
}

/* Filter container beside the video */
.filter-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 200px;
}

/* Header (Filter By Category) beside the buttons */
.filter-header {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

/* Buttons layout, wrapping if needed */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

/* Responsive adjustments for larger screens */
@media (min-width: 900px) {
  .video-and-filter {
    flex-direction: row;
  }
  .filter-container {
    flex: 1;
    min-width: 200px;
  }
}

/* Make video larger on larger screens */
@media (min-width: 600px) {
  .video-wrapper {
    max-width: 700px; /* larger size for bigger screens */
  }
}

/* Container for video and category buttons side by side */
.video-and-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin: 20px 100px;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  margin-top: 20px;
}

/* Layout container for video and filters */
.video-container {
  display: flex;
  flex-direction: column;
  margin: 20px 100px;
  width: auto;
}

/* Wrapper for the video player */
.player-wrapper {
  width: 600px; /* default size */
  height: 338px;
  justify-content: center;
}

/* Container for video and filters side by side */
.video-and-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

/* Filters container - below or beside based on screen size */
.filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  min-width: 200px;
}

/* Responsive Breakpoints */

/* 1024px - Large screens, ensure large video */
@media (max-width: 1024px) {
  .video-wrapper {
    max-width: 100%;
  }
  /* Optional: make video bigger if needed */
  #hls-video {
    /* e.g., increase size or max-width if necessary */
  }
}

/* 768px - Tablets and smaller desktops */
@media (max-width: 768px) {
  .video-and-filter {
    flex-direction: column;
    margin: 30px;
  }
  .video-wrapper {
    max-width: 768px; /* almost full width */
    aspect-ratio: 16 / 9; /* maintain ratio */
  }
  /* To make video bigger, increase max-width or set explicit width */
  #hls-video {
    /* e.g., set width: 100%; height: auto; */
  }
}

/* 480px - Mobile phones */
@media (max-width: 480px) {
  .video-and-filter {
    flex-direction: column;
    margin: 30px;
  }
  .video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  #hls-video {
    width: 100%; /* ensure full width for mobile */
    height: auto;
  }
}

/* 360px - Smallest screens */
@media (max-width: 360px) {
  /* Similar to 480px, possibly tweak further if needed */
  .video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  #hls-video {
    width: 100%;
  }
}

/* How to move or make the video bigger if needed: */
/* - To move the video, adjust margin or padding in .video-wrapper or #hls-video */
/* - To make the video bigger: increase max-width in .video-wrapper or set explicit width for #hls-video */
/* Example: */
/* .video-wrapper { max-width: 1200px; } */
/* #hls-video { width: 100%; } */


@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Product grid styles for 4 items per row */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.product-card {
  width: calc(25% - 20px); /* Base width for 4 per row */
  min-width: 320px; /* Ensures room for 400px media + padding */
  max-width: 320px; /* Prevents excessive width */
  text-align: center;
  border: 1px solid #ddd;
  padding: 10px;
  box-sizing: border-box;
  flex: 1 1 auto; /* Flexible sizing */
}

.product-media {
  width: 300px;
  height: 350px;
  object-fit: cover; /* Auto-resizes and crops larger media to fit */
  object-position: center; /* Centers the media */
  max-width: 100%;
  max-height: 100%;
  display: block; /* Ensures proper display */
}

@media (max-width: 768px) {
  .product-card {
    width: calc(50% - 20px); /* 2 items per row on tablets */
    min-width: 320px;
  }
}

@media (max-width: 480px) {
  .product-card {
    width: 100%; /* 1 item per row on mobile */
    min-width: unset;
  }
  .product-media {
    width: 100%; /* Scale to card width on mobile */
    height: auto; /* Maintain aspect ratio */
  }
}


/* ===== PRODUCT GRID: 4 across ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* Exactly 4 cards per row */
  gap: 20px;
  justify-items: center; /* Center cards in each column */
}

/* Card should fill its grid cell, with room for 300px media + padding */
.product-card {
  width: 100%;
  max-width: 320px; /* Keeps cards reasonable (300px media + 20px padding/gap) */
  box-sizing: border-box;
  text-align: center;
  border: 1px solid #ddd;
  padding: 10px;
}

/* FORCE correct media box: Exactly 300px wide x 350px tall; auto-adjust oversized/undersized with cropping */
.product-card img.product-media,
.product-card video.product-media {
  width: 300px !important; /* Fixed width */
  height: 350px !important; /* Fixed height */
  object-fit: cover !important; /* Auto-resizes and crops to fit exactly 300x350 */
  object-position: center !important; /* Centers the media */
  display: block !important;
  margin: 0 auto;
}

/* Responsive fallbacks (reduce columns and adjust card size on smaller screens) */
@media (max-width: 1400px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* 3 per row */
  .product-card { max-width: 320px; } /* Maintain card size */
}
@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 2 per row */
  .product-card { max-width: 320px; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; } /* 1 per row on mobile */
  .product-card { max-width: 100%; } /* Full width */
  .product-card img.product-media,
  .product-card video.product-media {
    width: 100% !important; /* Scale to card width */
    height: auto !important; /* Maintain aspect ratio (350px height will adjust proportionally) */
  }
}