.furniture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 8px 0 48px;
}

.furniture-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ebe8e2;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(28, 28, 28, 0.08);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.furniture-card:hover {
  border-color: #ddd7cd;
  box-shadow: 0 14px 34px rgba(28, 28, 28, 0.13);
  transform: translateY(-3px);
}

.furniture-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4f2ee;
  color: inherit;
}

.furniture-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 320ms ease;
}

.furniture-card__media:hover img,
.furniture-card__media:focus img {
  transform: scale(1.035);
}

.furniture-card__media:focus-visible {
  outline: 3px solid #ffc300;
  outline-offset: -3px;
}

.furniture-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #aaa49a;
  font-family: "Quicksand", Arial, sans-serif;
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  background: linear-gradient(145deg, #f7f5f2, #ede9e2);
}

.furniture-card__indicator {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(24, 24, 24, 0.72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: background-color 180ms ease, transform 180ms ease;
}

.furniture-card__indicator svg {
  width: 18px;
  height: 18px;
}

.furniture-card__media:hover .furniture-card__indicator,
.furniture-card__media:focus .furniture-card__indicator {
  background: #252525;
  transform: scale(1.06);
}

.furniture-card__body {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
}

.furniture-card__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #353535;
  font-family: "Quicksand", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.furniture-back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: #9d7500;
  font-size: 14px;
  font-weight: 500;
}

.furniture-back-link:hover,
.furniture-back-link:focus {
  color: #5e4700;
}

.mfp-furniture .mfp-container {
  padding: 28px;
}

.mfp-furniture .mfp-content {
  max-width: min(1200px, calc(100vw - 56px));
}

.mfp-furniture img.mfp-img {
  max-height: calc(100vh - 100px) !important;
  padding: 40px 0;
}

.mfp-furniture .mfp-title {
  padding-right: 0;
  color: #fff;
  font-family: "Quicksand", Arial, sans-serif;
  text-align: center;
}

.mfp-furniture .mfp-counter {
  color: rgba(255, 255, 255, 0.72);
}

.mfp-fade.mfp-bg {
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
  opacity: 0.92;
}

.mfp-fade.mfp-bg.mfp-removing {
  opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
  opacity: 1;
  transform: none;
}

.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
}

@media screen and (max-width: 991px) {
  .furniture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media screen and (max-width: 767px) {
  .furniture-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-top: 0;
  }

  .furniture-card {
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(28, 28, 28, 0.08);
  }

  .furniture-card:hover {
    transform: none;
  }

  .furniture-card__body {
    min-height: 38px;
    padding: 5px 8px;
  }

  .furniture-card__title {
    font-size: 13px;
  }

  .furniture-card__indicator {
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
  }

  .furniture-card__indicator svg {
    width: 16px;
    height: 16px;
  }

  .mfp-furniture .mfp-container {
    padding: 14px;
  }

  .mfp-furniture .mfp-content {
    max-width: calc(100vw - 28px);
  }

  .mfp-furniture img.mfp-img {
    max-height: calc(100vh - 72px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .furniture-card,
  .furniture-card__media img,
  .furniture-card__indicator,
  .mfp-fade.mfp-bg,
  .mfp-fade.mfp-wrap .mfp-content {
    transition: none;
  }
}
