/* Google Fonts - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");
/* Google Fonts - Nunito */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Remove the font-family declaration here to avoid overriding navbar fonts */
}

body {
  background: black;
  font-size: 62.5%;
  overflow-x: hidden;
  font-family: "Poppins", "Nunito", sans-serif; /* Move font-family here */
  position: relative; /* Add this */
}

/* Add these new styles for particle.js canvas */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.container {
  max-width: 1800px;
  margin: 0 auto; /* Remove top margin */
  padding: 1rem 2rem; /* Reduce top padding */
  padding-bottom: 100px;
  position: relative; /* Add this */
  z-index: 1; /* Add this */
}

/* Search and filter styles */
.search-filter-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px;
  background-color: rgba(30, 30, 30, 0.9);
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 60px;
  position: relative;
  z-index: 2;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: rgba(50, 50, 50, 0.8);
  border-radius: 25px;
  padding: 10px 20px;
  margin-bottom: 15px; /* Add space between search box and filters */
  position: relative;
}

.search-box i {
  position: absolute; /* Add this */
  left: 15px; /* Add this */
  color: #fff; /* Add this */
  font-size: 18px; /* Add this */
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  color: #fff;
  padding-left: 30px; /* Add this */
}

.filter-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.filter-box select {
  width: 100%;
  padding: 13px 35px 13px 23px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  background-color: rgba(50, 50, 50, 0.8);
  color: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px top 50%;
  background-size: 12px auto;
}

.filter-box select::-ms-expand {
  display: none; /* Remove default arrow in Internet Explorer */
}

/* Style the options */
.filter-box select option {
  background-color: rgba(50, 50, 50, 0.9);
  color: #fff;
}

/* Hover effect for select */
.filter-box select:hover {
  background-color: rgba(70, 70, 70, 0.8);
}

/* Focus effect for select */
.filter-box select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.filter-box button {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  background-color: rgba(50, 50, 50, 0.8);
  color: #fff;
  cursor: pointer;
}


.links-container{
  font-size: 1.2rem;
}

/* Product card styles */
.wrapper {
  width: 320px; /* Increased from 300px */
  height: 500px; /* Increased from 480px to accommodate larger text */
  background: white;
  margin: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.wrapper .container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.wrapper .container .top {
  flex-grow: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: transparent; /* Changed from #f0f0f0 to transparent */
  padding: 0;
  overflow: hidden;
}

.wrapper .container .top img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin-top: 50px; /* Changed from -40px to -10px to pull the image down by 30px */
}

.wrapper .container .bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f4f4f4;
  display: flex;
  flex-direction: column;
  padding: 0;
  height: auto;
}

.wrapper .container .bottom .left {
  flex-grow: 1;
  padding: 15px 20px; /* Adjusted padding */
  height: auto; /* Changed from fixed height to auto */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wrapper .container .bottom .left h1 {
  font-size: 22px; /* Restore to original larger size */
  font-weight: bold;
  color: #4a4a4a;
  margin-bottom: 8px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrapper .container .bottom .left p {
  font-size: 22px; /* Reverted from 16px to 22px */
  font-weight: bold;
  color: #4a4a4a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.wrapper .container .bottom .left p::before {
  content: '₱';
  margin-right: 2px;
}

.wrapper .container .bottom .left .price-stock {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 1.4em; /* Increased from 1.2em or whatever it was before */
}

.wrapper .container .bottom .left .price,
.wrapper .container .bottom .left .stock {
  font-size: 1.2em; /* This will now be relative to the parent's 1.4em */
  color: #888;
  font-weight: normal;
}

.wrapper .container .bottom .left .price {
  display: flex;
  align-items: center;
}

.wrapper .container .bottom .actions {
  display: flex;
  justify-content: center;
  margin-top: auto;
  width: 100%;
}

.wrapper .container .bottom .cart,
.wrapper .container .bottom .wishlist {
  width: 50%; /* Make each button take up half the width */
  height: 50px; /* Increased from 40px */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #f1f1f1;
  transition: background-color 0.3s ease;
  border: none;
  border-radius: 0; /* Remove border-radius */
  font-size: 18px; /* Reverted from 16px to 18px */
}

.wrapper .container .bottom .cart {
  border-right: 1px solid #ddd; /* Add a separator between buttons */
}

.wrapper .container .bottom .cart:hover,
.wrapper .container .bottom .wishlist:hover {
  background-color: #cacaca; /* Changed from #e0e0e0 to #0f1016 */
  color: #ffffff; /* Add this line to change text color to white for better contrast */
}

.wrapper .container .bottom .cart i,
.wrapper .container .bottom .wishlist i {
  margin-right: 8px;
  font-size: 18px; /* Reverted from 20px to 18px */
}

.wrapper .inside {
  z-index: 9;
  background: rgba(0, 0, 0, 0.85);
  width: 140px;
  height: 140px;
  position: absolute;
  top: -70px;
  right: -70px;
  border-radius: 0px 0px 200px 200px;
  transition: all 0.5s, border-radius 2s, top 1s;
  overflow: hidden;
}

.wrapper .inside:hover {
  width: 100%;
  right: 0;
  top: 0;
  border-radius: 0;
  height: 100%;
}

.wrapper .inside::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  transition: all 0.5s;
}

.wrapper .inside:hover::before {
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
}

.wrapper .inside .icon {
  position: absolute;
  right: 85px;
  top: 80px !important;
  color: white;
  opacity: 1;
  transition: opacity 0.3s;
  font-size: 24px;
}

.wrapper .inside:hover .icon {
  opacity: 0;
}

.wrapper .inside .contents {
  padding: 10%;
  opacity: 0;
  transform: scale(0.5);
  transform: translateY(-200%);
  transition: opacity 0.2s, transform 0.8s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wrapper .inside:hover .contents {
  opacity: 1;
  transform: scale(1);
  transform: translateY(0);
}

.wrapper .inside .contents .description-section {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 15px;
}

.wrapper .inside .contents h1 {
  font-size: 1.89em; /* Increased from 1.8em (5% increase) */
  margin-bottom: 15px;
  color: white;
  font-weight: bold;
}

.wrapper .inside .contents p {
  font-size: 1.26em; /* Increased from 1.2em (5% increase) */
  margin-bottom: 20px;
  color: white;
  line-height: 1.6;
}

.wrapper .inside .contents table {
  text-align: left;
  width: 100%;
  font-size: 1.26em; /* Increased from 1.2em (5% increase) */
  color: white;
}

.wrapper .inside .contents table th,
.wrapper .inside .contents table td {
  padding: 8px 0;
}

.wrapper .inside .contents table th {
  font-weight: bold;
  width: 30%;
}

/* Remove the stock row from the table */
.wrapper .inside .contents table tr:nth-child(2) {
  display: none;
}

.wrapper .inside .contents .fa-star {
  color: gold;
  font-size: 1.26em; /* Increased from 1.2em (5% increase) */
}

.wrapper .inside .contents .review-section {
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 15px;
}

.reviews-container {
  max-height: 120px;
  overflow-y: auto;
}

/* Add a scrollbar style for webkit browsers */
.description-section::-webkit-scrollbar,
.reviews-container::-webkit-scrollbar {
  width: 5px;
}

.description-section::-webkit-scrollbar-thumb,
.reviews-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

.description-section::-webkit-scrollbar-track,
.reviews-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

/* Adjust the layout for better readability on smaller screens */
@media (max-width: 768px) {
  .wrapper .inside .contents h1 {
    font-size: 1.68em; /* Increased from 1.6em (5% increase) */
  }

  .wrapper .inside .contents p,
  .wrapper .inside .contents table {
    font-size: 1.155em; /* Increased from 1.1em (5% increase) */
  }
}

/* Pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  margin-bottom: 50px;
}

.pagination .page-link {
  color: #fff;
  background-color: rgba(50, 50, 50, 0.8);
  border: 1px solid #444;
  padding: 8px 16px;
  margin: 0 3px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.pagination .page-link:hover,
.pagination .page-link.active {
  background-color: #007bff;
  border-color: #007bff;
}

.pagination .page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive styles */
@media (max-width: 768px) {
  .pagination {
    flex-wrap: wrap;
  }
  
  .pagination .page-link {
    margin: 3px;
    padding: 6px 12px;
    font-size: 12px;
    min-width: 30px;
  }
}

/* Products container */
.container .products-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px; /* Add margin-top to separate from search bar */
}

#no-results {
  display: none; 
  text-align: center;
  font-size: 32px;
  padding: 20px;
  color: white;
  padding-top: 18%;
  padding-bottom: 16% !important;
  margin-top: 30px;
}

/* Add this at the end of the file to ensure products page specific styles take precedence */
.products-page .wrapper,
.products-page .pagination,
.products-page #no-results {
  font-family: "Poppins", "Nunito", sans-serif;
}

/* Ensure product cards don't inherit navbar styles */
.products-page .wrapper a,
.products-page .wrapper button {
  all: unset; /* Reset all properties */
  cursor: pointer;
}

/* Re-apply necessary styles for product card links and buttons */
.products-page .wrapper .container .bottom .cart,
.products-page .wrapper .container .bottom .wishlist {
  width: 50%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f1f1;
  transition: background-color 0.3s ease;
  border: none;
}

/* Ensure pagination links don't inherit navbar styles */
.products-page .pagination .page-link {
  all: unset; /* Reset all properties */
  cursor: pointer;
  color: #fff;
  background-color: rgba(50, 50, 50, 0.8);
  border: 1px solid #444;
  padding: 8px 16px;
  margin: 0 5px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Adjust media queries if necessary */
@media (max-width: 768px) {
  .search-filter-container {
    margin-top: 60px; /* Increase top margin for mobile to account for navbar */
  }
  /* Existing media query styles... */
}

/* Ensure no conflicts with navbar on mobile */
@media (max-width: 450px) {
  .products-page .container {
    margin-top: 80px; /* Increase top margin for mobile to account for navbar */
  }
}

/* Specific styles for product page buttons */
.products-page .wrapper .container .bottom .cart,
.products-page .wrapper .container .bottom .wishlist {
  font-size: 18px; /* Reverted from 16px to 18px */
}

.products-page .wrapper .container .bottom .cart i,
.products-page .wrapper .container .bottom .wishlist i {
  font-size: 18px; /* Reverted from 20px to 18px */
}

.review-section {
  margin-top: 20px;
  color: white;
  font-size: 1.05em; /* Added 5% increase to base font size */
}

.review-section h4 {
  font-size: 1.8em; /* Increased size for "Reviews" heading */
  margin-bottom: 15px; /* Add some space below the heading */
}

.reviews-container {
  max-height: 200px; /* Increased from 150px to 200px */
  overflow-y: auto; /* Changed from overflow: hidden to allow scrolling */
  padding-right: 10px; /* Add some padding for the scrollbar */
}

.review {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.reviewer-name {
  font-weight: bold;
  font-size: 1.05em; /* Added 5% increase */
}

.review-date {
  font-size: 0.84em; /* Increased from 0.8em (5% increase) */
  color: #ccc;
}

.stars {
  font-size: 0.945em; /* Increased from 0.9em (5% increase) */
}

.review-text {
  font-size: 0.945em; /* Increased from 0.9em (5% increase) */
  margin-top: 5px;
}

.section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 15px 0;
}

/* Updated styles for review navigation */
.review-nav {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.review-nav button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.2em;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin: 0 5px;
}

.review-nav button:hover {
  background: rgba(255, 255, 255, 0.4);
}

.full-description {
  max-height: 120px; /* Reduced from 150px to 120px to give more space to reviews */
  overflow-y: auto;
  padding-right: 10px;
  margin-bottom: 10px;
}

.full-description::-webkit-scrollbar {
  width: 5px;
}

.full-description::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.full-description::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

.full-description::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Add a media query for mobile devices and up */
@media (min-width: 320px) {
  .filter-box select {
    padding: 13px 35px 13px 23px; /* Increased padding by 3px on all sides */
  }
}

/* Media query for larger screens */
@media (min-width: 768px) {
  .search-filter-container {
    flex-direction: row;
    align-items: center;
  }

  .search-box {
    flex-grow: 1;
    margin-bottom: 0;
    margin-right: 20px;
  }

  .filter-box {
    flex-direction: row;
    width: auto;
  }

  .filter-box select {
    width: auto;
  }
}

/* Add these styles at an appropriate location in your CSS file */

.no-results-section {
  width: 100%;
  text-align: center;
  padding: 60px 20px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  margin: 20px 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.no-results-section i {
  color: #fff;
  margin-bottom: 25px;
  opacity: 0.8;
  font-size: 48px;
  animation: pulse 2s infinite;
}

.no-results-section h2 {
  font-size: 28px;
  margin-bottom: 15px;
  font-weight: 600;
}

.no-results-section p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
}

/* Add animation for the search icon */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* Media query for mobile devices */
@media (max-width: 768px) {
  .no-results-section {
    padding: 40px 15px;
  }

  .no-results-section h2 {
    font-size: 24px;
  }

  .no-results-section p {
    font-size: 16px;
  }

  .clear-filters-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Update the clear filters button styles */
.clear-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(0, 123, 255, 0.2);
  color: #fff;
  border: 2px solid #007bff;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.clear-filters-btn:hover {
  background: #007bff;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.clear-filters-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.clear-filters-btn i {
  margin: 0;
  font-size: 16px;
  opacity: 1;
  transition: transform 0.3s ease;
}

.clear-filters-btn:hover i {
  transform: rotate(90deg);
}

/* Add these new styles for discounted prices */
.price .original-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 5px;
}

.price .discounted-price {
  color: #e74c3c;
  font-weight: bold;
}

/* Updated discount badge styles */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px; /* Changed to left */
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    padding: 8px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    transform: rotate(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add hover effect to the discount badge */
.wrapper:hover .discount-badge {
    transform: scale(1.1) rotate(3deg); /* Changed rotation direction */
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

/* Add a subtle animation */
@keyframes badgePulse {
    0% { transform: scale(1) rotate(0); }
    50% { transform: scale(1.05) rotate(2deg); } /* Changed rotation direction */
    100% { transform: scale(1) rotate(0); }
}

.discount-badge {
    animation: badgePulse 2s infinite ease-in-out;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .discount-badge {
        top: 8px;
        left: 8px; /* Changed to left */
        padding: 6px 10px;
        font-size: 0.9rem;
        min-width: 50px;
    }
}

/* Add specific override to ensure footer doesn't affect product names */
.products-container .wrapper .container .bottom .left h1 {
    font-size: 22px !important; /* Force override any inherited styles */
}

/* Add these styles for wishlist button states */
.wrapper .container .bottom .wishlist.added {
    background-color: #f8d7da;
    color: #dc3545;
    cursor: default;
}

.wrapper .container .bottom .wishlist.added:hover {
    background-color: #f8d7da;
}

.wrapper .container .bottom .wishlist.added i {
    color: #dc3545;
}

/* Update wishlist button styles for out of stock items */
.wrapper .container .bottom .actions .wishlist {
    width: 100%; /* Take full width when it's the only button */
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f1f1f1;
    transition: background-color 0.3s ease;
    border: none;
    font-size: 18px;
}

/* Style for added wishlist items when out of stock */
.wrapper .container .bottom .actions .wishlist.added {
    width: 100%;
    background-color: #f8d7da;
    color: #dc3545;
}

/* Ensure proper spacing when both buttons are present */
.wrapper .container .bottom .actions:not(:has(.cart)) .wishlist {
    border-radius: 0;
}

/* Keep original styles for when both buttons are present */
.wrapper .container .bottom .actions:has(.cart) .wishlist,
.wrapper .container .bottom .actions:has(.cart) .cart {
    width: 50%;
}

/* Update the wishlist button styles */
.wrapper .container .bottom .wishlist {
    transition: all 0.3s ease;
}

.wrapper .container .bottom .wishlist:not(.added):hover {
    background-color: #ffebee;
    color: #e53935;
}

.wrapper .container .bottom .wishlist.added {
    background-color: #ffebee;
    color: #e53935;
}

.wrapper .container .bottom .wishlist.added i {
    color: #e53935;
}

.wrapper .container .bottom .wishlist:not(.added) i {
    transition: color 0.3s ease;
}

.wrapper .container .bottom .wishlist:not(.added):hover i {
    color: #e53935;
}