:root {
  --navy: #7987a4;
  --gold: #fca311;
  --cream: #fff8ec;
  --white: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --green: #2f855a;
  --shadow: 0 12px 30px rgba(20, 33, 61, 0.18);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--cream), #ffffff);
  color: var(--ink);
}

.site-header {
  background:
    radial-gradient(circle at top left, rgba(252, 163, 17, 0.28), transparent 32%),
    linear-gradient(135deg, var(--navy), #243b63);
  color: var(--white);
  padding: 1.25rem 1rem 2.5rem;
  text-align: center;
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
}

.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.logo {
  background: transparent;
  object-fit: contain;
}

.mcc-logo {
  max-width: 360px;
  max-height: 240px;
}

.bgc-logo {
  max-width: 300px;
  max-height: 180px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 800;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(2.25rem, 8vw, 4.5rem);
  line-height: 0.95;
  margin: 0;
}

.hero-text {
  max-width: 640px;
  margin: 1rem auto 0;
  font-size: 1.1rem;
  color: #f4f4f5;
}

main {
  width: min(1050px, calc(100% - 2rem));
  margin: -1.5rem auto 2rem;
}

.auction-status-card,
.charity-note {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  text-align: center;
}

.status-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 800;
  margin: 0;
}

.auction-status-card h2 {
  margin: 0.3rem 0;
  font-size: 2rem;
  color: var(--navy);
}

.auction-status-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.action-card {
  appearance: none;
  border: 0;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  min-height: 150px;
}

.action-card:hover,
.action-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(20, 33, 61, 0.24);
  outline: none;
}

.action-card.primary {
  background: linear-gradient(135deg, var(--gold), #ffd166);
}

.icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.card-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 850;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.card-copy {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.35;
}

.charity-note h2 {
  margin-top: 0;
  color: var(--green);
}

.charity-note p {
  margin-bottom: 0;
  color: var(--muted);
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 850px) {
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .site-header {
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .action-card {
    min-height: unset;
  }
}

.items-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  color: var(--navy);
}

#itemSearch {
  width: min(320px, 100%);
  padding: 0.75rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font: inherit;
}

.category-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.category-filter {
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-weight: 650;
}

.category-filter.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.item-card {
  background: #fffaf0;
  border: 2px solid #4b2e1f;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 0 rgba(75, 46, 31, 0.25);
}

.item-category {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.item-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.item-image-wrap {
  height: 180px;
  background: #efe2c7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f3f4f6;
}

.item-description {
  font-size: 0.95rem;
  line-height: 1.35;
}

.item-card-content {
  padding: 1rem;
}

.item-card h3 {
  margin: 0.35rem 0;
}

.item-bid-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.item-bid-summary div {
  background: #f4ead7;
  border-radius: 10px;
  padding: 0.65rem;
}

.item-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.75;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.item-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.current-bid {
  font-size: 1.25rem;
  font-weight: 850;
  margin-bottom: 0.75rem;
}

.view-item-button {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.empty-auction-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  background: #fffaf0;
  border-radius: 16px;
}

#openBidButton:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 850px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  #itemSearch {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .items-grid {
    grid-template-columns: 1fr;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 33, 61, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-backdrop.hidden {
  display: none;
}

.item-modal {
  background: white;
  border-radius: 24px;
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: 0;
  background: rgba(255,255,255,0.92);
  color: var(--navy);
  font-size: 2rem;
  line-height: 1;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  z-index: 2;
}

.modal-item-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}

.modal-content {
  padding: 2rem 2.25rem;
}

.modal-category {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.modal-content h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.8rem;
}

.modal-donor {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
}

.modal-description {
  line-height: 1.55;
  color: var(--ink);
}

.bid-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.bid-summary div {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  background: #fafafa;
}

.bid-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.bid-summary strong {
  color: var(--navy);
  font-size: 1.5rem;
}

.submit-bid-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-size: 1rem;
}

@media (max-width: 560px) {
  .bid-summary {
    grid-template-columns: 1fr;
  }

  .modal-content h2 {
    font-size: 1.45rem;
  }
}

.item-image-placeholder {
  text-align: center;
  padding: 1rem;
}

.placeholder-detective {
  max-width: 80px;
  opacity: 0.75;
}

.placeholder-text {
  margin-top: 0.5rem;
  font-weight: 700;
}

.donation-info-card {
  background: rgba(255, 196, 0, 0.08);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 1.25rem 0 2rem;
  color: var(--ink);
  line-height: 1.6;
}

.donation-info-card p {
  margin: 0 0 1rem;
}

.donation-info-card p:last-child {
  margin-bottom: 0;
}

.donation-info-card strong {
  color: var(--navy);
}



.donate-form {
  display: grid;
  gap: 1.4rem;
  margin-top: 2rem;
  padding: 0 1.5rem 1rem;
}

.donate-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 750;
  color: var(--ink);
}

.donate-form input,
.donate-form select,
.donate-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
}

.donate-form textarea {
  resize: vertical;
}

.form-message {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.form-message.error {
  color: #b91c1c;
}

.form-message.success {
  color: var(--green);
}

.bid-modal {
  max-width: 520px;
  width: min(92vw, 520px);
  padding: 1.5rem;
}

.bid-modal h2 {
  margin: 0 0 1rem;
}

.bid-modal-content {
  max-width: 460px;
}

.bid-item-summary {
  background: #f4ead7;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.bid-item-summary h3 {
  margin: 0 0 0.75rem;
}

#bidForm {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#bidForm label {
  font-weight: 700;
}

#bidForm input[type="text"],
#bidForm input[type="email"],
#bidForm input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem;
  border: 1px solid #c7b99f;
  border-radius: 8px;
  font-size: 1rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400 !important;
}

#bidForm .submit-bid-button {
  margin-top: 0.75rem;
  width: 100%;
  border-radius: 999px;
  padding: 0.85rem 1rem;
  font-weight: 800;
  cursor: pointer;
}


.form-message {
  min-height: 1.25rem;
  font-weight: 600;
}

.form-message.error {
  color: #9b1c1c;
}

.form-message.success {
  color: #1f7a3f;
}

.rules-list {
  padding-left: 1.25rem;
  line-height: 1.6;
}

.rules-list li {
  margin-bottom: 0.65rem;
}