/* ============================================================
   Section 3 — Trending Products
   Featured editorial card + 2x2 product grid, driven by
   data/products.json (development sample catalog).
   ============================================================ */

.trending {
  position: relative;
  background: var(--gj-ivory);
  padding: 76px 0 84px;
  overflow: hidden;
}

/* ---------- Botanical decoration ---------- */

.trending__botanical {
  position: absolute;
  top: 34px;
  width: clamp(84px, 8vw, 124px);
  color: var(--gj-gold-600);
  opacity: 0.13;
  pointer-events: none;
}

.trending__botanical--left {
  left: 16px;
}

.trending__botanical--right {
  right: 16px;
  transform: scaleX(-1);
}

/* ---------- Section header ---------- */

.trending__header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: 20px;
}

.trending__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-family: var(--gj-font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gj-plum);
}

.trending__eyebrow::before,
.trending__eyebrow::after {
  content: "";
  width: clamp(50px, 4.6vw, 70px);
  height: 1px;
  background: rgba(184, 145, 53, 0.55);
}

.trending__title {
  margin: 14px 0 0;
  font-family: var(--gj-font-display);
  font-size: clamp(58px, 6vw, 90px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--gj-mehroon-700);
}

.trending__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--gj-ochre);
}

.trending__lede {
  max-width: 690px;
  margin: 16px 0 0;
  font-family: var(--gj-font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--gj-muted);
}

/* ---------- Stage ---------- */

.trending__inner {
  position: relative;
  z-index: 1;
  width: calc(100% - 40px);
  max-width: 1510px;
  margin: 40px auto 0;
}

.trending__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.trending__grid[hidden] {
  display: none !important;
}

.trending__small {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  min-width: 0;
}

.trending__fallback {
  margin: 0;
  padding: 70px 24px;
  text-align: center;
  font-family: var(--gj-font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-style: italic;
  font-weight: 500;
  color: var(--gj-mehroon-700);
}

.trending__fallback[hidden] {
  display: none !important;
}

/* ---------- Skeletons ---------- */

.tp-skeleton {
  background: linear-gradient(90deg, #f5ebdd 25%, #fff9ef 50%, #f5ebdd 75%);
  background-size: 200% 100%;
  animation: tp-shimmer 1.5s linear infinite;
  border-radius: 3px;
}

@keyframes tp-shimmer {
  to {
    background-position: -200% 0;
  }
}

.tp-skel--featured {
  min-height: 470px;
  border: 1px solid rgba(184, 145, 53, 0.22);
}

.trending__small .tp-skel {
  min-height: 300px;
  border: 1px solid rgba(184, 145, 53, 0.2);
}

.no-js .trending__grid {
  display: none;
}

/* ---------- Shared card bits ---------- */

.tp-kicker {
  margin: 0;
  font-family: var(--gj-font-sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gj-gold-700);
}

.tp-price {
  font-family: var(--gj-font-display);
  font-weight: 600;
  color: var(--gj-mehroon-700);
  line-height: 1;
}

.tp-picture {
  display: block;
  height: 100%;
}

.tp-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tp-wish {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(184, 145, 53, 0.35);
  border-radius: 50%;
  background: rgba(255, 249, 239, 0.95);
  color: var(--gj-mehroon-700);
  cursor: default;
  opacity: 0.96;
}

.tp-wish:disabled {
  opacity: 0.96;
}

.tp-imgfb {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--gj-cream);
  color: var(--gj-gold-700);
}

.tp-imgfb span {
  font-family: var(--gj-font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gj-mehroon-700);
}

/* ---------- Featured card ---------- */

.tp-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(184, 145, 53, 0.35);
  border-radius: 3px;
  background: var(--gj-ivory);
  overflow: hidden;
}

.tp-featured__media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--gj-cream);
}

.tp-featured__info {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  padding: 24px 22px;
  background: var(--gj-ivory);
}

.tp-featured__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tp-featured__title {
  margin: 8px 0 0;
  font-family: var(--gj-font-display);
  font-size: 33px;
  font-weight: 600;
  line-height: 1;
  color: var(--gj-mehroon-700);
}

.tp-featured__title a {
  color: inherit;
  text-decoration: none;
}

.tp-price--featured {
  margin-top: 10px;
  font-size: 26px;
}

.tp-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  margin-top: 18px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--gj-mehroon-700);
  color: var(--gj-ivory);
  font-family: var(--gj-font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 240ms var(--gj-ease);
}

.tp-btn:hover {
  background: var(--gj-mehroon-800);
}
.tp-featured__aside {
  border-left: 1px solid rgba(184, 145, 53, 0.35);
  padding-left: 28px;
}

.tp-featured__desc {
  margin: 2px 0 0;
  font-family: var(--gj-font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--gj-muted);
}

/* ---------- Small product cards ---------- */

.tp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(184, 145, 53, 0.32);
  border-radius: 3px;
  background: var(--gj-ivory);
  overflow: hidden;
}

.tp-card__media {
  position: relative;
  height: 174px;
  overflow: hidden;
  background: var(--gj-cream);
}

.tp-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 14px;
}

.tp-card__title {
  margin: 6px 0 0;
  font-family: var(--gj-font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.05;
  color: var(--gj-mehroon-700);
}

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

/* stretched link — whole card is clickable */
.tp-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tp-card__bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.tp-price--small {
  font-size: 18.5px;
}

.tp-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--gj-font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gj-mehroon-700);
  position: relative;
}

.tp-card__cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tp-card__cta svg {
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- View all ---------- */

.trending__view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

.trending__view-all[hidden] {
  display: none !important;
}

.trending__rule {
  width: clamp(40px, 4vw, 64px);
  height: 1px;
  background: rgba(184, 145, 53, 0.55);
}

.trending__view-all a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--gj-font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gj-mehroon-700);
}

.trending__view-all a svg {
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.trending__view-all a:hover svg {
  transform: translateX(5px);
}

.trending__view-all a:focus-visible,
.tp-btn:focus-visible,
.tp-featured__title a:focus-visible,
.tp-card__title a:focus-visible {
  outline: 2px solid var(--gj-gold-600);
  outline-offset: 4px;
}

.trending__ornament {
  color: var(--gj-gold-600);
}

/* ---------- Hover ---------- */

@media (hover: hover) and (pointer: fine) {
  .tp-featured:hover .tp-picture img,
  .tp-card:hover .tp-picture img {
    transform: scale(1.025);
  }

  .tp-card:hover .tp-card__cta svg {
    transform: translateX(4px);
  }

  .tp-card:hover .tp-card__cta::after {
    transform: scaleX(1);
  }
}

/* ---------- Reveal ---------- */

.js .trending__header [data-reveal] {
  transform: translateY(12px);
}

.js .tp-featured[data-reveal],
.js .tp-card[data-reveal] {
  transform: translateY(16px);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .trending__header [data-reveal],
  .js .tp-featured[data-reveal],
  .js .tp-card[data-reveal] {
    transform: none;
  }

  .tp-skeleton {
    animation: none;
    background: #f5ebdd;
  }

  .tp-picture img,
  .tp-card__cta svg,
  .tp-card__cta::after,
  .tp-btn {
    transition: none;
  }
}

/* ============================================================
   Desktop >= 1100
   ============================================================ */

@media (min-width: 1100px) {
  .trending {
    padding: 105px 0 110px;
  }

  .trending__header {
    margin-top: 6px;
  }

  .trending__inner {
    width: calc(100% - 80px);
    margin-top: 48px;
  }

  .trending__grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 18px;
    min-height: calc((min(1510px, 100vw - 80px) - 18px) / 2.05 / 1.08);
  }

  .trending__small {
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .tp-featured__info {
    padding: 26px 28px;
    gap: 28px;
  }

  .tp-featured__title {
    font-size: 34px;
    letter-spacing: -0.01em;
  }

  .tp-price--featured {
    font-size: 28px;
    margin-top: 10px;
  }

  .tp-btn {
    height: 52px;
    padding: 0 28px;
    margin-top: 16px;
  }

  .tp-kicker {
    font-size: 10.5px;
    letter-spacing: 0.18em;
  }

  .tp-card__media {
    height: 190px;
  }

  .tp-card__info {
    padding: 12px 18px 14px;
  }

  .tp-card__title {
    margin-top: 4px;
    font-size: 27px;
  }

  .tp-card__bottom {
    padding-top: 8px;
  }

  .tp-price--small {
    font-size: 24px;
  }

  .tp-card__cta {
    font-size: 11px;
  }
}

/* ============================================================
   Tablet 768–1099
   ============================================================ */

@media (min-width: 768px) and (max-width: 1099px) {
  .trending {
    padding: 92px 0 96px;
  }

  .trending__inner {
    width: calc(100% - 48px);
    margin-top: 44px;
  }

  .trending__grid {
    gap: 16px;
  }

  .tp-featured {
    min-height: 560px;
  }

  .tp-featured__info {
    padding: 28px 30px;
    gap: 26px;
  }

  .tp-featured__title {
    font-size: 36px;
  }

  .tp-price--featured {
    font-size: 27px;
  }

  .tp-btn {
    height: 52px;
    padding: 0 28px;
  }

  .tp-card__media {
    height: 200px;
  }

  .tp-card__title {
    font-size: 25px;
  }

  .tp-price--small {
    font-size: 23px;
  }

  .trending__small {
    gap: 16px;
  }

  .trending__small .tp-skel {
    min-height: 330px;
  }

  .tp-skel--featured {
    min-height: 560px;
  }
}

/* ============================================================
   Mobile <= 767
   ============================================================ */

@media (max-width: 767px) {
  .trending__eyebrow {
    font-size: 10px;
    letter-spacing: 0.26em;
    gap: 12px;
  }

  .trending__title {
    font-size: clamp(48px, 13.4vw, 54px);
    max-width: 340px;
  }

  .trending__lede {
    font-size: 14px;
    max-width: 420px;
  }

  .trending__botanical {
    top: 22px;
    width: 72px;
  }

  .tp-featured__media {
    flex: 0 0 auto;
    height: 330px;
  }

  .tp-featured__info {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 22px 20px 24px;
  }

  .tp-featured__main {
    display: contents;
  }

  .tp-featured__title {
    font-size: 34px;
    margin-top: 8px;
  }

  .tp-price--featured {
    font-size: 26px;
    margin-top: 12px;
  }

  .tp-featured__aside {
    order: 1;
    border-left: 0;
    border-top: 1px solid rgba(184, 145, 53, 0.3);
    padding: 14px 0 0;
    margin-top: 16px;
  }

  .tp-btn {
    order: 2;
    align-self: flex-start;
    margin-top: 20px;
  }

  .tp-card__media {
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .tp-card__title {
    font-size: 18px;
  }

  .tp-kicker {
    font-size: 8.5px;
    letter-spacing: 0.15em;
  }

  .tp-price--small {
    font-size: 17.5px;
  }

  .tp-card__cta-text {
    display: none;
  }

  .tp-wish {
    top: 10px;
    right: 10px;
  }

  .tp-skel--featured {
    min-height: 560px;
  }

  .trending__view-all {
    margin-top: 30px;
    gap: 12px;
  }
}
