/* ===== General Styles ===== */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f6f8;
  color: #333;
  display: flex;               /* Flex layout for sticky footer */
  flex-direction: column;
  min-height: 100vh;           /* Full viewport height */
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ===== Header ===== */
.header {
  background-image: url("h.png");
  color: white;
  padding: 45px;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  filter: brightness(70%);
}

/* ===== Logo ===== */
.logo img {
  height: 50px;
  margin-bottom: 20px;
}

/* ===== Back Button (Fixed at Bottom Left) ===== */
.back-button {
  position: fixed;
  bottom: 20px;
  left: 40px;
  background-color:red;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 1000;
}

.back-button:hover {
  background-color:red;
}

.back-button:active {
  transform: scale(0.95);
}

/* ===== Main Content ===== */
.products-page {
  padding: 40px 20px;
  flex: 1;                     /* Takes remaining space */
}

/* ===== Product Thumbnails ===== */
.product-images {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.product {
  cursor: pointer;
  text-align: center;
  flex: 0 1 120px;             /* Responsive width */
}

.product img {
  width: 100%;
  max-width: 120px;
  height: auto;
  border: 2px solid #ccc;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.product img:hover {
  transform: scale(1.05);
}

.product h3 {
  margin-top: 10px;
  color: black;
  font-size: 14px;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* ===== Responsive Media Queries ===== */

/* Phones */
@media (max-width: 600px) {
  .product-images {
    gap: 15px;
  }
  .product {
    flex: 0 1 40%;              /* Two products per row */
  }
  .back-button {
    font-size: 14px;
    padding: 10px 16px;
    bottom: 15px;
    left: 15px;
  }
}

/* Tablets */
@media (min-width: 601px) and (max-width: 900px) {
  .product {
    flex: 0 1 30%;              /* Three products per row */
  }
}

/* Desktops */
@media (min-width: 901px) {
  .product {
    flex: 0 1 120px;            /* Original desktop size */
  }
}
