/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", sans-serif;
  background-color: white; /* Updated color */
  color: black;
  padding: 0 1rem;
}

/* Header Layout */
.main-header {
  background-color: white;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Logo + Text */
.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-icon {
  height: auto;
  max-width: 100px;
  border-radius: 12px;
}

.logo-text h1 {
  font-size: 28px;
  color: black;
  margin: 0;
  line-height: 1;
}

.logo-text span {
  font-size: 16px;
  color: black;
  font-style: italic;
  letter-spacing: 1px;
}

/* Department Buttons Row */
.departments-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

/* Individual Department Button */
.department-btn {
  background-color: black;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  border: 1px solid transparent;
  transition: all 0.3s;
  cursor: pointer;
}

.department-btn:hover,
.department-btn.active {
  background-color: black;
  color: #e49226;
  border-color: #e49226;
}

/* Layout Wrapper */
.menu-wrapper {
  display: flex;
  gap: 30px;
  margin: 30px auto;
  max-width: 1200px;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: black;
  padding: 20px;
  border-radius: 10px;
  position: sticky;
  top: 20px; /* Adjust as needed */
  align-self: flex-start; /* Ensures correct behavior in flex layouts */
  z-index: 10;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 15px;
}

.sidebar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  display: block;
  border-left: 4px solid #e49226;
  padding-left: 10px;
  transition: all 0.3s;
}

.sidebar a:hover {
  color: #e49226;
  background-color: #2a2a2a;
}

.sidebar ul li a.active {
  color: #e49226; /* or any highlight color */
  font-weight: bold;
}

/* Menu Content */
.menu-content {
  flex: 1;
  padding-right: 10px;
}

/* Category Section */
.category-section {
  margin-bottom: 40px;
  padding: 0 15px;
}

.category-section h2 {
  background-color: #e49226;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 20px;
  max-width: 100%;
  width: fit-content;
}

/* Items */
.items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}

.item-card {
  background: black;
  border-radius: 8px;
  padding: 15px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  max-width: 260px;
  height: 300px; /* Fixed height for equal alignment */
  box-sizing: border-box;
}

.item-card img {
  height: 100px;
  width: 100px;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 10px;
}

.item-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-info strong {
  font-size: 15px;
  color: #fff;
  margin-bottom: 5px;
}

.item-info p {
  font-size: 13px;
  color: #ccc;
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.item-info span {
  font-weight: bold;
  color: #e49226;
  font-size: 14px;
}

#image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

#image-modal-content {
  max-width: 90%;
  max-height: 90%;
  display: block;
  margin: auto;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

#image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

/* Mobile + Tablet Responsive */
@media (max-width: 992px) {
  body {
    padding: 0;
    margin: 0;
  }
  /* Stack menu and content vertically */
  .menu-wrapper {
    flex-direction: column;
    padding: 0;
  }

  .sidebar {
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background-color: black;
    z-index: 1000;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 0;
    display: flex;
    padding: 10px 0;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  }

  .sidebar ul {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: max-content;
    margin: 0 auto;
    padding: 0 12px;
  }

  .sidebar li {
    margin: 0;
  }

  .sidebar a {
    padding: 10px 16px;
    border-left: none;
    border-radius: 8px;
    background-color: black;
    white-space: nowrap;
    border: 1px solid #333;
  }

  .sidebar a:hover,
  .sidebar a.active {
    background-color: black;
    color: #e49226;
    border-color: #e49226;
  }

  /* Items go into list-style row layout */
  .items-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 0 12px;
  }

  .item-card {
    flex-direction: row;
    align-items: center;
    height: auto;
    max-width: 100%;
    padding: 12px;
  }

  .item-card img {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    flex-shrink: 0;
  }

  .item-info {
    justify-content: center;
  }

  .item-info strong {
    font-size: 16px;
  }

  .item-info span {
    font-size: 15px;
  }

  .category-section {
    padding: 0;
  }

  .category-section h2 {
    font-size: 22px;
    margin: 0 0 15px 0;
    padding: 12px;
    width: 100%;
    text-align: left;
  }

  /* Optional: Sidebar links full width */
  .sidebar a {
    padding: 10px 12px;
  }
}
