/* Inset rainbow trim stays within the card boundary. */
.amp-storefront .grid .card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-width: 0;
  padding: 2px;
  box-shadow: 0 6px 18px rgba(3, 6, 13, .5);
}
.amp-storefront .grid .card > .visual {
  overflow: hidden;
  border-radius: 11px;
}
.amp-storefront .grid .card::before,
.amp-storefront .grid .card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}
.amp-storefront .grid .card::before {
  background: linear-gradient(125deg, rgba(255, 255, 255, .28), transparent 46%, rgba(9, 14, 24, .25)), currentColor;
}
.amp-storefront .grid .card::after { content: none; }
/* The title and inset trim share one color cycle. */
.amp-storefront .grid .card:nth-child(7n+2) { --card-rainbow-delay: -0.086s; }
.amp-storefront .grid .card:nth-child(7n+3) { --card-rainbow-delay: -0.171s; }
.amp-storefront .grid .card:nth-child(7n+4) { --card-rainbow-delay: -0.257s; }
.amp-storefront .grid .card:nth-child(7n+5) { --card-rainbow-delay: -0.343s; }
.amp-storefront .grid .card:nth-child(7n+6) { --card-rainbow-delay: -0.429s; }
.amp-storefront .grid .card:nth-child(7n+7) { --card-rainbow-delay: -0.514s; }
.amp-storefront .grid .card::before,
.amp-storefront .grid .card .card-copy h2,
.amp-storefront .grid .card .card-copy h2 a {
  color: #70dcff;
  animation: bursa-title-tone 0.6s ease-in-out var(--card-rainbow-delay, 0s) infinite;
}
@keyframes bursa-title-tone {
  0%, 100% { color: #ff657c; }
  14.286% { color: #ffae61; }
  28.571% { color: #ffe677; }
  42.857% { color: #6fe9a0; }
  57.143% { color: #70dcff; }
  71.429% { color: #999aff; }
  85.714% { color: #ed91ff; }
}
@media (prefers-reduced-motion: reduce) {
  .amp-storefront .grid .card::before,
  .amp-storefront .grid .card .card-copy h2,
  .amp-storefront .grid .card .card-copy h2 a { animation: none; }
}
.amp-storefront .grid .card .gallery-open,
.amp-storefront .grid .card .photo-count {
  color: #fff0d7;
  background: rgba(9, 14, 24, .86);
  border: 1px solid rgba(234, 201, 158, .58);
  border-radius: 999px;
  letter-spacing: .015em;
}
.amp-storefront .grid .card .gallery-open:focus-visible {
  outline: 2px solid #f0cb96;
  outline-offset: 2px;
}
