/* Shortcode pre-order list */
.kpm-preorders { max-width: 960px; margin: 0 auto; }

.kpm-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.kpm-search {
  flex: 1 1 auto;
  min-width: 180px;
  max-width: 320px;
}
.kpm-search input[type="search"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}
.kpm-plat-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.kpm-plat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s;
}
.kpm-plat-btn:hover { border-color: #1a73e8; }
.kpm-plat-btn.active { border-color: #1a73e8; box-shadow: 0 0 0 1px #1a73e8; }
.kpm-plat-btn img { display: block; }

.kpm-filters select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  min-width: 180px;
  width: auto;
  margin-left: auto;
}

.kpm-list { transition: opacity .2s; }
.kpm-list.kpm-loading { opacity: .4; pointer-events: none; }
.kpm-empty { padding: 30px; text-align: center; color: #777; }

.kpm-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid #eee;
  background: #fff;
}
.kpm-row:hover { background: #fafafa; }

.kpm-image { flex: 0 0 150px; position: relative; }
.kpm-image img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  background: #f8fafc;
}

.kpm-info { flex: 1 1 auto; min-width: 0; }
.kpm-title { margin: 0 0 4px; font-size: 16px; line-height: 1.2; }
.kpm-title a { text-decoration: none; color: inherit; }
.kpm-hook {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kpm-platform, .kpm-release { flex: 0 0 110px; font-size: 13px; margin-top: 2px; }
.kpm-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #999;
  margin-bottom: 4px;
}
.kpm-plat-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.kpm-plat-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  background: #fff;
  transition: border-color .15s;
  text-decoration: none;
}
.kpm-plat-link:hover { border-color: #1a73e8; }
.kpm-plat-text {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #444;
}
.kpm-date-badge { font-weight: 600; }

.kpm-buy { flex: 0 0 145px; text-align: right; margin-top: 2px; --kpm-btn-color: #2596be; }
.kpm-price { display: block; font-weight: 700; margin-bottom: 8px; }
.kpm-hint { font-size: 12px; color: #999; font-style: italic; }
.kpm-buy .button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 0;
  background: transparent !important;
  border: 1px solid var(--kpm-btn-color) !important;
  color: var(--kpm-btn-color) !important;
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  transition: all 0.3s ease !important;
}
.kpm-buy .button:hover {
  background: var(--kpm-btn-color) !important;
  color: #fff !important;
  box-shadow: 0 5px 15px rgba(37, 150, 190, 0.3) !important;
}

/* Platform-specific button colors */
.kpm-buy.kpm-platform-ps5,
.kpm-buy.kpm-platform-ps4,
.kpm-buy.kpm-platform-playstation { --kpm-btn-color: #0070d1; }
.kpm-buy.kpm-platform-xbox-one,
.kpm-buy.kpm-platform-xbox-series,
.kpm-buy.kpm-platform-xbox { --kpm-btn-color: #107C10; }
.kpm-buy.kpm-platform-switch,
.kpm-buy.kpm-platform-switch2,
.kpm-buy.kpm-platform-nintendo { --kpm-btn-color: #E60012; }

.kpm-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}
.kpm-page {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}
.kpm-page:hover { border-color: #1a73e8; color: #1a73e8; }
.kpm-page.active {
  border-color: #1a73e8;
  background: #1a73e8;
  color: #fff;
  cursor: default;
}

@media (max-width: 768px) {
  .kpm-filters { flex-direction: column; align-items: stretch; }
  .kpm-search { max-width: 100%; order: 3; }
  .kpm-plat-filters { justify-content: center; order: 1; }
  .kpm-filters select { width: 100%; margin-left: 0; order: 3; }
  .kpm-row { flex-wrap: wrap; gap: 10px; }
  .kpm-image { flex: 0 0 110px; }
  .kpm-image img { width: 110px; height: 110px; object-fit: contain; background: #f8fafc; }
  .kpm-info { flex: 1 1 calc(100% - 125px); }
  .kpm-platform, .kpm-release { flex: 1 1 40%; }
  .kpm-buy { flex: 1 1 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; }
  .kpm-price { margin-bottom: 0; }
}

/* Vermilion pre-order badge on regular product listings.
   Mimics the WooCommerce sale ribbon, but on the top-right corner. */
.woocommerce-LoopProduct-link,
.woocommerce-loop-product__link {
  position: relative !important;
  overflow: visible !important;
}
.kpm-shop-badge {
  position: absolute;
  top: 18px !important;
  right: -52px !important;
  left: auto !important;
  bottom: auto !important;
  width: 205px !important;
  padding: 9px 0 !important;
  background: rgba(227, 66, 52, 0.95) !important;
  color: #fff !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  text-align: center !important;
  border-radius: 0 !important;
  transform: rotate(45deg) !important;
  transform-origin: 50% 50% !important;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22) !important;
  z-index: 10 !important;
  pointer-events: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
