* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  line-height: 1.6;
}

/* HEADER */
header {
  background: #111;
  color: #fff;
  padding: 15px 0;
}

ul {
  list-style: none;
}

.black-divider {
  margin: 20px 0;
  width: 100%;
  border: 1px solid black;
  border-bottom: none;
}

.white-divider {
  margin: 20px 0;
  width: 100%;
  border: 1px solid white;
  border-bottom: none;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav {
  display: flex;
  gap: 40px;
}

nav a {
  color: #fff;
  text-decoration: none;
}

nav a:hover,
.page-active {
  text-decoration: underline;
  text-underline-offset: 10px;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: 0.3s;
}

.container {
  width: 90%;
  margin: auto;
}

.container h2 {
  letter-spacing: 2px;
  text-align: left;
}

/* HERO */
.hero {
  position: relative;
  background: url('../images/homepage_background.avif') no-repeat center/cover;
  height: 400px;
  color: white;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* adjust darkness here */
  z-index: 1;
}

.hero * {
  position: relative;
  z-index: 2;
}

.hero-text {
  width: 80%;
  margin-left: 10%;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.hero h1 {
  font-size: 40px;
}

.hero button {
  width: 15%;
  min-width: 200px;
  margin-top: 15px;
  padding: 10px 20px;
  border: 1px solid white;
  background: transparent;
  color: white;
  cursor: pointer;
  border-radius: 25px;
}

.hero button:hover {
  text-decoration: underline;
}

/* SECTIONS */
section {
  padding: 50px 0;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* CARDS */
.card, .product {
  background: #f4f4f4;
  padding: 1em;
  text-align: center;
  border-radius: 5px;
}

/* CONTACT */
.contact {
  background: black;
  color: #fff;
  text-align: center;
}

.contact-us-info-container {
  display: flex;
  flex-direction: row;
  gap: 15%;
}

.contact-us-info {
  text-align: left;
  font-size: 18px;
  display: flex;
  flex-direction: column;
}

.contact-us-form-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  text-align: left;
  font-size: 18px;
}

.contact-us-form {
  width: 40%;
  display: flex;
  flex-direction: column;
}

.contact-us-form form {
  display: flex;
  flex-direction: column;
}

form input {
  width: 100%;
}

.row {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.row .column{
  width: 48% !important;
}

.column {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.column label,
.column input {
  width: 48%;
}

/* FOOTER */
.footer-copyright {
  text-align: center;
  padding: 15px;
  text-align: center;
  font-size: 18px;
  margin-top: 15px;
  white-space: normal;
}

.products-container {
  display: flex;
  gap: 40px;
  padding: 40px;
}

.mobile-products-container {
  display: none;
  gap: 40px;
  padding: 40px;
}

.mobile-header-bar {
  width: 100%;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
}

.search-container {
  position: relative;
  margin-bottom: 10px;
}

.search-box {
  width: 100%;
  padding: 10px 40px 10px 15px; /* space for icon */
  border-radius: 20px;
  border: 1px solid black;
  outline: none;
  background: transparent;
}

/* ICON INSIDE INPUT */
.search-container i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  pointer-events: none; /* allows clicking input */
}

.category-list {
  list-style: none;
  padding: 0;
}

.category-list li {
  cursor: pointer;
  padding-bottom: 10px;
}

.category-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  color: #fff;
  padding: 12px;
  text-decoration: none;
  font-weight: bold;
}

.category-list a:hover {
  background: #333;
}

/* CONTENT */
.product-content {
  flex: 1;
}

.product-content h2 {
  margin-bottom: 5px;
}

.blue-line {
  width: 50px;
  height: 3px;
  background: #007bff;
  margin-bottom: 20px;
}

/* GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  cursor: pointer;
}

/* CARD */
.product-card {
  border: 1px solid #ddd;
  text-align: center;
  padding: 10px;
  background: #fff;
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.product-card p {
  font-weight: bold;
  margin-top: 10px;
}

.error-message-list-container {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  background-color: lightcoral;
  border: 1px solid red;
  color: red;
  gap: 10px;
  padding: 10px 0 10px 25px;
  margin-top: 0;
}

.error-message-container {
  width: 20%; 
  min-width: 250px;
  height: 45px; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  font-weight: bold; 
  margin-left: auto; 
  background-color: lightcoral; 
  border: 1px solid red; 
  color: red; 
  margin-bottom: 20px;
}

.success-message-container {
  width: 100%; 
  min-width: 250px;
  height: 45px; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  font-weight: bold; 
  margin-left: auto; 
  background-color: lightgreen; 
  border: 1px solid green; 
  color: green; 
  margin-bottom: 20px;
}

@media screen and (max-width: 991px) {
  .hamburger {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 50%;
    background: #111;
    flex-direction: column;
    padding: 80px 20px;
    gap: 20px;
    
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-products-container {
    display: flex;
    flex-direction: column;
  }
  
  .products-container {
    display: none;
  }

  .product-content {
    display: flex;
  }

  .sidebar {
    width: 100%;
  }

  .layer {
    display: flex;
  }
}

@media screen and (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .grid, 
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}