/* Product detail modal */
.pd-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 300; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast); }
.pd-overlay.open { opacity: 1; pointer-events: all; }

.pd-panel {
  position: fixed; z-index: 301;
  background: var(--warm-white); overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.pd-panel.open { opacity: 1; pointer-events: all; }

/* Desktop: scale-fade centred */
@media (min-width: 600px) {
  .pd-panel {
    top: 50%; left: 50%;
    width: min(560px, 92vw); max-height: 88vh;
    border-radius: 20px;
    transform: translate(-50%, -52%) scale(0.95);
  }
  .pd-panel.open { transform: translate(-50%, -50%) scale(1); }
}

/* Mobile: slide up */
@media (max-width: 599px) {
  .pd-panel {
    bottom: 0; left: 0; right: 0;
    border-radius: 20px 20px 0 0; max-height: 92vh;
    transform: translateY(100%);
  }
  .pd-panel.open { transform: translateY(0); }
}

.pd-close { position: absolute; top: 1rem; right: 1rem; z-index: 1; }

/* Hero */
.pd-hero { position: relative; height: 240px; overflow: hidden; background: var(--light-sage); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pd-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-hero-emoji { font-size: 5rem; display: none; }

/* Body */
.pd-body { padding: 1.5rem; }
.pd-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.6rem; }
.pd-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--forest); line-height: 1.2; }
.pd-price-row { text-align: right; flex-shrink: 0; }
.pd-price { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--forest); font-weight: 700; display: block; }
.pd-unit { font-size: 0.72rem; color: #aaa; font-family: 'DM Sans', sans-serif; }
.pd-story { font-style: italic; font-size: 0.88rem; color: #666; line-height: 1.7; margin-bottom: 1.2rem; font-weight: 300; }

/* Collapsible sections */
.pd-section { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.pd-section summary { font-size: 0.85rem; font-weight: 500; color: var(--forest); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.pd-section summary::-webkit-details-marker { display: none; }
.pd-section summary::after { content: '▾'; transition: transform var(--dur-fast); opacity: 0.6; }
.pd-section[open] summary::after { transform: rotate(-180deg); }
.pd-ingredient-list { margin-top: 0.7rem; padding-left: 1.2rem; font-size: 0.82rem; color: #555; line-height: 2; }
.pd-reheating-text { margin-top: 0.7rem; font-size: 0.82rem; color: #555; line-height: 1.7; }

/* Allergens */
.pd-allergen-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.pd-section-label { font-size: 0.82rem; font-weight: 500; color: var(--forest); white-space: nowrap; }
.pd-allergen-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pd-allergen-badge { background: #FFF3E0; color: var(--earth); font-size: 0.72rem; font-weight: 500; padding: 0.22rem 0.65rem; border-radius: 50px; }

/* Add to cart */
.pd-add-btn { width: 100%; margin-top: 1.2rem; }
