/* مكدّس منتجات — صورة فقط + اسم وسعر تحت */
.pm-app--showcase .pm-ambient {
  display: none;
}

.pm-app--showcase .pm-header__about,
.pm-app--showcase .pm-header__map {
  display: none;
}

.pm-app--showcase .pm-main {
  padding: 0 0 calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

.pm-showcase-panel {
  display: block;
}

.pm-showcase {
  display: none;
}

.pm-showcase.is-active {
  display: block;
}

body.pm-is-searching .pm-showcase.pm-search-hit {
  display: block;
}

body.pm-is-searching .pm-showcase:not(.pm-search-hit) {
  display: none !important;
}

.pm-stack {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0.5rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.65rem;
  height: calc(100dvh - 168px);
  min-height: 480px;
}

/* منطقة المكدّس — ما تغطي الاسم والسعر */
.pm-stack__deck {
  position: relative;
  width: 100%;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  perspective: 1500px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.pm-stack__deck.is-dragging {
  cursor: grabbing;
}

.pm-stack__slide {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.25rem;
  transform-origin: center bottom;
  will-change: transform;
  pointer-events: none;
}

.pm-stack__slide img {
  display: block;
  width: auto;
  height: 94%;
  max-width: min(98vw, 1200px);
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.32));
  pointer-events: none;
  -webkit-user-drag: none;
}

/* أيقونة بديلة — بدون كارد، نفس أسلوب الصورة */
.pm-stack__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 94%;
  max-width: min(98vw, 1200px);
  flex-shrink: 0;
  pointer-events: none;
}

.pm-stack__ph i {
  font-size: clamp(5.5rem, 22vw, 8.5rem);
  color: var(--pm-text-soft);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.32));
}

/* الاسم والسعر — ثابتين تحت المكدّس */
.pm-stack__meta {
  position: relative;
  z-index: 60;
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem 0.5rem 0.15rem;
  background: var(--pm-bg);
}

.pm-stack__name {
  margin: 0 0 0.3rem;
  font-size: clamp(1.05rem, 4.2vw, 1.3rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--pm-text);
  transition: opacity 0.22s ease;
}

.pm-stack__name.is-changing {
  opacity: 0.35;
}

.pm-stack__price {
  margin: 0 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem 0.3rem;
  transition: opacity 0.22s ease;
}

.pm-stack__price.is-changing {
  opacity: 0.35;
}

.pm-stack__price-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pm-accent);
}

.pm-stack__price-unit {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pm-text-soft);
}

.pm-stack__actions .pm-cart-add {
  max-width: 12rem;
  margin: 0 auto;
}

.pm-stack__dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.pm-stack__dots:empty {
  display: none;
}

.pm-stack__dot {
  width: 6px;
  height: 6px;
  border: none;
  padding: 0;
  border-radius: 50%;
  background: var(--pm-border);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

.pm-stack__dot.is-active {
  width: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pm-accent), var(--pm-accent-2));
}

@media (max-width: 420px) {
  .pm-stack {
    height: calc(100dvh - 155px);
  }
}

@media (min-width: 768px) {
  .pm-stack {
    max-width: 520px;
    margin: 0 auto;
  }
}
