/* "Recent winners" photo strip + lightbox (inc/recent-winners.php). */
.otg-recent-winners {
  margin: 1.25rem 0 0;
}
.otg-recent-winners--product { margin-top: 1rem; }
.otg-recent-winners__title {
  margin: 0 0 0.6rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #14263a;
}
.otg-recent-winners__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 576px) {
  .otg-recent-winners__list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.otg-recent-winners__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e7e1f5;
  border-radius: 10px;
  background: #fff;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(20, 38, 58, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.otg-recent-winners__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.otg-recent-winners__thumb:hover,
.otg-recent-winners__thumb:focus-visible {
  transform: translateY(-2px);
  border-color: #6d28d9;
  outline: none;
}

/* Competition page: under the image column on desktop (WooCommerce floats the
 * gallery left and the summary right at 768px and up). */
@media (min-width: 768px) {
  .woocommerce div.product .otg-recent-winners--product {
    float: left;
    clear: left;
    width: 48%;
    margin-top: 0; /* the gallery's own bottom margin gives the gap */
    margin-bottom: 1.75rem; /* room before the meta bar when this column is the taller one */
  }
  /* Whatever follows (meta bar, info card, related products) starts below
   * both columns, however tall the gallery and the row make the left one. */
  .woocommerce div.product .otg-recent-winners--product ~ * {
    clear: both;
  }
}

/* Lightbox */
.otg-rw-box {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 56px 16px 20px;
  background: rgba(10, 14, 26, 0.92);
}
.otg-rw-box[hidden] { display: none; }
.otg-rw-box__img {
  max-width: min(100%, 1000px);
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.otg-rw-box__caption {
  margin: 14px 0 0;
  max-width: 760px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  line-height: 1.45;
}
.otg-rw-box__count {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}
.otg-rw-box__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.otg-rw-box__btn:hover,
.otg-rw-box__btn:focus-visible { background: #6d28d9; outline: none; }
.otg-rw-box__close { top: 12px; right: 12px; }
.otg-rw-box__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.otg-rw-box__next { right: 12px; top: 50%; transform: translateY(-50%); }
body.otg-rw-open { overflow: hidden; }
.otg-rw-box__btn[hidden] { display: none; }
