/* General Styles */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #000000; /* Black background */
  color: #fff; /* White text */
  padding-bottom: 100px;
}

/* Header and Logo */
header {
  text-align: center;
  padding: 20px 0;
  background-color: #000000;
  position: relative;
}

header .logo img {
  max-width: 150px;
}

header h1 {
  color: #a2853a; /* Gold */
  font-size: 28px;
}

.back-arrow {
  position: absolute;
  left: 15px; /* Position it close to the left edge */
  top: 35%; /* Center vertically within the heading */
  transform: translateY(-50%); /* Perfect vertical alignment */
  font-size: 24px; /* Arrow size */
  color: #c0c0c0;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.back-arrow:hover {
  color: #c0c0c0; /* Silver color on hover */
}

/* Categories Section */
.categories {
  text-align: center;
  margin: 20px;
}

.categories h2 {
  font-size: 24px;
  color: #a2853a; /* Gold */
  margin-bottom: 20px;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.category-buttons button {
  background-color: #a2853a; /* Gold */
  color: #121212; /* Black text */
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.category-buttons button:hover {
  background-color: #c0c0c0; /* Silver */
  color: #121212;
}

/* Item List Section */
.item-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.item-card {
  display: flex;
  flex-direction: row;
  align-items: center; /* Ensure vertical alignment with the image */
  gap: 10px;
  background: #1e1e1e;
  border-radius: 10px;
  padding: 10px;
  width: 95%;
  max-width: 600px;
  cursor: pointer;
  transition: background 0.3s;
}

.item-card:hover {
  background: #333;
}

.item-card img {
  width: 150px; /* Fixed width for uniform size */
  height: 100px; /* Fixed height for uniform size */
  border-radius: 10px;
  object-fit: cover;
}

.item-card-content {
  display: flex;
  flex-direction: column; /* Stack title, description, and price */
  justify-content: space-between; /* Spread items vertically */
  height: 100px; /* Match the height of the image */
  text-align: left; /* Align text to the left */
  width: 100%; /* Make content fill the remaining space */
}

.item-card-content h3 {
  margin: 0;
  color: #a2853a; /* Gold for item name */
  font-size: 16px;
}

.item-card-content p {
  margin: 0;
  color: #c0c0c0; /* Silver for description */
  font-size: 14px;
  line-height: 1.4; /* Control line spacing */
  max-height: 2.8em; /* Show up to 2 lines */
  overflow: hidden; /* Hide overflowing text */
  text-overflow: ellipsis; /* Add "..." for hidden text */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical; /* Required for line clamping */
  cursor: pointer;
}

.item-card-content .price {
  margin: 0;
  color: #fff; /* White for price */
  font-size: 16px;
  font-weight: bold;
}

.item-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  font-size: 14px;
}

.item-details .category-description {
  font-size: 14px;
  color: #ccc;
  margin-left: 10px;
  overflow: hidden; /* Hide overflowing text */
  text-overflow: ellipsis; /* Add "..." for hidden text */
  display: -webkit-box;
  -webkit-line-clamp: 5; /* Limit to 2 lines */
  -webkit-box-orient: vertical; /* Required for line clamping */
}

/* Category Carousel */
.category-carousel {
  display: flex;
  overflow-x: auto; /* Allow horizontal scrolling */
  white-space: nowrap;
  background: #000; /* Black background for the carousel */
  margin-top: 25px;
}

.carousel-item {
  flex: 0 0 auto;
  padding: 15px 20px;
  margin: 0; /* Remove margin between items */
  background: #1e1e1e; /* Light black for unselected */
  color: #fff;
  text-align: center;
  border-radius: 0;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100px; /* Fixed width for uniform size */
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.carousel-item.selected {
  background: #a2853a; /* Gold for selected category */
  font-weight: bold;
  color: black;
}

.carousel-item:hover {
  background: #333; /* Slightly lighter black on hover */
}

/* Hide scrollbar */
.category-carousel::-webkit-scrollbar {
  display: none; /* Hide scrollbar for a clean design */
}

/* Popup Modal */
.popup {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8); /* Dimmed background */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Allow clicking outside to close the popup */
.popup.active {
  display: flex;
}

/* Popup content */
.popup-content {
  background-color: #1e1e1e; /* Dark background */
  color: #fff; /* White text */
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 90%;
  max-width: 350px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* Close Button (X) */
.popup-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #a2853a; /* Gold */
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: 50%;
  transition: background 0.3s;
}

.popup-content .close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Image inside popup */
.popup-content img {
  width: 90%; /* Make the image responsive */
  max-width: 250px; /* Set max width */
  height: auto; /* Keep aspect ratio */
  border-radius: 10px; /* Optional rounded corners */
  display: block;
  margin: 10px auto;
}

/* Text alignment */
.popup-content h3 {
  color: #a2853a; /* Gold */
  font-size: 18px;
  margin: 10px 0;
}

.popup-content p {
  color: #c0c0c0; /* Silver */
  font-size: 14px;
  line-height: 1.4;
}

/* Close on outside click */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1e1e1e; /* Dark background */
  color: #fff; /* White text */
  display: flex;
  flex-direction: column; /* Stack content vertically */
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); /* Shadow for visibility */
  z-index: 1000;
}

.footer-title-and-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Space between "Follow us:" and icons */
  margin-bottom: 10px; /* Space between social icons and website link */
}

.footer-title {
  font-size: 14px;
  color: #a2853a; /* Gold text */
  margin: 0;
}

.social-icons {
  display: flex;
  gap: 10px; /* Space between icons */
}

.icon {
  font-size: 24px; /* Size of the icon */
  color: #fff; /* White icons */
  text-decoration: none;
  transition: color 0.3s ease;
}

.icon:hover {
  color: #a2853a; /* Gold hover effect */
}

.website-link {
  margin-top: 5px;
}

.web-icon {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between the icon and text */
  font-size: 16px;
  color: #a2853a; /* Gold */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.web-icon i {
  font-size: 20px; /* Icon size */
}

.web-icon:hover {
  color: #c0c0c0; /* Silver on hover */
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  header .logo img {
    max-width: 150px;
  }

  header h1 {
    font-size: 24px;
  }

  .categories {
    margin-top: 0;
  }

  .category-buttons button {
    padding: 8px 15px;
    font-size: 14px;
  }

  .item-card {
    flex-direction: row; /* Horizontal layout for smaller screens */
  }

  .item-card img {
    width: 150px;
    height: 100px;
  }

  .item-card-content h3 {
    font-size: 16px;
    align-self: self-start;
  }

  .item-card-content p {
    font-size: 14px;
    align-self: self-start;
  }

  .item-card-content .item-details {
    font-size: 14px;
    margin-left: -10px;
  }

  .carousel-item {
    font-size: 14px;
    width: 100px;
  }

  .popup-content {
    width: 95%;
  }

  .sticky-footer {
    padding: 15px;
  }

  .footer-title-and-icons {
    flex-direction: row; /* Icons and text remain in a row */
  }

  .icon {
    font-size: 20px;
  }

  .web-icon {
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  .category-buttons button {
    width: 40%; /* Full-width buttons */
    padding: 10px;
    font-size: 18px;
    min-height: 80px;
  }

  .item-card {
    width: 100%; /* Full-width cards */
  }

  header h1 {
    font-size: 20px;
  }
}
