.gp-shop-recommend.is-collapsed .gp-shop-recommend__head-toggle img {
  transform: rotate(180deg);
}

.recommend-products-grid.is-collapsed,
.gp-shop-recommend__body.is-collapsed {
  height: 0;
  padding: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.gp-shop-recommend__body {
  width: 100%;
  overflow: hidden;
  transition:
    height 320ms ease,
    padding 320ms ease,
    margin-top 320ms ease,
    opacity 320ms ease;
}

/* Hot Items: grid 2 แถว (ไม่ใช่ slider แล้ว) — จำนวนที่โชว์ต่อ breakpoint: PC 10 / mini 6 / mobile 4
   ที่เหลือซ่อนไว้จนกดปุ่ม "ดูสินค้ายอดนิยมเพิ่มเติม" */
.gp-shop-recommend__viewport {
  width: 100%;
  overflow: hidden;
  margin-top: 16px;
  --hot-cols: 3;
  --hot-gap: 10px;
}

.gp-shop-recommend__viewport .recommend-products-grid {
  display: grid;
  grid-template-columns: repeat(var(--hot-cols), minmax(0, 1fr));
  align-items: stretch;
  gap: var(--hot-gap);
  margin-top: 0;
  padding: 0;
  overflow: visible;
  transform: none;
}

.gp-shop-recommend__viewport .gp-shop-package-card {
  height: auto;
  align-self: stretch;
  min-width: 0;
  width: auto;
}

/* mini (tablet) — 3 คอลัมน์ x 2 แถว = 6 */
@media (min-width: 641px) and (max-width: 1023px) {
  .gp-shop-recommend:not(.is-hot-expanded) .recommend-products-grid > .gp-shop-package-card:nth-child(n + 7) {
    display: none;
  }
}

.gp-shop-recommend__more-wrap[hidden] {
  display: none;
}

/* ปุ่ม "ดูสินค้ายอดนิยมเพิ่มเติม" — สไตล์ตาม design (index-genplay-shop-after-login-type2.html) */
.gp-shop-recommend__more {
  display: flex;
  height: 36px;
  width: fit-content;
  margin: 16px auto 0;
  padding: 0 1rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #facc15;
  border-radius: 10px;
  background-color: #facc15;
  font-family: "Google Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  color: #102a43;
  text-decoration: none;
  transition: filter 200ms cubic-bezier(0, 0, 0.2, 1);
}

.gp-shop-recommend__more:hover,
.gp-shop-recommend__more:active {
  filter: brightness(1.1);
}

@media (min-width: 768px) {
  .gp-shop-recommend__more {
    height: 44px;
    padding: 0 1.25rem;
    font-size: 18px;
  }
}

.gp-shop-recommend__pages[hidden] {
  display: none;
}

/* mobile — 2 คอลัมน์ x 2 แถว = 4 */
@media (max-width: 640px) {
  .gp-shop-recommend__viewport { --hot-cols: 2; }

  .gp-shop-recommend:not(.is-hot-expanded) .recommend-products-grid > .gp-shop-package-card:nth-child(n + 5) {
    display: none;
  }
}

/* PC — 5 คอลัมน์ x 2 แถว = 10 */
@media (min-width: 1024px) {
  .gp-shop-recommend__viewport { --hot-cols: 5; }

  .gp-shop-recommend:not(.is-hot-expanded) .recommend-products-grid > .gp-shop-package-card:nth-child(n + 11) {
    display: none;
  }
}

@media (min-width: 1024px) and (orientation: landscape) {
  .gp-shop-recommend__viewport {
    --hot-gap: 20px;
    margin-top: 0;
    padding: 30px 20px 0;
  }
}

@media not all and (min-width: 1024px) and (orientation: landscape) {
  .gp-shop-recommend__head-title { font-size: 18px; }
}
