/* Category page — editorial hero + product grid with variant thumbs */

.fn-cat-page {
  --fn-cat-ink: #0c0c0c;
  --fn-cat-muted: #6b7280;
  --fn-cat-line: rgba(12, 12, 12, 0.08);
  --fn-cat-paper: #f7f5f2;
  --fn-cat-accent: #1a1a1a;
  --fn-cat-bordeaux: #8b1212;
  color: var(--fn-cat-ink);
  background:
    radial-gradient(80% 50% at 100% 0%, rgba(12, 12, 12, 0.04), transparent 55%),
    linear-gradient(180deg, #faf9f7 0%, #fff 42%, #fff 100%);
  min-height: 60vh;
}

.fn-cat-hero {
  position: relative;
  min-height: min(72vh, 34rem);
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  overflow: hidden;
  color: #fff;
}

.fn-cat-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.fn-cat-hero__slides {
  position: absolute;
  inset: 0;
}

.fn-cat-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  animation: fnCatHeroIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fn-cat-hero--slider .fn-cat-hero__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  animation: none;
  transition: opacity 0.9s ease, transform 4.5s ease;
  pointer-events: none;
}

.fn-cat-hero--slider .fn-cat-hero__img.is-active {
  opacity: 1;
  transform: scale(1.02);
  z-index: 1;
}

.fn-cat-hero__dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.fn-cat-hero__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.25s ease, background 0.25s ease;
}

.fn-cat-hero__dot.is-active {
  width: 1.15rem;
  background: #fff;
}

.fn-cat-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, transparent 55%);
  pointer-events: none;
}

.fn-cat-hero__content {
  position: relative;
  z-index: 2;
  width: min(100% - 1.25rem, 90rem);
  margin: 0 auto;
  padding: 4.5rem 0 2.75rem;
  text-align: right;
  animation: fnCatCopyIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.fn-cat-hero__eyebrow {
  margin: 0 0 0.65rem;
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.fn-cat-hero__title {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.fn-cat-hero__desc {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-family: 'Cairo', sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  font-weight: 500;
  opacity: 0.9;
}

.fn-cat-section {
  width: min(100% - 0.75rem, 96rem);
  margin: 0 auto;
  padding: 1.35rem 0 2.75rem;
}

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

@media (min-width: 768px) {
  .fn-cat-section {
    width: min(100% - 1.25rem, 96rem);
    padding: 1.6rem 0 3.25rem;
  }
  .fn-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 0.75rem;
  }
}

@media (min-width: 1100px) {
  .fn-cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.45rem 0.9rem;
  }
}

.fn-cat-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
}

.fn-cat-card__media {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fn-cat-card__img-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #eceae6;
  border-radius: 7px 4px 7px 4px;
}

.fn-cat-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.fn-cat-card:hover .fn-cat-card__img {
  transform: scale(1.04);
}

.fn-cat-card__img.is-swapping {
  opacity: 0.35;
}

.fn-cat-card__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.fn-cat-card__thumbs::-webkit-scrollbar {
  display: none;
}

.fn-cat-card__thumb {
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 4px 7px 4px 7px;
  overflow: hidden;
  background: #eee;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.fn-cat-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.fn-cat-card__thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(12, 12, 12, 0.35);
}

.fn-cat-card__thumb.is-active {
  border-color: var(--fn-cat-ink);
  box-shadow: 0 0 0 1px var(--fn-cat-ink);
}

.fn-cat-card__body {
  padding: 0.65rem 0.05rem 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.28rem;
}

.fn-cat-card__title {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
}

.fn-cat-card__title a {
  color: inherit;
  text-decoration: none;
}

.fn-cat-card__title a:hover {
  opacity: 0.75;
}

.fn-cat-card__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.fn-cat-card__price {
  font-family: 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #8a0e0e;
}

.fn-cat-card__compare {
  font-size: 0.82rem;
  color: #9ca3af;
}

.fn-cat-card__cart {
  margin-top: auto;
  width: 100%;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.78rem 0.9rem;
  background: var(--fn-cat-accent);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}

.fn-cat-card__cart-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.fn-cat-card__cart:hover {
  background: #2a2a2a;
  transform: translateY(-1px);
}

.fn-cat-empty {
  text-align: center;
  padding: 4rem 1rem;
}

.fn-cat-empty__title {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fn-cat-muted);
}

.fn-cat-empty__link {
  display: inline-block;
  margin-top: 1rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  color: var(--fn-cat-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.fn-cat-sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 0 0.5rem;
  min-height: 3rem;
}

.fn-cat-sentinel__loading,
.fn-cat-sentinel__end {
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  color: var(--fn-cat-muted);
  font-weight: 600;
}

@keyframes fnCatHeroIn {
  from { opacity: 0.55; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes fnCatCopyIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .fn-cat-hero {
    min-height: min(58vh, 26rem);
  }
  .fn-cat-hero__content {
    padding: 3.25rem 0 1.85rem;
  }
  .fn-cat-card__title {
    font-size: 0.78rem;
    line-height: 1.3;
    font-weight: 700;
  }
  .fn-cat-card__price {
    font-size: 0.9rem;
  }
  .fn-cat-card__thumb {
    width: 2.35rem;
    height: 2.35rem;
  }
  .fn-cat-card__cart {
    padding: 0.7rem 0.75rem;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fn-cat-hero__img,
  .fn-cat-hero__content,
  .fn-cat-card__img {
    animation: none !important;
    transition: none !important;
  }
}
