
/*
 * HaleMC Store V8
 * - V4 kategori görsel düzeltmesi ile V3 ürün kartı düzeltmelerini birleştirir.
 * - Kategori görselini sağ tarafa büyütür; metin görselin üzerindeki yazıya binmez.
 * - Kasa anahtarı kartlarını tekrar eşit ve düzenli yapar.
 * - Ürün detay görselini 480 px'e küçültür.
 */

/* =========================================================
   KATEGORİLER
   ========================================================= */
.halemc-category-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

.halemc-category-grid > .halemc-category-card {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 200px !important;
  padding: 24px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 78% 48%, rgba(246,201,76,.07), transparent 38%),
    linear-gradient(145deg, #151c26 0%, #0a0f16 100%) !important;
  box-shadow: 0 16px 38px rgba(0,0,0,.30) !important;
  isolation: isolate !important;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease !important;
}

.halemc-category-grid > .halemc-category-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(246,201,76,.46) !important;
  box-shadow: 0 24px 52px rgba(0,0,0,.38) !important;
}

/* Kare kaynak görsel sağ tarafta büyük görünür; ana çizim kırpılmaz. */
.halemc-category-card__image {
  position: absolute !important;
  top: -8% !important;
  right: -1% !important;
  bottom: auto !important;
  left: auto !important;
  width: 60% !important;
  height: 116% !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  z-index: 0 !important;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,.28));
  transition: transform .25s ease !important;
}

.halemc-category-card:hover .halemc-category-card__image {
  transform: scale(1.025) !important;
}

/* Metnin bulunduğu sol bölümü temiz tutar. */
.halemc-category-grid > .halemc-category-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  background:
    linear-gradient(90deg,
      rgba(6,10,15,.98) 0%,
      rgba(6,10,15,.90) 31%,
      rgba(6,10,15,.46) 53%,
      rgba(6,10,15,.08) 76%,
      transparent 100%),
    linear-gradient(180deg, transparent 56%, rgba(4,7,11,.32) 100%) !important;
}

.halemc-category-grid > .halemc-category-card::after {
  content: "" !important;
  position: absolute !important;
  left: 24px !important;
  right: 24px !important;
  bottom: 0 !important;
  height: 1px !important;
  z-index: 2 !important;
  background: linear-gradient(90deg, transparent, rgba(246,201,76,.55), transparent) !important;
}

.halemc-category-card__shade {
  display: none !important;
}

.halemc-category-card__content {
  position: relative !important;
  z-index: 3 !important;
  width: 47% !important;
  max-width: 47% !important;
}

.halemc-category-grid .product-category-box-title {
  position: relative !important;
  z-index: 3 !important;
  margin: 0 0 8px !important;
  color: #fff !important;
  font-size: 19px !important;
  line-height: 1.25 !important;
  text-shadow: 0 5px 18px rgba(0,0,0,.60) !important;
}

.halemc-category-grid .product-category-box-text {
  position: relative !important;
  z-index: 3 !important;
  width: 100% !important;
  margin: 0 !important;
  color: rgba(238,243,250,.91) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-shadow: 0 4px 14px rgba(0,0,0,.62) !important;
}

.halemc-category-grid .product-category-box-tag,
.halemc-category-grid .halemc-category-card__tag {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 4 !important;
  margin: 0 !important;
  padding: 7px 11px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.94) !important;
  color: #485365 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .25px !important;
  text-transform: uppercase !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.18) !important;
}

/* =========================================================
   ÜRÜN / KASA ANAHTARI KARTLARI
   ========================================================= */
#game-product-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

#game-product-list > .halemc-store-product-card {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(26,35,49,.98), rgba(14,20,29,.98)) !important;
  box-shadow: 0 16px 38px rgba(0,0,0,.27) !important;
}

#game-product-list > .halemc-store-product-card:hover {
  border-color: rgba(246,201,76,.40) !important;
  box-shadow: 0 23px 50px rgba(0,0,0,.36) !important;
}

#game-product-list > .halemc-store-product-card > a {
  display: block !important;
  overflow: hidden !important;
}

.halemc-product-card-media {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 235px !important;
  margin: 0 !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 48%, rgba(246,201,76,.10), transparent 45%),
    linear-gradient(145deg, #111a26, #0b1119) !important;
}

.halemc-product-card-media__glow {
  position: absolute !important;
  width: 155px !important;
  height: 155px !important;
  border-radius: 50% !important;
  background: rgba(246,201,76,.07) !important;
  filter: blur(27px) !important;
  pointer-events: none !important;
}

.halemc-product-card-image {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 14px 20px 12px !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: drop-shadow(0 15px 17px rgba(0,0,0,.28));
  transition: transform .25s ease !important;
}

.halemc-store-product-card:hover .halemc-product-card-image {
  transform: scale(1.035) translateY(-2px) !important;
}

.halemc-store-product-card .product-preview-info {
  position: relative !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 166px !important;
  padding: 22px 23px 20px !important;
  background: transparent !important;
}

.halemc-store-product-card .product-preview-title {
  min-height: 43px !important;
  margin: 0 !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.halemc-store-product-card .product-preview-category {
  margin-top: 8px !important;
}

.halemc-store-product-card .product-preview-text {
  min-height: 23px !important;
  max-height: 44px !important;
  margin-top: 10px !important;
  color: #aeb8c8 !important;
  line-height: 1.45 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.halemc-store-product-card .text-sticker {
  top: -15px !important;
  right: 16px !important;
  min-width: 76px !important;
  padding: 8px 12px !important;
  border: 1px solid rgba(246,201,76,.32) !important;
  border-radius: 999px !important;
  background: rgba(13,19,28,.94) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.24) !important;
}

.halemc-store-product-card .text-sticker .highlighted {
  color: var(--hale-gold, #f6c94c) !important;
}

/* 3'lü dizilimde tek kalan son ürünü ortala. */
#game-product-list > .halemc-store-product-card:last-child:nth-child(3n + 1) {
  grid-column: 2 !important;
}

/* =========================================================
   ÜRÜN DETAYI
   ========================================================= */
.marketplace-content .halemc-product-detail-media {
  width: min(100%, 480px) !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 auto 22px !important;
  border-radius: 22px !important;
}

.marketplace-content .halemc-product-detail-media img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  padding: 28px !important;
  object-fit: contain !important;
  object-position: center !important;
}

.marketplace-content .halemc-product-slider {
  width: min(100%, 480px) !important;
  margin: 0 auto 22px !important;
  overflow: hidden !important;
  border-radius: 22px !important;
}

.marketplace-content .halemc-product-slider .slider-panel-slides,
.marketplace-content .halemc-product-slider .slider-panel-slide,
.marketplace-content .halemc-product-slider .slider-panel-slide-image {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
}

.marketplace-content .halemc-product-slider .slider-panel-slide-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.marketplace-content .halemc-product-slider .slider-panel-slide-image img {
  width: 100% !important;
  height: 100% !important;
  padding: 28px !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1050px) {
  #game-product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #game-product-list > .halemc-store-product-card:last-child:nth-child(3n + 1) {
    grid-column: auto !important;
  }

  #game-product-list > .halemc-store-product-card:last-child:nth-child(2n + 1) {
    grid-column: 1 / -1 !important;
    width: calc(50% - 8px) !important;
    justify-self: center !important;
  }
}

@media (max-width: 760px) {
  .halemc-category-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .halemc-category-grid > .halemc-category-card {
    min-height: 176px !important;
    padding: 20px !important;
  }

  .halemc-category-card__image {
    right: -5% !important;
    width: 61% !important;
    height: 110% !important;
    top: -5% !important;
  }

  .halemc-category-card__content {
    width: 52% !important;
    max-width: 52% !important;
  }

  .halemc-category-grid .product-category-box-title {
    font-size: 17px !important;
  }

  .halemc-category-grid .product-category-box-text {
    font-size: 12px !important;
  }

  #game-product-list {
    grid-template-columns: 1fr !important;
  }

  #game-product-list > .halemc-store-product-card:last-child:nth-child(2n + 1),
  #game-product-list > .halemc-store-product-card:last-child:nth-child(3n + 1) {
    grid-column: auto !important;
    width: 100% !important;
  }

  .halemc-product-card-media {
    height: 225px !important;
  }

  .marketplace-content .halemc-product-detail-media,
  .marketplace-content .halemc-product-slider {
    width: min(100%, 420px) !important;
    border-radius: 18px !important;
  }

  .marketplace-content .halemc-product-detail-media img,
  .marketplace-content .halemc-product-slider .slider-panel-slide-image img {
    padding: 20px !important;
  }
}
