/* ===== Goods & shop (page-shop.php) ===== */
#pageShop {
  background-image: linear-gradient(to bottom, var(--bg-body) 80px, transparent 320px), url(../images/bg-press.webp);
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, auto;
}
.pt-sec-shop {
  padding-top: 2.5rem;
}
.shop-subtitle {
  max-width: 280px;
  font-size: .875rem;
}

/* ----- List ----- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 1rem;
  padding-top: 2.5rem;
}
.shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.shop-item-img {
  width: 100%;
  aspect-ratio: 1;
  padding: 1.5rem;
  border: 1px solid #E5E5E5;
  border-radius: .75rem;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* กล่อง 220x220 (เล็กลงตามกรอบบนจอเล็ก) จัดรูปไว้กึ่งกลาง */
.shop-img {
  width: min(220px, 100%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* กว้าง/สูงตามสัดส่วนรูป แต่ด้านที่ยาวที่สุดไม่เกินกล่อง */
.shop-img img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}
.shop-item-title {
  margin-top: 1rem;
  color: var(--black-variant);
  font-size: 1.25rem;
  line-height: 1.5;
}
.shop-item-desc {
  margin: .5rem 0 0;
  color: var(--black-variant);
  font-size: 1rem;
  line-height: 1.5;
}
.shop-item-price {
  margin-top: .75rem;
  font-size: 1.25rem;
}
.shop-loader {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 0;
  color: var(--grey);
}
.shop-loader svg {
  animation: shop-spin 1s steps(8) infinite;
}
@keyframes shop-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 768px) {
  .shop-subtitle {
    max-width: none;
    font-size: 1rem;
  }
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3.5rem 1.5rem;
  }
}

@media (min-width: 992px) {
  .shop-grid {
    gap: 3.5rem 2.5rem;
  }
  .shop-item-img {
    width: 100%;
    padding: 12%;
  }
}

/* ----- item ที่มี url : ทั้งการ์ดกดได้ ----- */
.shop-item-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  color: inherit;
}
.shop-item-link .shop-item-img {
  transition: border-color var(--trans-2), box-shadow var(--trans-2);
}
.shop-item-link .shop-item-title {
  transition: color var(--trans-2);
}
.shop-item-link:hover .shop-item-img {
  border-color: var(--pink);
  box-shadow: 0 4px 16px #00000014;
}
.shop-item-link:hover .shop-item-title {
  color: var(--primary);
}
