/* Pizza del Mese — intro splash + widget home */
:root {
  --pdm-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --pdm-blue: #2563eb;
  --pdm-amber: #f59e0b;
  --pdm-amber-deep: #b45309;
  --pdm-navy: #0c1a3a;
}

#pdm-slot { margin: 0 0 14px; min-height: 0; }
#pdm-slot.is-waiting { min-height: 112px; }

.pdm-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #111;
  color: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
  will-change: top, left, width, height, border-radius, box-shadow;
}
.pdm-shell.is-intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: none;
}
.pdm-shell.is-morphing {
  z-index: 280;
  pointer-events: none;
  transition:
    top .6s var(--pdm-ease),
    left .6s var(--pdm-ease),
    width .6s var(--pdm-ease),
    height .6s var(--pdm-ease),
    border-radius .6s var(--pdm-ease),
    box-shadow .6s var(--pdm-ease);
}
.pdm-shell.is-docked {
  position: relative;
  inset: auto;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: stretch;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.pdm-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity .6s var(--pdm-ease), filter .6s var(--pdm-ease);
}
.pdm-shell.is-intro .pdm-bg { filter: brightness(.72) saturate(1.05); }
.pdm-shell.is-docked .pdm-bg {
  position: relative;
  inset: auto;
  width: 112px;
  min-height: 112px;
  height: 100%;
  border-radius: 16px 0 0 16px;
  filter: none;
}

.pdm-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,10,.15) 0%, rgba(8,8,10,.35) 35%, rgba(8,8,10,.88) 100%);
  transition: opacity .45s var(--pdm-ease);
  pointer-events: none;
}
.pdm-shell.is-docked .pdm-overlay { opacity: 0; }

.pdm-close {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px;
  z-index: 5;
  width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: rgba(15,23,42,.55); color: #fff;
  font-size: 18px; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.pdm-shell.is-docked .pdm-close,
.pdm-shell.is-morphing .pdm-close { opacity: 0; pointer-events: none; transform: scale(.8); }

.pdm-content {
  position: relative; z-index: 2;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  transition: padding .6s var(--pdm-ease);
}
.pdm-shell.is-docked .pdm-content {
  padding: 12px 14px;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.pdm-badge,
.pdm-title,
.pdm-ings,
.pdm-special,
.pdm-meta,
.pdm-actions {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--pdm-ease), transform .55s var(--pdm-ease);
}
.pdm-shell.is-intro .pdm-badge { transform: translateY(-28px); }
.pdm-shell.is-intro .pdm-title { transform: translateX(-42px); }
.pdm-shell.is-intro .pdm-ings { transform: translateX(42px); }
.pdm-shell.is-intro .pdm-special,
.pdm-shell.is-intro .pdm-meta,
.pdm-shell.is-intro .pdm-actions { transform: translateY(28px); }

.pdm-shell.is-intro.pdm-animate .pdm-badge { opacity: 1; transform: translateY(0); transition-delay: .12s; }
.pdm-shell.is-intro.pdm-animate .pdm-title { opacity: 1; transform: translateX(0); transition-delay: .28s; }
.pdm-shell.is-intro.pdm-animate .pdm-ings { opacity: 1; transform: translateX(0); transition-delay: .42s; }
.pdm-shell.is-intro.pdm-animate .pdm-special { opacity: 1; transform: translateY(0); transition-delay: .52s; }
.pdm-shell.is-intro.pdm-animate .pdm-meta { opacity: 1; transform: translateY(0); transition-delay: .62s; }
.pdm-shell.is-intro.pdm-animate .pdm-actions { opacity: 1; transform: translateY(0); transition-delay: .72s; }

.pdm-shell.is-docked .pdm-badge,
.pdm-shell.is-docked .pdm-title,
.pdm-shell.is-docked .pdm-ings,
.pdm-shell.is-docked .pdm-special,
.pdm-shell.is-docked .pdm-actions {
  opacity: 1; transform: none; transition: none;
}

.pdm-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pdm-amber); color: #3b2208;
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  padding: 7px 12px; border-radius: 999px; width: fit-content;
  margin-bottom: 14px;
}
.pdm-shell.is-docked .pdm-badge {
  margin-bottom: 2px; font-size: 10px; padding: 3px 8px;
  background: #fff7ed; color: var(--pdm-amber-deep);
}

.pdm-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(36px, 8vw, 56px);
  line-height: .95; margin: 0 0 12px; font-weight: 700;
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
}
.pdm-title em { font-style: normal; color: #fbbf24; display: block; }
.pdm-shell.is-docked .pdm-title {
  font-size: 18px; line-height: 1.15; margin: 0;
  color: var(--pdm-navy); font-family: system-ui, sans-serif; font-weight: 800;
  text-shadow: none;
}
.pdm-shell.is-docked .pdm-title em { display: inline; color: inherit; margin-left: .25em; }

.pdm-ings {
  margin: 0 0 6px; font-size: 15px; color: rgba(255,255,255,.88); line-height: 1.35;
}
.pdm-shell.is-docked .pdm-ings {
  font-size: 12px; color: #64748b; margin: 0;
  line-height: 1.4;
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}
.pdm-shell.is-docked .pdm-ings strong {
  color: var(--pdm-amber-deep);
  font-weight: 800;
}

.pdm-special {
  margin: 0 0 10px; font-size: 22px; font-weight: 900;
  color: #fbbf24; letter-spacing: .02em;
}
.pdm-shell.is-docked .pdm-special {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--pdm-amber-deep);
  letter-spacing: 0;
}

.pdm-meta { margin: 0 0 16px; font-size: 13px; color: rgba(255,255,255,.72); }
.pdm-shell.is-docked .pdm-meta { display: none; }

.pdm-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pdm-price { font-size: 28px; font-weight: 900; margin-right: 4px; }
.pdm-shell.is-docked .pdm-price { font-size: 16px; color: var(--pdm-amber-deep); }

.pdm-btn {
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--pdm-blue); color: #fff;
  font-weight: 800; font-size: 15px;
  padding: 14px 18px;
  box-shadow: 0 10px 24px rgba(37,99,235,.35);
}
.pdm-btn:active { transform: scale(.97); }
.pdm-btn.secondary {
  background: rgba(255,255,255,.14); box-shadow: none;
  backdrop-filter: blur(8px);
}
.pdm-shell.is-docked .pdm-actions { margin-top: 6px; gap: 8px; }
.pdm-shell.is-docked .pdm-btn {
  padding: 8px 12px; font-size: 12px; border-radius: 10px; box-shadow: none;
}
.pdm-shell.is-docked .pdm-btn.secondary { display: none; }

body.pdm-intro-open { overflow: hidden; }

@media (max-width: 480px) {
  .pdm-shell.is-docked { grid-template-columns: 88px 1fr; }
  .pdm-shell.is-docked .pdm-bg { width: 88px; min-height: 88px; }
}
