/* Product detail page (PDP) styles — GLOBAL (not Astro-scoped) so the live
 * client renderer (pdp.js, used for the new-product fallback) produces identical,
 * fully-styled markup. Loaded via pageStyles only on /product and the 404 page. */

.pdp { --ink: #1f3247; --ink2: #16202c; --gold: #b8923f; --gold-l: #e8c87a; --gold-d: #9a7a2c; --paper: #f6f4ef; --line: #e8e4da; --muted: #5c6672; color: var(--ink); }
.pdp__wrap { max-width: 1180px; margin-inline: auto; padding: clamp(1.5rem, 4vw, 2.75rem) clamp(20px, 4vw, 40px) clamp(3rem, 6vw, 5rem); }
.pdp h2 { font-family: 'EB Garamond', Georgia, serif; font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; margin: 0 0 1.1rem; }
.pdp h3 { font-family: 'EB Garamond', Georgia, serif; font-weight: 600; font-size: 1.15rem; margin: 0 0 0.4rem; }

/* loading / not-found states (fallback page) */
.pdp__loading, .pdp__error { text-align: center; color: var(--muted); padding: clamp(3rem, 8vw, 6rem) 0; font-size: 1rem; }
.pdp__error h1 { font-family: 'EB Garamond', Georgia, serif; color: var(--ink); margin: 0 0 0.75rem; }
.pdp__error a { color: var(--gold-d); font-weight: 600; }

/* breadcrumbs */
.pdp__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.pdp__crumbs a { color: var(--muted); text-decoration: none; }
.pdp__crumbs a:hover { color: var(--gold-d); }
.pdp__crumbs em { font-style: normal; color: var(--ink); max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* layout */
.pdp__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.25rem); align-items: start; }

/* gallery */
.pdp__main { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 5; display: grid; place-items: center; box-shadow: 0 18px 50px rgba(22, 32, 44, 0.08); }
.pdp__main img { width: 100%; height: 100%; object-fit: contain; padding: clamp(1.5rem, 4vw, 3rem); box-sizing: border-box; }
.pdp__noimg { color: var(--muted); font-size: 0.9rem; }
.pdp__sold { position: absolute; top: 1rem; left: 1rem; background: var(--ink); color: #fff; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.35rem 0.7rem; border-radius: 999px; }
.pdp__thumbs { display: flex; gap: 0.6rem; margin-top: 0.85rem; flex-wrap: wrap; }
.pdp__thumb { width: 72px; height: 90px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; transition: border-color 0.18s ease; }
.pdp__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; box-sizing: border-box; }
.pdp__thumb.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(184, 146, 63, 0.22); }
.pdp__thumb:hover { border-color: var(--gold-l); }

/* buy box */
.pdp__buy { position: sticky; top: 1.5rem; }
.pdp__brand { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem; font-weight: 600; color: var(--gold-d); margin: 0 0 0.6rem; }
.pdp__title { font-family: 'EB Garamond', Georgia, serif; font-weight: 600; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.75rem; color: var(--ink); }
.pdp__rating { margin: 0 0 0.75rem; color: var(--gold-d); font-weight: 600; font-size: 0.95rem; }
.pdp__rating span { color: var(--muted); font-weight: 400; }
.pdp__price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.pdp__price { font-family: 'EB Garamond', Georgia, serif; font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 600; color: var(--ink); }
.pdp__stock { font-size: 0.85rem; font-weight: 600; color: #2e7d51; }
.pdp__stock--out { color: var(--muted); }
.pdp__lead { font-size: 0.98rem; line-height: 1.7; color: #3c4654; margin: 0 0 1.5rem; }

.pdp__cta { display: flex; gap: 0.75rem; align-items: stretch; margin-bottom: 1.5rem; }
.btn-gold { display: inline-flex; align-items: center; justify-content: center; padding: 0.95rem 2rem; border-radius: 999px; font-weight: 600; text-decoration: none; background: linear-gradient(135deg, var(--gold-l), var(--gold) 60%, var(--gold-d)); color: var(--ink); box-shadow: 0 10px 26px rgba(184, 146, 63, 0.32); transition: transform 0.2s ease, box-shadow 0.2s ease; border: 0; cursor: pointer; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(184, 146, 63, 0.42); }
.pdp__add { flex: 1; }
.pdp__wish { width: 54px; flex: 0 0 54px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; transition: border-color 0.18s ease, color 0.18s ease; }
.pdp__wish:hover, .pdp__wish[aria-pressed='true'] { border-color: var(--gold); color: var(--gold-d); }

.pdp__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem 1.5rem; margin: 0 0 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.pdp__quick-item dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.15rem; }
.pdp__quick-item dd { margin: 0; font-weight: 600; color: var(--ink); font-size: 0.95rem; }

.pdp__assure { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.pdp__assure li { display: flex; gap: 0.7rem; align-items: flex-start; }
.pdp__assure img { margin-top: 0.1rem; flex: 0 0 auto; }
.pdp__assure span { font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
.pdp__assure strong { display: block; color: var(--ink); font-weight: 600; }

/* details */
.pdp__details { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.pdp__spec-table { width: 100%; border-collapse: collapse; }
.pdp__spec-table tr { border-bottom: 1px solid var(--line); }
.pdp__spec-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.88rem; padding: 0.7rem 1rem 0.7rem 0; vertical-align: top; white-space: nowrap; }
.pdp__spec-table td { text-align: right; color: var(--ink); font-size: 0.92rem; padding: 0.7rem 0; }
.pdp__about p { line-height: 1.75; color: #3c4654; margin: 0 0 1rem; }
.pdp__about-trust { font-size: 0.9rem; color: var(--muted); }
.pdp__about-trust a { color: var(--gold-d); font-weight: 600; text-decoration: none; }
.pdp__about-trust a:hover { text-decoration: underline; }

/* trust band */
.pdp__trust { background: radial-gradient(120% 160% at 50% -40%, #28415c 0%, var(--ink) 60%, var(--ink2) 100%); color: #f7f7f8; border-radius: 22px; padding: clamp(2rem, 4vw, 3rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.pdp__trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.pdp__trust-card img { margin-bottom: 0.6rem; filter: brightness(0) saturate(100%) invert(82%) sepia(38%) saturate(560%) hue-rotate(346deg) brightness(95%) contrast(88%); }
.pdp__trust-card h3 { color: #fff; margin-bottom: 0.3rem; }
.pdp__trust-card p { margin: 0; font-size: 0.88rem; color: rgba(247, 247, 248, 0.72); line-height: 1.5; }

/* related */
.pdp__related { margin-top: clamp(2.5rem, 5vw, 4rem); }
.pdp__related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.pdp__rel { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.pdp__rel-img { aspect-ratio: 4 / 5; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; place-items: center; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.pdp__rel:hover .pdp__rel-img { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(22, 32, 44, 0.12); }
.pdp__rel-img img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; box-sizing: border-box; }
.pdp__rel-name { margin: 0.7rem 0 0.2rem; font-size: 0.9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pdp__rel-price { font-weight: 600; color: var(--gold-d); font-size: 0.95rem; }
.pdp__all { display: inline-block; font-weight: 600; color: var(--gold-d); text-decoration: none; }
.pdp__all:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .pdp__buy { position: static; }
  .pdp__details { grid-template-columns: 1fr; }
  .pdp__trust-grid { grid-template-columns: 1fr 1fr; }
  .pdp__related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .pdp__quick { grid-template-columns: 1fr; }
  .pdp__trust-grid { grid-template-columns: 1fr; }
}
