/* ---------- Product detail page ---------- */

/* Fallback backdrop for the (rare) not-found state, and whatever sliver
   peeks out below the hero image on very tall viewports. */
body {
  background: linear-gradient(180deg, #dcebf7 0%, #f6ecd7 45%, #f1e0b8 100%);
}

body::before {
  background: none;
}

.title-banner a {
  display: block;
}

/* ---------- Hero scene ---------- */
/* Fixed behind the header/content, like the homepage's ocean art, so the
   menu/title/product panel all read as sitting inside the scene. Locked to
   the source art's aspect ratio (width:100%, height via aspect-ratio) so it
   is fit-to-width rather than cropped — that keeps the floating decorations
   (whale, dragon, airship) pixel-aligned with the painted scene at any
   viewport size, at the cost of a small letterbox gap on very tall/narrow
   screens (filled by the neutral body gradient behind it). */

.product-hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1366 / 784;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

@media (max-width: 700px) {
  /* On phones the header (wrapped nav + title) is taller than the
     letterboxed hero strip above, which would hide the scene entirely.
     Fill the whole viewport instead — floating decorations lose pixel-
     perfect alignment here, but stay visually plausible in open sky. */
  .product-hero {
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-float {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
  animation-name: drift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.product-detail {
  max-width: 1100px;
  margin: 24px auto 80px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
  color: #5a3b12;
  margin-bottom: 24px;
  background: rgba(255, 250, 235, 0.75);
  backdrop-filter: blur(3px);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.breadcrumb a {
  color: #5a3b12;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  color: #8a2b1f;
  text-decoration: underline;
}

.breadcrumb span[aria-hidden] {
  opacity: 0.6;
}

#breadcrumb-name {
  font-weight: 600;
  color: #4a3220;
}

.product-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,0.6) 0%, rgba(255,250,235,0.45) 45%, rgba(238,222,190,0.5) 100%);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 32px;
  box-shadow:
    0 10px 26px rgba(60, 40, 10, 0.2),
    inset 0 0 0 1px rgba(255,255,255,0.5),
    inset 0 0 0 3px rgba(201, 162, 75, 0.55);
}

@media (min-width: 760px) {
  .product-panel {
    grid-template-columns: minmax(0, 380px) 1fr;
    align-items: center;
  }
}

.product-detail-image-frame {
  position: relative;
}

.product-detail-image-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 65%;
  height: 22px;
  background: radial-gradient(closest-side, rgba(60,40,10,0.4), transparent 75%);
  z-index: -1;
}

.product-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,0.28));
}

.product-detail-collection {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.product-detail-name {
  font-family: 'MedievalSharp', cursive;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: #4a3220;
  line-height: 1.15;
  margin-bottom: 6px;
}

.product-detail-tagline {
  font-style: italic;
  color: #6b4a2b;
  margin-bottom: 14px;
}

.product-detail-price {
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.product-detail-description {
  line-height: 1.6;
  margin-bottom: 18px;
}

.product-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}

.product-detail-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: #4a3220;
}

.product-detail-list li::before {
  content: '\2726';
  position: absolute;
  left: 0;
  color: var(--gold-deep);
  font-size: 0.8rem;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.btn-back {
  color: #5a3b12;
  font-weight: 600;
  text-decoration: none;
}

.btn-back:hover {
  text-decoration: underline;
}

/* ---------- Care panel ---------- */

.care-panel {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.care-panel .collection-title {
  max-width: 420px;
}

.care-list {
  list-style: none;
  width: 100%;
  max-width: 640px;
  background: rgba(255, 250, 235, 0.55);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow:
    0 8px 20px rgba(60, 40, 10, 0.15),
    inset 0 0 0 1px rgba(255,255,255,0.5),
    inset 0 0 0 3px rgba(201, 162, 75, 0.4);
}

.care-list li {
  position: relative;
  padding-left: 24px;
  line-height: 1.5;
}

.care-list li::before {
  content: '\1F343';
  position: absolute;
  left: 0;
  top: 0;
}

/* ---------- Not found state ---------- */

.not-found {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
