.forsale-section {
  padding-top: 1.6rem;
}

.forsale-intro {
  margin-bottom: 1.4rem;
}

.forsale-intro p {
  max-width: 60rem;
}

.sales-contact {
  margin-bottom: 2rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.sales-contact p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.sales-contact a {
  color: var(--orange);
  font-weight: 600;
}

.sale-group + .sale-group {
  margin-top: 2.5rem;
}

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

.section-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--orange);
  font-family: 'Tomorrow', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-family: 'Tomorrow', sans-serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: 0.03em;
}

.group-meta {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.sale-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sale-grid--patches {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sale-card {
  overflow: hidden;
  background: linear-gradient(180deg, #121212 0%, #0d0d0d 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sale-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 71, 0, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.sale-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #090909;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.sale-card__media:focus-visible {
  outline: 2px solid rgba(255, 71, 0, 0.7);
  outline-offset: -2px;
}

.sale-card__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.28s ease;
  filter: brightness(1.03) contrast(1.02);
}

.sale-card:hover .sale-card__image {
  transform: scale(1.03);
}

.sale-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.15) 100%);
  pointer-events: none;
}

.sale-card__badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  padding: 0.34rem 0.56rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #f2f2f2;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.sale-card__body {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1rem 1.05rem;
}

.sale-card__title {
  margin: 0;
  font-family: 'Tomorrow', sans-serif;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
}

.sale-card__description {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  min-height: 3.2rem;
}

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

.sale-card__price {
  font-family: 'Tomorrow', sans-serif;
  color: var(--orange);
  font-size: 1rem;
}

.sale-card__price-note {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.sale-card__actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
}

.sale-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sale-button:hover {
  border-color: rgba(255, 71, 0, 0.42);
  background: rgba(255, 71, 0, 0.1);
}

.sale-button--email {
  color: var(--orange);
}

.sale-modal[hidden] {
  display: none;
}

.sale-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sale-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.sale-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  margin: 0;
  background: linear-gradient(180deg, #121212 0%, #0c0c0c 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: saleModalFadeIn 0.2s ease;
}

@keyframes saleModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sale-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

.sale-modal__media-wrap {
  background: #080808;
  display: grid;
  place-items: center;
  max-height: 60vh;
  overflow: auto;
}

.sale-modal__image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 60vh;
}

.sale-modal__content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem 1.1rem 1.1rem;
  border-top: 1px solid var(--border);
}

.sale-modal__text {
  max-width: 58ch;
}

.sale-modal__content h2 {
  margin: 0.15rem 0 0.25rem;
  font-family: 'Tomorrow', sans-serif;
}

.sale-modal__price {
  margin: 0 0 0.6rem;
  color: var(--orange);
  font-family: 'Tomorrow', sans-serif;
}

.sale-modal__description {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .sale-grid--patches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .sale-grid,
  .sale-grid--patches {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .section-heading,
  .sale-modal__content {
    align-items: flex-start;
    flex-direction: column;
  }

  .sale-modal {
    padding: 0.5rem;
  }

  .sale-modal__panel {
    width: min(100%, calc(100% - 1rem));
    max-height: calc(100vh - 1rem);
  }

  .sale-modal__media-wrap,
  .sale-modal__image {
    max-height: 48vh;
  }
}

@media (max-width: 560px) {
  .sale-card__body {
    padding: 0.8rem 0.8rem 0.85rem;
  }

  .sale-card__title {
    font-size: 0.92rem;
  }

  .sale-card__actions {
    flex-direction: column;
  }
}

#programsGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Responsive fallback */
@media (max-width: 1180px) {
  #programsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #programsGrid {
    grid-template-columns: 1fr;
  }
}

.sale-modal__actions {
  display: flex;
  gap: 0.75rem;
}

.sale-modal__actions .button {
  flex: 1;
  text-align: center;
}

/* Make secondary button match style */
.sale-modal__actions .button:not(.button-primary) {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.sale-modal__actions .button:not(.button-primary):hover {
  border-color: rgba(255, 71, 0, 0.42);
  background: rgba(255, 71, 0, 0.1);
}


/* UPDATED BUTTON STYLING */
.sale-modal__actions {
  display: flex;
  gap: 0.75rem;
}

.sale-modal__actions .button,
.sale-modal__actions .button-primary {
  flex: 1;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  white-space: nowrap;
}

.sale-modal__actions .button:hover,
.sale-modal__actions .button-primary:hover {
  border-color: rgba(255, 71, 0, 0.42);
  background: rgba(255, 71, 0, 0.1);
}


/* Click-anywhere card behavior */
.sale-card {
  cursor: pointer;
}

.sale-card:focus-visible {
  outline: 2px solid rgba(255, 71, 0, 0.7);
  outline-offset: 2px;
}

.sale-card__body,
.sale-card__title,
.sale-card__description,
.sale-card__meta,
.sale-card__price,
.sale-card__price-note {
  cursor: pointer;
}

.forsale-intro a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}

.forsale-intro a:hover {
  text-decoration: underline;
}


/* Sale price formatting */
.price-old {
  display: inline-block;
  margin-right: 0.45rem;
  color: var(--orange);
  font-size: 1.08rem;
  text-decoration: line-through;
}

.price-new {
  display: inline-block;
  color: var(--orange);
  font-weight: 700;
  font-size: 1.08rem;
}

.sale-modal__price .sale-card__price-note {
  display: inline;
  margin-top: 0;
  margin-left: 0.1rem;
}

.sale-modal__note {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}
