/* =============================================================================
   premium-garden.css — collectible trees / buildings / coin for the shop.
   Ported to vanilla from the React+CSS concept. Scoped under .pg-mini so it
   never collides with the rest of the site. 2D only (no 3D island here).
   ========================================================================== */
.pg-mini { position: relative; width: 96px; height: 104px; display: grid; place-items: center; }

/* --- platform the item sits on --- */
.pg-platform { position: relative; width: 92px; height: 92px; margin: 0 auto; }
.pg-platform-top { position: absolute; inset: 10px 8px 18px; display: grid; place-items: end center;
  border-radius: 16px; background: linear-gradient(135deg, #b8f271, #6ab43f);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.18), 0 12px 14px rgba(82,55,25,.16); }
.pg-platform-side { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 22px;
  border-radius: 0 0 14px 14px; background: linear-gradient(#a06b3b, #5c351e); }

/* --- tree shell --- */
.pg-tree { position: relative; width: 84px; height: 96px; transform-origin: 50% 100%;
  animation: pg-breathe 3.8s ease-in-out infinite alternate; }
.pg-tree.is-small { transform: scale(.92); }
.pg-tree-shadow { position: absolute; left: 50%; bottom: 4px; width: 56px; height: 16px; border-radius: 50%;
  background: rgba(33,24,14,.26); filter: blur(3px); transform: translateX(-50%); }
.pg-trunk { position: absolute; left: 50%; bottom: 12px; width: 17px; height: 44px; border-radius: 9px 9px 5px 5px;
  transform: translateX(-50%); background: linear-gradient(90deg, #6d3718, #b46d34 42%, #4c2514);
  box-shadow: inset -4px 0 7px rgba(0,0,0,.24); }
.pg-trunk span { position: absolute; inset: 7px 4px auto; height: 2.5px; border-radius: 4px; background: rgba(66,31,16,.28); }
.pg-trunk span + span { top: 21px; }

/* --- rounded canopy (blobs) --- */
.pg-canopy { position: absolute; left: 50%; bottom: 40px; width: 80px; height: 62px; transform: translateX(-50%); }
.pg-canopy i {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 26px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.4), transparent 28%), linear-gradient(135deg, var(--leaf-a), var(--leaf-b));
  box-shadow: inset -4px -5px 8px rgba(0,0,0,.13), 0 3px 4px rgba(0,0,0,.08);
  animation: pg-leaf-wiggle 2.6s ease-in-out infinite alternate; }

/* --- pine --- */
.pg-pine { position: absolute; left: 50%; bottom: 38px; width: 76px; height: 70px; transform: translateX(-50%); }
.pg-pine i { position: absolute; left: 50%; width: 0; height: 0; transform: translateX(-50%);
  border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 36px solid var(--leaf-b);
  filter: drop-shadow(0 4px 2px rgba(0,0,0,.13)); }
.pg-pine i:nth-child(1) { top: 0; border-bottom-color: var(--leaf-a); transform: translateX(-50%) scale(.66); }
.pg-pine i:nth-child(2) { top: 14px; border-bottom-color: var(--leaf-a); transform: translateX(-50%) scale(.84); }
.pg-pine i:nth-child(3) { top: 28px; }
.pg-pine i:nth-child(4) { top: 44px; transform: translateX(-50%) scale(1.08); }

/* --- crystal --- */
.pg-crystal { position: absolute; left: 50%; bottom: 30px; width: 78px; height: 74px; transform: translateX(-50%);
  filter: drop-shadow(0 0 14px rgba(83,226,255,.5)); }
.pg-crystal i { position: absolute; bottom: 0; width: 23px; height: 60px;
  clip-path: polygon(50% 0, 100% 32%, 78% 100%, 20% 100%, 0 32%);
  background: linear-gradient(135deg, rgba(255,255,255,.85), var(--leaf-a) 35%, var(--leaf-b)); }
.pg-crystal i:nth-child(1) { left: 27px; height: 70px; }
.pg-crystal i:nth-child(2) { left: 10px; height: 50px; transform: rotate(-14deg); }
.pg-crystal i:nth-child(3) { right: 8px; height: 46px; transform: rotate(16deg); }
.pg-crystal i:nth-child(4) { left: 38px; height: 40px; opacity: .9; }

/* --- willow --- */
.pg-willow { position: absolute; left: 50%; bottom: 38px; width: 82px; height: 74px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle at 35% 25%, var(--leaf-a), var(--leaf-b) 62%, #416b45); }
.pg-willow i { --x: calc((var(--i) * 29) % 72 + 10); position: absolute; left: calc(var(--x) * 1%); top: 34%;
  width: 6px; height: 46px; border-radius: 99px; background: linear-gradient(var(--leaf-a), #416f40);
  transform-origin: top; animation: pg-willow 2.8s ease-in-out infinite alternate; }

/* --- accents --- */
.pg-fruit i, .pg-glow-leaves i, .pg-petals i { position: absolute; border-radius: 50%; }
.pg-fruit i { --x: calc((var(--i) * 23) % 55 + 20); --y: calc((var(--i) * 31) % 42 + 14);
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 8px; height: 8px;
  background: radial-gradient(circle at 32% 24%, #fff7a0, var(--fruit-c, #f43721) 62%); box-shadow: 0 2px 3px rgba(0,0,0,.22); }
.pg-glow-leaves i { --x: calc((var(--i) * 31) % 66 + 12); --y: calc((var(--i) * 43) % 48 + 8);
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 6px; height: 6px; background: #fff4a8;
  box-shadow: 0 0 11px var(--glow-c, #ffd23f); animation: pg-twinkle 1.8s ease-in-out infinite alternate; }
.pg-petals i { --x: calc((var(--i) * 41) % 70 + 10); left: calc(var(--x) * 1%); top: 14%; width: 6px; height: 4px;
  background: var(--petal-c, #ffc9e1); animation: pg-fall calc(3s + var(--i) * .2s) ease-in infinite; }
.pg-golden { filter: drop-shadow(0 0 12px rgba(255,206,48,.6)); }

/* --- building --- */
.pg-building { position: relative; width: 84px; height: 96px; animation: pg-breathe 3.8s ease-in-out infinite alternate; }
.pg-building.is-small { transform: scale(.92); }
.pg-building-shadow { position: absolute; left: 50%; bottom: 4px; width: 58px; height: 16px; border-radius: 50%;
  background: rgba(33,24,14,.26); filter: blur(3px); transform: translateX(-50%); }
.pg-house { position: absolute; left: 50%; bottom: 10px; width: 66px; height: 62px; transform: translateX(-50%); }
.pg-wall { position: absolute; left: 8px; right: 8px; bottom: 0; height: 40px; border-radius: 7px;
  background: linear-gradient(135deg, #fff0c7, #cfa471); box-shadow: inset -7px -7px 11px rgba(84,45,18,.18); }
.pg-building-clinic .pg-wall { background: linear-gradient(135deg, #e8f8ff, #8eb9d6); }
.pg-building-villa .pg-wall { background: linear-gradient(135deg, #e9f4cd, #99bb62); }
.pg-roof { position: absolute; left: 0; top: 2px; width: 66px; height: 32px;
  clip-path: polygon(50% 0, 100% 48%, 88% 100%, 12% 100%, 0 48%);
  background: linear-gradient(135deg, #ffb148, #c65321); filter: drop-shadow(0 7px 4px rgba(0,0,0,.18)); }
.pg-building-clinic .pg-roof { background: linear-gradient(135deg, #71c9ff, #2876b3); }
.pg-building-villa .pg-roof { background: linear-gradient(135deg, #8ed35a, #3c8b2f); }
.pg-chimney { position: absolute; right: 13px; top: 0; width: 10px; height: 22px; border-radius: 3px;
  background: linear-gradient(#9a5630, #5b2d19); }
.pg-window { position: absolute; bottom: 14px; width: 11px; height: 11px; border-radius: 4px;
  background: radial-gradient(circle at 35% 30%, #fffacf, #6ad7ff); box-shadow: 0 0 9px rgba(255,228,111,.5); }
.pg-window.left { left: 9px; } .pg-window.right { right: 9px; }
.pg-door { position: absolute; left: 50%; bottom: 0; width: 13px; height: 22px; transform: translateX(-50%);
  border-radius: 5px 5px 0 0; background: linear-gradient(#7a4425, #3d2115); }

/* --- coin --- */
.pg-coin { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px;
  filter: drop-shadow(0 2px 1px rgba(95,56,0,.22)); animation: pg-coin-shine 2.6s ease-in-out infinite; }

@keyframes pg-breathe { from { transform: translateY(0) scale(1); } to { transform: translateY(-3px) scale(1.015); } }
@keyframes pg-leaf-wiggle { from { transform: rotate(-3deg); } to { transform: translate(1px,-2px) rotate(4deg); } }
@keyframes pg-willow { from { transform: rotate(-4deg); } to { transform: rotate(6deg); } }
@keyframes pg-twinkle { from { opacity: .45; transform: scale(.82); } to { opacity: 1; transform: scale(1.22); } }
@keyframes pg-fall { from { transform: translate(0,0) rotate(0); opacity: 0; } 15% { opacity: 1; } to { transform: translate(16px,70px) rotate(220deg); opacity: 0; } }
@keyframes pg-coin-shine { 0%,100% { transform: translateY(0) rotateY(0); } 50% { transform: translateY(-1px) rotateY(22deg); } }

@media (prefers-reduced-motion: reduce) {
  .pg-tree, .pg-building, .pg-canopy i, .pg-willow i, .pg-glow-leaves i, .pg-petals i, .pg-coin { animation: none !important; }
}

/* Real reference art as shop previews */
.pg-mini { width: 100%; height: auto; }
.shop-img { width: 100%; height: auto; display: block; image-rendering: auto; filter: drop-shadow(0 4px 6px rgba(60,40,20,.12)); transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.shop-card:hover .shop-img { transform: translateY(-3px) scale(1.04); }
