/* General page styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #073a3e;
  background-color: #f7f4ee;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 2.5%;
  background-color: #06383a;
  color: white;
}

.school-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.school-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 2px solid #ffc43d;
  border-radius: 50%;
  font-size: 29px;
}

.school-name {
  display: flex;
  flex-direction: column;
  font-family: Georgia, serif;
  font-size: 12px;
}

.school-name span {
  margin-top: 5px;
  color: #ffc43d;
  font-family: Arial, sans-serif;
  font-weight: bold;
  letter-spacing: 2px;
}

.divider {
  width: 2px;
  height: 48px;
  background-color: #ffc43d;
}

.logo {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 34px;
  white-space: nowrap;
}

.logo span {
  color: #ffc43d;
}

.header-content {
  flex: 1;
  min-width: 180px;
}

#search-input {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 10px;
  padding: 12px 15px;
  border: none;
  border-radius: 25px;
  background-color: #fffefa;
  color: #073a3e;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.category-button {
  padding: 7px 10px;
  border: 1px solid #d5e2de;
  border-radius: 22px;
  background-color: transparent;
  color: white;
  font-size: 12px;
  white-space: nowrap;
}

.category-button:hover,
.category-button.active {
  background-color: #fffefa;
  color: #06383a;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-buttons button {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
}

.post-button {
  border: none;
  background-color: #ffc43d;
  color: #073a3e;
  font-weight: bold;
}

.sign-in {
  border: 1px solid white;
  background-color: transparent;
  color: white;
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  min-height: 280px;
  padding: 40px 16%;
  color: white;
  background-color: #064143;
  background-image:
    linear-gradient(90deg, #064143 35%, rgba(6, 65, 67, 0.55)),
    url("https://images.unsplash.com/photo-1562774053-701939374585?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
}

.hero h2 {
  margin: 0 0 18px;
  font-family: Georgia, serif;
  font-size: clamp(38px, 4.3vw, 56px);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  font-size: 21px;
}

/* Main layout */
main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  align-items: start;
  gap: 25px;
  padding: 25px 3%;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 30px;
}

#results-count {
  margin: 0;
  color: #49666b;
  font-size: 13px;
}

/* Product cards */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.listing-card {
  overflow: hidden;
  border: 1px solid #dedbd4;
  border-radius: 8px;
  background-color: #fffefa;
  box-shadow: 0 2px 4px #00000012;
}

.listing-image {
  position: relative;
  height: 210px;
  background-color: #e4dfd5;
}

.listing-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.condition {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 20px;
  background-color: #c6e9c0;
  color: #153f34;
  font-size: 12px;
}

.listing-info {
  padding: 12px;
}

.listing-info h3 {
  min-height: 40px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.3;
}

.price {
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: bold;
}

.seller,
.posted {
  margin: 9px 0 0;
  color: #4c6d73;
  font-size: 13px;
}

#no-results {
  padding: 25px 0;
  color: #49666b;
}

/* Shop with confidence */
.confidence {
  overflow: hidden;
  border: 1px solid #9eb5b0;
  border-radius: 15px;
  background-color: #f9f7f1;
}

.confidence-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 18px;
  background-color: #063b3e;
  color: white;
}

.hive-icon {
  color: #ffc43d;
  font-size: 30px;
}

.confidence-heading h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.confidence-heading p,
.feature p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 0 18px;
  padding: 20px 0;
  border-bottom: 1px solid #d9ded9;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #ffc43d;
  font-size: 25px;
}

.feature h3 {
  margin: 3px 0 6px;
  font-size: 14px;
}

.feature p {
  color: #49666b;
}

.go-tigers {
  margin: 18px;
  text-align: right;
  font-family: Georgia, serif;
  font-size: 22px;
  font-style: italic;
  font-weight: bold;
}

/* Footer */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 65px;
  padding: 20px;
  background-color: #06383a;
  color: white;
  font-size: 13px;
}

.footer-line {
  width: 13%;
  height: 1px;
  background-color: #ffc43d;
}

.footer-divider {
  width: 1px;
  height: 20px;
  background-color: white;
}

/* Pop-up forms */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background-color: rgba(0, 25, 26, 0.72);
}

.modal.open {
  display: flex;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 14px;
  background-color: #fffefa;
  box-shadow: 0 8px 30px #00000040;
}

.modal-content h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 28px;
}

.form-note {
  margin: 0 0 20px;
  color: #49666b;
  font-size: 13px;
  line-height: 1.5;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background-color: transparent;
  color: #073a3e;
  font-size: 30px;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal label {
  margin-top: 5px;
  font-size: 14px;
  font-weight: bold;
}

.modal input,
.modal select {
  width: 100%;
  padding: 11px;
  border: 1px solid #b9c9c5;
  border-radius: 7px;
  background-color: white;
}

.submit-button {
  margin-top: 12px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #ffc43d;
  color: #073a3e;
  font-weight: bold;
}

#signin-message {
  margin: 8px 0 0;
  color: #075b42;
  font-size: 13px;
}

/* Tablet layout */
@media (max-width: 1100px) {
  header {
    flex-wrap: wrap;
  }

  .header-content {
    order: 3;
    flex-basis: 100%;
  }

  .header-buttons {
    margin-left: auto;
  }

  main {
    grid-template-columns: 1fr;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone layout */
@media (max-width: 600px) {
  header {
    gap: 10px;
    padding: 14px;
  }

  .school-logo {
    width: 43px;
    height: 43px;
    font-size: 22px;
  }

  .school-name {
    font-size: 9px;
  }

  .divider {
    height: 35px;
  }

  .logo {
    font-size: 26px;
  }

  .header-buttons {
    width: 100%;
  }

  .header-buttons button {
    flex: 1;
  }

  .hero {
    min-height: 220px;
    padding: 30px 7%;
  }

  .hero h2 {
    font-size: 38px;
  }

  .hero p {
    font-size: 16px;
  }

  main {
    padding: 20px 14px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .listing-grid {
    gap: 10px;
  }

  .listing-image {
    height: 155px;
  }

  .listing-info {
    padding: 9px;
  }

  .listing-info h3 {
    font-size: 14px;
  }

  .price {
    font-size: 20px;
  }

  footer {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
  }

  .footer-line {
    display: none;
  }
}