.gold-icon {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  filter: var(--gold-icon-filter);
}

.benefit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 102px;
  padding: 9px 7px 10px;
  border: 1px solid var(--color-gold);
  border-radius: 8px;
  background: rgb(5 6 5 / 30%);
  text-align: center;
}

.benefit-card > img {
  width: 26px;
  height: 26px;
}
.benefit-card__content {
  min-width: 0;
}
.benefit-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.15;
}
.benefit-card p {
  margin: 8px 0 0;
  color: #cfcdc8;
  font-size: 12px;
  line-height: 1.1;
}

.profile-card {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--color-gold);
  border-radius: 7px;
  background: #11100c;
  box-shadow: inset 0 0 2px var(--color-gold-subtle);
  transition: box-shadow 300ms ease;
}

.profile-card__link {
  display: grid;
  height: 100%;
  isolation: isolate;
}

.profile-card__photo,
.profile-card__details {
  grid-area: 1 / 1;
}

.profile-card__photo {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 30%;
  z-index: -1;
  transform-origin: center 30%;
  transition: transform 550ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.profile-card__details {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 42% 5px 5px;
  background: linear-gradient(
    transparent 36%,
    rgb(0 0 0 / 28%) 52%,
    rgb(0 0 0 / 94%) 88%
  );
  color: #eeeae3;
  text-shadow: 0 1px 2px #000;
}

.profile-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px 4px;
}

.profile-card__name {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.15;
}

.profile-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  line-height: 1.3;
}

.profile-card__badge img {
  width: 9px;
  height: 9px;
}

.profile-viewed {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border: 1px solid var(--color-gold-subtle);
  border-radius: 4px;
  background: rgb(5 6 5 / 80%);
  color: var(--color-gold);
  font-size: 8px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
}
.profile-viewed img {
  width: 10px;
  height: 10px;
}
.profile-badge {
  position: absolute;
  top: 6px;
  left: 5px;
  z-index: 2;
  width: max-content;
  padding: 4px 5px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: rgb(5 6 5 / 88%);
  color: var(--color-gold);
  white-space: nowrap;
  box-shadow:
    inset 0 0 2px currentColor,
    0 0 3px var(--color-gold-subtle);
  pointer-events: none;
}

.profile-badge--new {
  color: var(--color-new);
  box-shadow:
    inset 0 0 3px rgb(250 127 153 / 50%),
    0 0 6px rgb(250 127 153 / 65%);
}

.profile-badge--offer {
  color: #b8ed80;
  box-shadow:
    inset 0 0 3px rgb(184 237 128 / 50%),
    0 0 6px rgb(184 237 128 / 65%);
}

.profile-card__badge.profile-badge--offer {
  max-width: calc(100% - 29px);
  white-space: normal;
}

.profile-badge img {
  flex-shrink: 0;
}

.profile-price--offer {
  color: #b8ed80;
}
.profile-price__old {
  color: #bdbbb5;
  font-size: 0.75em;
}
.profile-card__meta:has(.profile-price__old),
.reel-card__meta:has(.profile-price__old) {
  white-space: normal;
}

.profile-card__meta,
.profile-card__city {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

.profile-card__city {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
}

.profile-card__city img {
  width: 11px;
  height: 11px;
}

.profile-card__online {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--color-online);
  box-shadow: 0 0 2px rgb(53 217 87 / 55%);
}

.profile-card__favorite {
  position: absolute;
  top: 2px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 20px;
  padding: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.profile-card__favorite img {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 2px #000);
}

.profile-card__link:focus-visible {
  outline-offset: -3px;
}
.profile-card__favorite:focus-visible {
  outline-offset: -2px;
}
.profile-card__favorite:active {
  transform: scale(0.92);
}

.profile-carousel {
  position: relative;
}

.profile-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(130px, calc((100% - 18px) / 4), 144px);
  gap: 6px;
  margin: 0;
  padding: 2px 0;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x pan-y pinch-zoom;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
  cursor: grab;
}

.profile-carousel__track::-webkit-scrollbar {
  display: none;
}
.profile-carousel__track > li {
  min-width: 0;
  aspect-ratio: 7 / 9;
  scroll-snap-align: start;
}
.profile-carousel__track.is-wheel-scrolling {
  scroll-snap-type: none;
}

.profile-carousel__track.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}
.profile-carousel__arrow {
  display: none;
}

.category-carousel__track {
  grid-auto-columns: clamp(80px, 20vw, 110px);
  gap: 9px;
}

.category-carousel__track > li {
  aspect-ratio: auto;
  height: 100px;
}

.category-card {
  display: grid;
  grid-template-rows: 44px 1fr;
  align-items: center;
  justify-items: center;
  gap: 5px;
  height: 100%;
  padding: 10px 6px 8px;
  border: 1px solid var(--color-gold);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 3%), transparent 60%),
    rgb(10 10 8 / 64%);
  color: var(--color-gold);
  text-align: center;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.category-card > img {
  width: 34px;
  height: 34px;
}
.category-card__label {
  max-width: 100%;
  font-size: 14px;
  line-height: 1.04;
  text-wrap: balance;
}
.category-card:focus-visible {
  outline-offset: -4px;
}
.category-card:active {
  opacity: 0.75;
}

@media (hover: hover) {
  .profile-card__favorite:hover {
    background: rgb(0 0 0 / 42%);
  }
  .profile-card:hover {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px color-mix(in srgb, var(--color-gold) 45%, transparent);
  }
  .category-card:hover {
    background-color: var(--color-gold-subtle);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .profile-card:hover .profile-card__photo {
    transform: scale(1.055);
  }
}

@media (min-width: 900px) {
  .benefit-card {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 5px;
    box-shadow: inset 0 0 2px var(--color-gold-subtle);
    text-align: left;
  }
  .benefit-card > img {
    width: 34px;
    height: 34px;
  }
  .benefit-card h3 {
    font-size: 18px;
    font-weight: 500;
  }
  .benefit-card p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.2;
  }
  .benefit-card__mobile-break {
    display: none;
  }

  .profile-carousel__track {
    grid-auto-columns: max(128px, calc((100% - 70px) / 8));
    gap: 10px;
  }
  .profile-carousel__track > li {
    aspect-ratio: 1;
  }
  .profile-card {
    border-radius: 5px;
  }
  .profile-card__details {
    padding: 32% 10px 5px 22px;
  }
  .profile-card__name {
    font-size: 16px;
    font-weight: 500;
  }
  .profile-card__badge {
    font-size: 11px;
  }
  .profile-card__badge img {
    width: 11px;
    height: 11px;
  }
  .profile-card__meta,
  .profile-card__city {
    font-size: 12px;
    margin-top: 2px;
  }
  .profile-card__meta {
    order: 3;
  }
  .profile-card__city img {
    display: none;
  }
  .profile-card__online {
    position: absolute;
    left: 8px;
    bottom: 25px;
    width: 8px;
    height: 8px;
  }
  .profile-card__favorite {
    top: 3px;
    right: 3px;
    width: 25px;
    height: 25px;
  }
  .profile-card__favorite img {
    width: 16px;
    height: 16px;
  }
  .profile-carousel__arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 32px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    transform: translateY(-50%);
  }
  .profile-carousel__arrow--previous {
    left: -36px;
  }
  .profile-carousel__arrow--next {
    right: -36px;
  }
  .profile-carousel__arrow--previous img {
    transform: rotate(90deg);
  }
  .profile-carousel__arrow--next img {
    transform: rotate(-90deg);
  }
  .profile-carousel__arrow:disabled {
    opacity: 0.35;
    cursor: default;
  }
  .profile-carousel__arrow:active:not(:disabled) {
    opacity: 0.65;
  }
  .profile-carousel__arrow:hover:not(:disabled) {
    background: var(--color-gold-subtle);
  }
  .category-carousel__track {
    grid-auto-columns: max(100px, calc((100% - 140px) / 15));
    gap: 10px;
  }
  .category-carousel__track > li {
    height: 100px;
  }
  .category-card {
    grid-template-rows: 28px 1fr;
    gap: 3px;
    padding: 12px 8px;
    border-radius: 5px;
  }
  .category-card > img {
    width: 28px;
    height: 28px;
  }
  .category-card__label {
    font-size: 14px;
    line-height: 1.05;
  }
}

@media (min-width: 1100px) and (max-width: 1280px) {
  .profile-carousel__arrow {
    width: 24px;
  }
  .profile-carousel__arrow--previous {
    left: -24px;
  }
  .profile-carousel__arrow--next {
    right: -24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-card,
  .profile-card__photo,
  .profile-card__favorite {
    transition: none;
  }

  .category-card {
    transition: none;
  }
}

/* Compact editorial cards share photos, favorites, and hover behavior. */
.profile-card.profile-card--compact {
  height: auto;
  aspect-ratio: 0.67;
  border-radius: 6px;
}
.profile-card--compact .profile-card__details {
  padding: 50% 5px 7px;
  background: linear-gradient(
    transparent 35%,
    rgb(0 0 0 / 20%) 55%,
    rgb(0 0 0 / 95%) 96%
  );
}
.profile-card--compact .profile-card__heading {
  display: block;
}
.profile-card--compact .profile-card__name {
  overflow: hidden;
  font-size: clamp(8px, 2.8vw, 14px);
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-card--compact .profile-card__city {
  gap: 3px;
  margin-top: 4px;
  font-size: clamp(7px, 2vw, 12px);
}
.profile-card--compact .profile-card__city img {
  display: block;
  width: 10px;
  height: 12px;
}
.profile-card--compact .profile-card__favorite {
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
}
.profile-card--compact .profile-card__favorite img {
  width: 17px;
  height: 17px;
}
@media (min-width: 900px) {
  .profile-card.profile-card--compact {
    aspect-ratio: 1.8;
  }
  .profile-card--compact .profile-card__photo {
    width: 68%;
    object-position: center 30%;
  }
  .profile-card--compact .profile-card__details {
    padding: 12px 6px 8px 52%;
    background: linear-gradient(
      90deg,
      transparent 25%,
      rgb(0 0 0 / 30%) 40%,
      rgb(0 0 0 / 95%) 65%
    );
  }
  .profile-card--compact .profile-card__name {
    font-size: clamp(9px, 0.9vw, 13px);
    white-space: normal;
  }
  .profile-card--compact .profile-card__city {
    font-size: clamp(8px, 0.85vw, 12px);
  }
  .profile-card--compact .profile-card__city img {
    width: 10px;
    height: 12px;
  }
  .profile-card--compact .profile-card__favorite {
    top: 3px;
    right: 4px;
  }
}

@media (min-width: 900px) and (max-width: 1099px) {
  .profile-card.profile-card--compact {
    aspect-ratio: 1.5;
  }
}

/* Shared photo indicators for gallery cards and the profile modal. */
.card-photos__dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}
.card-photos__dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9d9d9;
}
.card-photos__dot[aria-pressed="true"]::after {
  width: 10px;
  height: 10px;
  border: 1.5px solid #d52c51;
  background: #fff;
}
