/* ══════════════════════════════════════════════════════════════════
   PORTFOLIO — Custom Swords Showcase (listing) + Project Detail
   Ported from the polished UI (CustomPortfolioPage + PfdV1 sticky rail).
   Card DNA mirrors the Custom Builder "Blade Archive": dark hero photo,
   bottom scrim with brand line + title/price on one baseline.
   ══════════════════════════════════════════════════════════════════ */

/* ── Breadcrumb (shared with PDP) ── */
.pf-breadcrumb { display: flex; align-items: center; gap: 6px; padding: 18px 0 16px; font-size: 14px; color: var(--fg-tertiary); }
.pf-breadcrumb a { color: var(--fg-secondary); text-decoration: none; }
.pf-breadcrumb a:hover { color: var(--ink-900); }

/* ── Listing header ── */
.pf-head { padding-top: 16px; }
.pf-title { font-family: var(--font-display); font-weight: 500; font-size: 36px; line-height: 42px; letter-spacing: -.015em; color: var(--ink-900); margin: 0 0 6px; }
.pf-desc { margin: 0 0 28px; font-size: 14px; color: var(--fg-secondary); max-width: 720px; line-height: 22px; }

/* ── Brand filter chips ── */
.pf-filters { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
/* grey until hovered (a lighter dark) or selected (dark, doubled border) - page-portfolio.js moves .is-active */
.pf-pill { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 6px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; color: var(--fg-secondary); font-family: var(--font-ui); font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .15s, box-shadow .15s, color .15s; }
.pf-pill.no-avatar { padding: 0 16px; }
.pf-pill:hover { border-color: var(--brand-700); color: var(--brand-700); }
.pf-pill.is-active { border-color: var(--brand-900); box-shadow: 0 0 0 1px var(--brand-900) inset; color: var(--brand-900); font-weight: 600; }
/* the logo ring takes the pill's border colour */
.pf-pill-avatar { width: 30px; height: 30px; border-radius: 50%; color: #fff; border: 1px solid; border-color: inherit; transition: border-color .15s; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: -.01em; flex-shrink: 0; }
.pf-pill-count { font-size: 11px; color: var(--fg-tertiary); font-weight: 500; padding-left: 8px; border-left: 1px solid var(--border); margin-left: 2px; }

/* ── Grid ── */
.pf-showing { font-size: 13px; color: var(--fg-tertiary); padding: 20px 0 16px; }
.pf-showing b { color: var(--ink-900); font-weight: 600; }
.pf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.pf-card { position: relative; display: block; aspect-ratio: 628 / 420; border-radius: 8px; overflow: hidden; background: #1c2a26; color: #fff; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.pf-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .35); }
/* Card is an <a>; keep its text white on hover/focus so the global a:hover
   accent color never tints the title/price. Text never changes color here. */
.pf-card, .pf-card:hover, .pf-card:focus, .pf-card:active { color: #fff; }
.pf-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.pf-card:hover .pf-card-img { transform: scale(1.04); }
.pf-card-scrim { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 20px 20px; background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .85) 100%); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; transition: background .25s ease; }
.pf-card:hover .pf-card-scrim { background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .68) 48%, rgba(0, 0, 0, .94) 100%); }
.pf-card-info { min-width: 0; max-width: calc(100% - 80px); }
.pf-card-brand { font-family: var(--font-ui); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .78); margin-bottom: 6px; }
.pf-card-title { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-card-price { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: -.01em; flex-shrink: 0; }
.pf-card[hidden] { display: none; }

.pf-more-wrap { padding-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pf-more {  display: inline-block;
    padding: 12px 36px; text-align: center; min-width: 260px;  border: 1px solid var(--ink-900); background: #fff; color: var(--ink-900); font-family: var(--font-display); font-size: 15px; font-weight: 500; letter-spacing: .02em; border-radius: 8px; cursor: pointer; transition: background .16s, color .16s; }
.pf-more:hover { background: var(--ink-900); color: #fff; }
.pf-more-shown { font-size: 13px; color: var(--fg-tertiary); }

/* ══════════════════════════════════════════════════════════════════
   PROJECT DETAIL (V1 — sticky spec rail)
   ══════════════════════════════════════════════════════════════════ */
/* Featured image — full-width hero at the top on mobile (desktop keeps the
   clean spec-rail layout). */
.pfd-hero { display: none; }

/* clear of the nav - the hero photo sits above it on mobile instead (≤720) */
.pfd-title { font-family: var(--font-display); font-weight: 500; font-size: 44px; line-height: 52px; letter-spacing: -.02em; color: var(--ink-900); margin: 40px 0 24px; text-wrap: pretty; }

.pfd-meta { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 24px; align-items: end; padding: 20px 0 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.pfd-meta-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-tertiary); font-weight: 600; margin-bottom: 4px; }
.pfd-meta-val { font-size: 16px; font-weight: 600; color: var(--ink-900); letter-spacing: -.01em; }
.pfd-brand-link { background: transparent; border: none; padding: 0; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--ink-900); letter-spacing: -.01em; font-family: var(--font-display); border-bottom: 1px dashed var(--ink-900); line-height: 1.2; transition: color .16s, border-color .16s; }
.pfd-brand-link:hover { color: var(--accent-500); border-bottom-style: solid; border-color: var(--accent-500); }
.pfd-cta-row { display: flex; gap: 10px; align-self: center; justify-content: flex-end; }
.pfd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; font-family: var(--font-display); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; border: 1px solid transparent; }
.pfd-btn-secondary { background: #fff; color: var(--ink-900); border-color: var(--border-strong); }
.pfd-btn-secondary:hover { background: var(--ink-100); }
.pfd-btn-primary { background: var(--accent-500); color: #fff; border-color: var(--accent-500); }
.pfd-btn-primary:hover { background: var(--accent-600); color:#fff; }

.pfd-quote-row { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.pfd-quote { margin: 0; padding: 0; font-size: 16px; line-height: 24px; font-style: italic; color: var(--fg-secondary); max-width: 700px; }
.pfd-review-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-900); text-decoration: none; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px; white-space: nowrap; transition: background .16s; }
.pfd-review-link:hover { background: var(--ink-100); }
.pfd-yt { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 14px; border-radius: 3px; background: #ff0000; color: #fff; }

/* Body — sticky rail + photo strips */
.pfd-body { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.pfd-rail { position: sticky; top: 24px; }
.pfd-rail-title { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-tertiary); font-weight: 600; padding-bottom: 10px; border-bottom: 2px solid var(--ink-900); margin-bottom: 4px; }
.pfd-acc { border-bottom: 1px solid var(--border); }
.pfd-acc-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; background: transparent; border: none; cursor: pointer; font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--ink-900); letter-spacing: -.005em; }
.pfd-acc-btn > span { display: flex; align-items: center; gap: 10px; }
.pfd-acc-num { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--fg-tertiary); }
.pfd-acc-chev { transition: transform .18s; color: var(--fg-secondary); }
.pfd-acc.is-open .pfd-acc-chev { transform: rotate(180deg); }
.pfd-acc-body { margin: 0; padding: 2px 0 16px; display: none; }
.pfd-acc.is-open .pfd-acc-body { display: block; }
.pfd-spec { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 7px 0; }
.pfd-spec + .pfd-spec { border-top: 1px dashed var(--border); }
.pfd-spec dt { font-size: 12px; color: var(--fg-tertiary); }
.pfd-spec dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-900); text-align: right; letter-spacing: -.005em; max-width: 180px; }

.pfd-sections { display: flex; flex-direction: column; gap: 56px; min-width: 0; }
.pfd-sec-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-tertiary); font-weight: 600; margin-bottom: 6px; }
.pfd-sec-title { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 28px; letter-spacing: -.01em; color: var(--ink-900); margin: 0 0 20px; }

/* Horizontal photo strip */
.pfd-strip-wrap { position: relative; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; }
.pfd-strip { display: flex; gap: 12px; overflow-x: scroll; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--ink-900) var(--ink-100); -webkit-overflow-scrolling: touch; }
.pfd-strip::-webkit-scrollbar { height: 5px; -webkit-appearance: none; }
.pfd-strip::-webkit-scrollbar-track { background: var(--ink-100); border-radius: 3px; }
.pfd-strip::-webkit-scrollbar-thumb { background: var(--ink-900); border-radius: 3px; }
.pfd-strip::-webkit-scrollbar-thumb:hover { background: #000; }
.pfd-strip-item { display:inline-block; flex: 0 0 auto; height: 360px; width: auto; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; padding: 0; cursor: zoom-in; background: var(--ink-100); position: relative; }
.pfd-strip-item img { width: auto; height: 100%; object-fit: cover; display: block; }
.pfd-strip-eye { position: absolute; bottom: 10px; right: 10px; width: 28px; height: 28px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; }
/* A thin native scrollbar is the scroll affordance now — no arrows or dots. */

.pfd-inuse { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pfd-inuse-tile { aspect-ratio: 620 / 350; border-radius: 10px; overflow: hidden; background: var(--ink-100); border: 1px solid var(--border); position: relative; }
.pfd-inuse-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pfd-inuse-badge { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 600; letter-spacing: .08em; color: #fff; background: rgba(0, 0, 0, .6); padding: 3px 7px; border-radius: 4px; }
.pfd-similar { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ── Tablet / mobile ── */
@media (max-width: 960px) {
  .pfd-body { grid-template-columns: 1fr; gap: 28px; }
  .pfd-rail { position: static; }
  .pfd-title { font-size: 34px; line-height: 40px; }
  .pfd-meta { grid-template-columns: 1fr 1fr; }
  .pfd-cta-row { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .pf-breadcrumb { padding: 10px 0 8px; margin-bottom: 13px; border-bottom: 1px solid var(--border); }
  .pf-title { font-size: 28px; line-height: 34px; }
  .pf-grid { grid-template-columns: 1fr; gap: 18px; }
  .pfd-title { font-size: 26px; line-height: 32px; margin-top: 0; }
  /* Promote the meta cells into the header grid so the CTA can drop below the
     review on mobile. Order: title → forged (full) → price|processing → review → CTA. */
  [data-pfd-page] > header { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 16px; }
  .pfd-title { grid-column: 1 / -1; }
  .pfd-meta { display: contents; }
  .pfd-meta > div:nth-child(1) { grid-column: 1 / -1; order: 1; padding-top: 16px; border-top: 1px solid var(--border); }
  .pfd-meta > div:nth-child(2) { order: 2; }
  .pfd-meta > div:nth-child(3) { order: 3; }
  .pfd-quote-row { grid-column: 1 / -1; order: 4; grid-template-columns: 1fr; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
  .pfd-cta-row { grid-column: 1 / -1; order: 5; justify-content: stretch; }
  .pfd-review-link { justify-self: start; }
  /* Featured image: true full-bleed under the breadcrumb — no side or top gap. */
  [data-pfd-page] .pf-breadcrumb { margin-bottom: 0; }
  .pfd-hero { display: block; width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 20px; }
  .pfd-strip-item { height: 260px; }
  .pfd-inuse, .pfd-similar { grid-template-columns: 1fr; }
  .pfd-cta-row { flex-direction: column; }
  .pfd-btn { width: 100%; }
}
