/* ==========================================================================
   Game Product Page — 3-column layout for disc-based games
   Only loaded when body.rp-game-product is present.
   ========================================================================== */

/* ---------- Layout ---------- */

body.rp-game-product .site-content {
  padding: 0;
}

body.rp-game-product div.rp-game-product {
  width: 100%;
}

.rp-game-product__topbar {
  padding: 8px 30px;
}

.rp-game-product__topbar .woocommerce-breadcrumb {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 14px;
  color: var(--primary-text);
  font-weight: 500;
}

.rp-game-product__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  padding: 30px;
}

.rp-game-product__main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 30px;
  align-self: start;
}

/* ---------- Column 1: Gallery + Trust badges ---------- */

.rp-game-product__col1 {
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rp-game-product__gallery {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
}

/* Custom game gallery */

.rp-game-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rp-game-gallery__main {
  background-color: #f8f8f8;
  border-radius: 8px;
  overflow: clip;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.rp-game-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (hover: hover) and (pointer: fine) {
  .rp-game-gallery__main {
    background-size: 200%;
    background-position: var(--zoom-bg-pos, center);
    background-repeat: no-repeat;
  }

  .rp-game-gallery__main.is-zoomed .rp-game-gallery__main-img {
    opacity: 0;
  }
}

.rp-game-gallery__thumbs {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rp-game-gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.rp-game-gallery__thumb {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
  padding: 8px;
  background-color: #f8f8f8;
  border: none;
  outline: 2px solid transparent;
  outline-offset: -2px;
  border-radius: 6px;
  cursor: pointer;
  transition: outline-color 0.2s ease-in-out;
}

.rp-game-gallery__thumb:hover,
.rp-game-gallery__thumb:focus {
  background: #f8f8f8;
}

.rp-game-gallery__thumb.is-active,
.rp-game-gallery__thumb:focus {
  outline: 2px solid var(--primary) !important;
}

.rp-game-gallery__thumb:focus-visible {
  outline-color: var(--primary);
  outline-width: 3px;
}

.rp-game-gallery__thumb-img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

/* ---------- Column 2: Details / Wizard ---------- */

.rp-game-product__details {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rp-game-product__details-header {
  aspect-ratio: 1 / 1.2;
  display: flex;
  flex-direction: column;
}

.rp-game-product__platform-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 99px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.rp-game-product__title {
  font-size: 30px;
  line-height: 36px;
  margin-bottom: 0px;
  color: var(--primary-text);
}

.rp-game-product__title--mobile {
  display: none;
}

.rp-game-product__variant-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: #fff;
  background-color: #1a1a1a;
  border-radius: 8px;
  align-self: flex-start;
  margin-top: 4px;
}

/* Star rating */
.rp-game-product__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.rp-game-product__rating-stars {
  display: flex;
  color: #facc15;
  --rp-star-empty: #d1d5db;
}

.rp-game-product__rating-stars .rp-star {
  width: 20px;
  height: 20px;
}

.rp-game-product__rating-stars .rp-star--empty {
  color: #d4d4d4;
}

.rp-game-product__rating-stars .rp-star--empty path {
  fill: var(--rp-star-empty);
}

.rp-game-product__rating-stars .rp-star-stop--empty {
  stop-color: var(--rp-star-empty);
}

.rp-game-product__rating-text {
  font-size: 14px;
  line-height: 20px;
  color: #666;
}

/* ---------- Wizard Steps ---------- */

.rp-game-wizard__steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
}

.rp-game-wizard__step {
  margin-top: 32px;
}

.rp-game-wizard__step:nth-child(3) {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rp-game-wizard__step-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Wizard pills */
.rp-game-wizard__pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 384px;
}

.rp-game-wizard__pill {
  padding: 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--primary-text);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.rp-game-wizard__pill:hover,
.rp-game-wizard__pill:focus {
  box-shadow: inset 0 0 0 1px var(--border-hover);
  color: var(--primary-text);
  background-color: #fff;
}

.rp-game-wizard__pill.is-active {
  box-shadow: inset 0 0 0 2px var(--primary);
  background-color: color-mix(in srgb, var(--primary) 5%, transparent);
}

.rp-game-wizard__pill.is-hidden {
  display: none;
}

.rp-game-wizard__pill:disabled {
  color: color-mix(in srgb, var(--primary-text) 30%, transparent);;
  cursor: not-allowed;
}

.rp-game-wizard__pill.is-unavailable {
  text-decoration: line-through;
}

.rp-game-wizard__pill:hover:disabled {
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Content explainer box */
.rp-game-wizard__explainer {
  background: #f0faf0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 16px;
}

.rp-game-wizard__explainer-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.rp-game-wizard__explainer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-text);
}

.rp-game-wizard__explainer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rp-game-wizard__explainer-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--primary-text);
  margin: 0;
}

.rp-game-wizard__explainer-list li[data-included="true"] .rp-game-wizard__check-icon::before {
  content: "\2713";
  color: #0d8911;
  font-weight: 700;
}

.rp-game-wizard__explainer-list li[data-included="false"] .rp-game-wizard__check-icon::before {
  content: "\2717";
  color: #cc3333;
  font-weight: 700;
}

.rp-game-wizard__explainer-list li[data-included="false"] {
  opacity: 0.5;
  text-decoration: line-through;
}

.rp-game-wizard__explainer-list li .rp-game-wizard__check-icon {
  padding-top: 2px;
  line-height: 0;
}

/* Stand cards */
.rp-game-wizard__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  /* max-width: 384px; */
}

.rp-game-wizard__step:nth-child(3) .rp-game-wizard__cards {
  flex: 1;
}

.rp-game-wizard__stand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.rp-game-wizard__stand-card:hover,
.rp-game-wizard__stand-card:focus {
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--border-hover);
}

.rp-game-wizard__stand-card.is-active {
  box-shadow: inset 0 0 0 2px var(--primary);
  background-color: color-mix(in srgb, var(--primary) 5%, transparent);
}

.rp-game-wizard__stand-card.is-hidden {
  display: none;
}

.rp-game-wizard__stand-name {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--primary-text);
}

.rp-game-wizard__stand-stars {
  display: flex;
  gap: 2px;
  margin-top: 4px;
  color: var(--button-primary);
}

.rp-game-wizard__stand-stars .rp-star {
  width: 16px;
  height: 16px;
}

.rp-game-wizard__stand-stars .rp-star--empty {
  color: var(--rp-star-empty, #d4d4d4);
}

.rp-game-wizard__stand-stars .rp-star--empty path {
  fill: var(--rp-star-empty, #d4d4d4);
}

.rp-game-wizard__stand-stock {
  font-size: 14px;
  line-height: 20px;
  margin-top: 8px;
  color: #666
}

.rp-game-wizard__stand-price span.price {
  display: flex;
  flex-direction: column-reverse;
  font-size: 20px !important;
  line-height: 30px;
  font-weight: 700;
  margin-top: 12px;
  color: var(--primary-text) !important;
}

.rp-game-wizard__stand-price span.price del {
  font-size: 14px;
  line-height: 20px;
  color: #999;
  opacity: 1 !important;
}

.rp-game-wizard__info-panel {
  margin-top: auto;
}

/* Condition info bar */
.rp-game-wizard__condition-bar {
  margin-top: 16px;
}

.rp-game-wizard__condition-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s;
}

.rp-game-wizard__condition-link:hover,
.rp-game-wizard__condition-link:focus {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
}

.rp-game-wizard__condition-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--primary);
}

.rp-game-wizard__condition-text {
  flex: 1;
  font-size: 14px;
  line-height: 20px;
  color: var(--primary-text);
}

.rp-game-wizard__condition-text strong {
  display: block;
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 4px;
}

.rp-game-wizard__condition-chevron {
  flex: 0 0 auto;
  margin: auto 0;
  color: #999;
}

/* ---------- Column 3: Sticky Sidebar ---------- */

.rp-game-product__sidebar {
  position: relative;
}

.rp-game-product__sidebar-inner {
  /* position: sticky; */
  /* top: 30px; */
  height: 100%;
  display: flex;
  flex-direction: column;
}

.rp-game-product__price-info {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 20px;
  min-height: 578px;
  display: flex;
  flex-direction: column;
}

/* Price */
.rp-game-product__price {
  font-size: 32px !important;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--primary-text) !important;
  margin-bottom: 0;
}

.rp-game-product__price span.price {
  font-size: 32px !important;
  line-height: 1.1;
  font-weight: 700;
  color: var(--primary-text) !important;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.rp-game-product__price del {
  font-size: 20px;
  color: #999;
  font-weight: 500;
  order: 100;
  opacity: 1 !important;
}

.rp-game-product__price ins {
  text-decoration: none;
}

/* Stock line */
.rp-game-product__stock-line {
  font-size: 14px;
  font-weight: 600;
  color: var(--button-primary);
  margin-top: 4px;
}

/* Cart form styling within sidebar */
.rp-game-product__cart-form {
  margin-top: 16px;
}

.rp-game-product__cart-form form.cart {
  margin-bottom: 0 !important;
}

.rp-game-product__cart-form table.variations {
  display: none;
}

.rp-game-product__cart-form .woocommerce-variation-add-to-cart,
.rp-game-product__cart-form .single_add_to_cart_button_wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-game-product__cart-form .quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}

.rp-game-product__cart-form .quantity .rp-game-qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #fff;
  border: none;
  cursor: pointer;
  color: var(--primary-text);
  user-select: none;
  transition: background-color 0.15s;
}

.rp-game-product__cart-form .quantity .rp-game-qty-btn:hover {
  background: #f5f5f5;
}

.rp-game-product__cart-form .quantity input.qty {
  flex: 1;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  height: 44px;
  -moz-appearance: textfield;
  width: 100%;
}

.rp-game-product__cart-form .quantity input.qty::-webkit-outer-spin-button,
.rp-game-product__cart-form .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.rp-game-product .rp-game-product__cart-form .single_add_to_cart_button {
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px !important;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: #fff !important;
  background: var(--button-primary) !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}

body.rp-game-product .rp-game-product__cart-form .single_add_to_cart_button:hover {
  background: var(--button-primary-hover) !important;
}

body.rp-game-product .rp-game-product__cart-form .single_add_to_cart_button:disabled {
  background: #ccc !important;
  cursor: not-allowed;
  opacity: 1;
}

.rp-game-product__cart-form .woocommerce-variation-price,
.rp-game-product__cart-form .woocommerce-variation-availability,
.rp-game-product__cart-form .rp-summary__price-label,
.rp-game-product__cart-form .rp-summary__stock-label {
  display: none;
}

/* Wishlist */
.rp-game-product__wishlist {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  line-height: 24px;
  color: var(--primary-text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: border-color 0.15s;
  margin-top: 12px;
  height: auto;
}

.rp-game-product__wishlist:hover {
  border-color: #999;
}

/* Game info (Om spillet) */
.rp-game-product__game-info {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
}

.rp-game-product__game-info-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--primary-text);
}

.rp-game-product__game-info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-size: 14px;
  line-height: 20px;
  margin: 0;
}

.rp-game-product__game-info-list dt {
  color: #666;
  font-weight: 400;
}

.rp-game-product__game-info-list dd {
  color: var(--primary-text);
  margin: 0;
}

/* ---------- Below the fold ---------- */

.rp-game-product__below-fold {
  padding: 0 30px 30px;
}

.rp-game-product__below-fold .rp-card {
  border: 1px solid var(--border);
  padding: 30px;
  margin-top: 30px;
}

.rp-game-product__below-fold .rp-card__title {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 16px;
}

.rp-game-product__below-fold .rp-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.rp-game-product__below-fold .rp-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Out of stock ---------- */

.rp-game-product__grid--oos [data-wizard-step] {
  display: none;
}

.rp-game-wizard__oos {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-top: 16px;
}

.rp-game-wizard__oos-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #ef4444;
}

.rp-game-wizard__oos strong {
  display: block;
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 4px;
  color: var(--primary-text);
}

.rp-game-wizard__oos p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--primary-text);
}

.rp-game-product__sidebar-oos {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 12px;
}

.rp-game-product__sidebar-oos-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}

.rp-game-product__cart-form--hidden {
  display: none;
}

/* ---------- Responsive: Tablet (≤ 1200px) ---------- */

@media (max-width: 1200px) {
  .rp-game-product__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rp-game-product__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rp-game-product__details-header {
    aspect-ratio: 1 / 1;
  }

  .rp-game-product__sidebar-inner {
    /* position: static; */
  }
}

/* ---------- Responsive: Mobile (≤ 768px) ---------- */

@media (max-width: 768px) {
  .rp-game-product__topbar {
    padding: 8px 16px;
  }

  .rp-game-product__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .rp-game-product__title--mobile {
    display: block;
  }

  .rp-game-product__details-header .rp-game-product__title {
    display: none;
  }

  .rp-game-product__main {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rp-game-gallery__thumb {
    width: 80px;
    height: 80px;
  }

  .rp-game-gallery__thumb-img {
    width: 60px;
  }

  .rp-game-product__sidebar-inner {
    /* position: static; */
  }

  .rp-game-product__price-info {
    padding: 20px 16px;
  }

  .rp-game-product__price span.price,
  .rp-game-product__price {
    font-size: 26px;
  }

  .rp-game-product__trust-item {
    padding-inline: 0;
    border: none;
  }

  .rp-game-product__details-header {
    aspect-ratio: auto;
  }

  .rp-game-wizard__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rp-game-wizard__explainer-inner {
    flex-direction: column;
  }

  .rp-game-product__game-info {
    padding: 16px;
  }

  .rp-game-product__below-fold {
    padding: 0 20px 20px;
  }

  .rp-game-product__below-fold .rp-card {
    padding: 20px 16px;
    margin-top: 20px;
  }

  .rp-game-product__below-fold .rp-card__title {
    font-size: 20px;
  }
}
