/* ===== Homepage category tiles — фото-карточки 4 в ряд ===== */
.cat-showcase {
  padding: 40px 0 56px;
  background: #fff;
}
.cat-showcase-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 24px;
}
.cat-showcase-head .section-title {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cat-showcase-head .section-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}
.cat-showcase-all-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: #a8894e;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cat-showcase-all-link:hover { color: #8b6f3e; }

.home-cat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* —— Карточка-коробка: только фото + оверлей —— */
.home-cat-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  min-height: 200px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #2a2218;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.home-cat-tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(26, 18, 8, 0.2);
}
.home-cat-tile:focus-visible {
  outline: 2px solid #c8a96e;
  outline-offset: 3px;
}

.home-cat-tile__photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}
.home-cat-tile:hover .home-cat-tile__photo {
  transform: scale(1.06);
}

.home-cat-tile__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(145deg, #5c4a3a 0%, #2a2218 100%);
}

.home-cat-tile__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(10, 8, 6, 0.88) 0%,
    rgba(10, 8, 6, 0.35) 38%,
    transparent 68%
  );
  pointer-events: none;
}

.home-cat-tile__price {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  padding: 6px 12px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1208;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.home-cat-tile__info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 18px 16px 16px;
  pointer-events: none;
}
.home-cat-tile__name {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.home-cat-tile__sub {
  display: block;
  font-size: 0.78rem;
  opacity: 0.88;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-cat-tile__arrow {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
}
.home-cat-tile__arrow img {
  width: 16px;
  height: 16px;
  filter: brightness(10);
}
.home-cat-tile:hover .home-cat-tile__arrow {
  background: rgba(200, 169, 110, 0.9);
}

.home-cat-tile__skel {
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(110deg, #ece8e2 8%, #f8f6f3 18%, #ece8e2 33%);
  background-size: 200% 100%;
  animation: homeCatSkel 1.3s ease infinite;
}
@keyframes homeCatSkel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 1024px) {
  .home-cat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .home-cat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .home-cat-tile {
    border-radius: 16px;
    min-height: 160px;
  }
  .home-cat-tile__name { font-size: 0.95rem; }
  .home-cat-tile__sub { font-size: 0.7rem; }
  .home-cat-tile__price { font-size: 0.68rem; padding: 5px 10px; }
}
