/* Live product cards on the world pages ("Sản phẩm từ cửa hàng" block, world-products.js).
   Built from the landing page's vocabulary: world-tile frame and veil, gilt hairline, hoa chanh
   rosettes in the corners on hover, serif names, gold prices, lacquer buttons. */

.wpp {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.wpp-group__name {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--lacquer);
}

.wpp-group__name::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(227, 189, 118, 0.35), transparent);
}

.wpp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.wpp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 1.05rem;
  overflow: hidden;
  border: 1px solid rgba(232, 224, 212, 0.12);
  background: linear-gradient(165deg, rgba(40, 38, 34, 0.92) 0%, rgba(26, 24, 22, 0.88) 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out), border-color 0.6s;
}

.wpp-card:hover,
.wpp-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(227, 189, 118, 0.38);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 64px rgba(212, 96, 63, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.wpp-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1a100b;
}

.wpp-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter 0.8s;
  filter: saturate(0.92);
}

.wpp-card:hover .wpp-card__media img {
  transform: scale(1.07);
  filter: saturate(1.05);
}

.wpp-card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(20, 12, 8, 0.78) 100%);
  pointer-events: none;
}

/* Gilt frame: a hairline with hoa chanh rosettes in the corners and a lá đề band at the foot */
.wpp-card__frame {
  position: absolute;
  inset: 0.6rem;
  border: 1px solid rgba(227, 189, 118, 0.55);
  border-radius: 0.7rem;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
  background-image: url("/heritage/assets/motif-rosette.svg"), url("/heritage/assets/motif-rosette.svg"),
    url("/heritage/assets/motif-rosette.svg"), url("/heritage/assets/motif-rosette.svg");
  background-repeat: no-repeat;
  background-size: 1.1rem 1.1rem;
  background-position: -0.55rem -0.55rem, calc(100% + 0.55rem) -0.55rem, -0.55rem calc(100% + 0.55rem),
    calc(100% + 0.55rem) calc(100% + 0.55rem);
}

.wpp-card__frame::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -0.32rem;
  height: 0.62rem;
  background: url("/heritage/assets/motif-la-de-band.svg") repeat-x center / auto 0.62rem;
}

.wpp-card:hover .wpp-card__frame,
.wpp-card:focus-within .wpp-card__frame {
  opacity: 1;
  transform: none;
}

.wpp-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.15rem 1.15rem;
}

.wpp-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.2;
}

.wpp-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.wpp-card__title a:hover {
  color: var(--amber);
}

.wpp-card__note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
  opacity: 0.8;
}

.wpp-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(227, 189, 118, 0.14);
}

.wpp-card__price {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.wpp-card__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wpp-card__add.btn {
  padding: 0.55rem 1.05rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.wpp-card__add.is-added {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
}

.wpp-card__more {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0.8;
}

.wpp-card__more:hover {
  color: var(--amber);
  opacity: 1;
}

.wpp-card__soldout {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.6;
}

.wpp-empty {
  margin: 0;
  padding: 1.5rem;
  border: 1px dashed rgba(227, 189, 118, 0.22);
  border-radius: 0.9rem;
  text-align: center;
  color: var(--ink-soft);
  opacity: 0.75;
}

.wpp-all {
  margin: 0;
  text-align: center;
}

.wpp-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(227, 189, 118, 0.35);
  border-radius: 0.9rem;
  background: rgba(24, 15, 10, 0.95);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.wpp-toast.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.wpp-toast.is-error {
  border-color: rgba(212, 96, 63, 0.6);
}

.wpp-toast a {
  color: var(--amber);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .wpp-card,
  .wpp-card__media img,
  .wpp-card__frame {
    transition: none;
  }
}
