/* ==========================================================================
   Skyline Polyfab — bag listing  (prefix: pl-)
   1 Hero + hanging bag tag   2 Sticky toolbar   3 Results head   4 Bag grid
   5 Empty state              6 Quick guide      7 CTA band
   ========================================================================== */

@keyframes plRise { from { opacity: 0; transform: translateY(18px); } }
@keyframes plSwing { 0%, 100% { rotate: -1.7deg; } 50% { rotate: 1.7deg; } }

/* 1 ── HERO ─────────────────────────────────────────────────────────────── */
.pl-hero { --zig: #fff; isolation: isolate; padding: clamp(30px, 3.6vw, 50px) 0 clamp(60px, 5.8vw, 84px); }
.pl-hero__in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.pl-hero__copy { min-width: 0; }
.pl-hero h1 { max-width: 20ch; margin-bottom: .32em; font-size: clamp(2.2rem, 1.25rem + 3.5vw, 3.9rem); }
.pl-hero .lead { max-width: 54ch; margin-bottom: 1.5rem; }
.pl-hero .breadcrumb { margin-bottom: 20px; }
.pl-hero .eyebrow { margin-bottom: .9rem; }
.pl-hero__copy > * { animation: plRise .8s var(--ease) both; }
.pl-hero__copy > :nth-child(2) { animation-delay: .06s; }
.pl-hero__copy > :nth-child(3) { animation-delay: .12s; }
.pl-hero__copy > :nth-child(4) { animation-delay: .18s; }
.pl-hero__copy > :nth-child(5) { animation-delay: .24s; }

.pl-hero__ghost { position: absolute; z-index: 0; right: calc(var(--gutter) - 6px); top: 96px; font: 800 clamp(8.5rem, 40vw, 15rem)/.8 var(--font-display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .14); pointer-events: none; user-select: none; }

.pl-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pl-facts li { display: inline-flex; align-items: center; gap: .5em; padding: .55em 1.05em; border-radius: var(--r-pill); background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font: 700 .86rem/1.15 var(--font-body); }
.pl-facts b { color: var(--lime-400); font: 800 1.12em/1 var(--font-display); }

/* the hanging bag tag (tablet + desktop) */
.pl-hero__art { display: none; position: relative; justify-self: center; width: 100%; max-width: 250px; padding-top: 40px; }
.pl-tag { position: relative; transform-origin: 50% -560px; animation: plSwing 8s ease-in-out infinite; }
.pl-tag__shadow { filter: drop-shadow(0 26px 34px rgba(3, 22, 50, .55)); }
.pl-tag__thread { position: absolute; left: 50%; bottom: calc(100% - 40px); width: 120px; height: 640px; translate: -50% 0; overflow: visible; pointer-events: none; }
.pl-tag__thread path { fill: none; stroke: rgba(255, 255, 255, .78); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pl-tag__thread path + path { stroke: rgba(154, 215, 106, .9); }
/* thread-draw: JS adds .is-drawing for a frame so the strokes start hidden, then transition to drawn */
.pl-tag.is-drawing .pl-tag__thread path { stroke-dashoffset: 1; transition: none; }
.pl-tag .pl-tag__thread path { transition: stroke-dashoffset 1.7s var(--ease); }
.pl-tag .pl-tag__thread path + path { transition-delay: .25s; }
.pl-tag__card { position: relative; aspect-ratio: 4 / 4.8; padding: 2px; border-radius: 0 0 26px 26px; clip-path: polygon(24% 0, 76% 0, 100% 46px, 100% 100%, 0 100%, 0 46px); background: linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .22) 55%, rgba(154, 215, 106, .6)); }
.pl-tag__face { position: relative; height: 100%; display: flex; flex-direction: column; padding: 70px clamp(18px, 2.2vw, 24px) 18px; border-radius: 0 0 24px 24px; clip-path: polygon(24% 0, 76% 0, 100% 45px, 100% 100%, 0 100%, 0 45px); color: #fff;
  background: linear-gradient(180deg, rgba(4, 32, 74, .6) 0%, rgba(4, 32, 74, .9) 60%, rgba(3, 22, 50, .96) 100%), url("../../assets/img/stock/fabric-closeup.jpg") center / cover; }
.pl-tag__hole { position: absolute; top: 20px; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--navy-950); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .65), 0 0 0 5px rgba(255, 255, 255, .9), 0 0 0 7px rgba(255, 255, 255, .25); }
.pl-tag__label { font: 800 .72rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--lime-200); }
.pl-tag__num { display: block; margin: .08em 0 .02em; font: 800 clamp(3.6rem, 6.2vw, 5.2rem)/.92 var(--font-display); letter-spacing: -.055em; color: #fff; text-shadow: 0 4px 22px rgba(3, 22, 50, .6); }
.pl-tag__sub { font-weight: 700; font-size: .92rem; color: var(--on-dark); }
.pl-tag__seam { display: block; margin: auto 0 12px; height: 3px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 10px, transparent 10px 17px); }
.pl-tag__types { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.pl-tag__types li { padding: .3em .62em; border-radius: var(--r-pill); background: rgba(255, 255, 255, .1); color: var(--on-dark); font: 800 .64rem/1 var(--font-body); letter-spacing: .07em; text-transform: uppercase; transition: background-color .3s, color .3s; }
.pl-tag__types li.is-on { background: var(--lime-400); color: var(--navy-950); }

@media (min-width: 760px) {
  .pl-hero__in { grid-template-columns: minmax(0, 1fr) clamp(190px, 25vw, 290px); gap: clamp(28px, 5vw, 72px); }
  .pl-hero__art { display: block; }
  .pl-hero__ghost { display: none; }
}

/* 2 ── STICKY TOOLBAR (search + sort) ───────────────────────────────────── */
.pl-catalog { position: relative; padding-bottom: clamp(56px, 7vw, 96px); }
.pl-sentinel { height: 0; }
.pl-bar { position: sticky; top: var(--pl-top, 76px); z-index: 40; background: rgba(255, 255, 255, .93); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); transition: box-shadow .3s, translate .38s var(--ease), opacity .25s, visibility 0s; }
.pl-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 10px, transparent 10px 17px); }
.pl-bar.is-stuck { box-shadow: 0 14px 28px -14px rgba(4, 32, 74, .24); }
.pl-bar__in { padding-block: 12px 14px; }
.pl-bar__row { display: flex; align-items: center; gap: 10px; }

.pl-search { position: relative; flex: 1 1 auto; min-width: 0; max-width: 480px; }
.pl-search__input { min-height: 46px; padding: .55em .9em .55em 2.85em; border-radius: var(--r-pill); font-size: .96rem; background-color: var(--surface); border-color: transparent; }
.pl-search__input::placeholder { color: var(--ink-3); opacity: 1; }
.pl-search__input:hover { border-color: var(--blue-300); }
.pl-search__input:focus { background-color: #fff; }
.pl-search__input::-webkit-search-cancel-button, .pl-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.pl-search.has-value .pl-search__input { padding-right: 3em; }
.pl-search__icon { position: absolute; left: 17px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.pl-search:focus-within .pl-search__icon { color: var(--blue-600); }
.pl-search__clear { position: absolute; right: 1px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); }
.pl-search__clear[hidden] { display: none; }
.pl-search__clear .icon { width: 18px; height: 18px; padding: 3px; box-sizing: content-box; border-radius: 50%; background: var(--line); transition: background-color .2s; }
.pl-search__clear:hover .icon { background: var(--line-2); }
.pl-search__kbd { position: absolute; right: 14px; top: 50%; translate: 0 -50%; display: none; padding: .2em .55em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 7px; background: #fff; color: var(--ink-3); font: 700 .75rem/1.2 var(--font-body); pointer-events: none; }
@media (min-width: 1025px) and (hover: hover) { .pl-search__input { padding-right: 2.8em; } .pl-search__kbd { display: block; } .pl-search:focus-within .pl-search__kbd, .pl-search.has-value .pl-search__kbd { display: none; } }

.pl-count { display: none; margin: 0 auto 0 6px; white-space: nowrap; font: 600 .92rem/1 var(--font-body); color: var(--ink-2); }
.pl-count b { font: 800 1.15rem/1 var(--font-display); color: var(--ink); }
.pl-sort { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.pl-sort__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.pl-sort__select { width: auto; min-width: 108px; min-height: 46px; padding-block: .5em; border-radius: var(--r-pill); font-weight: 700; font-size: .92rem; background-color: var(--surface); border-color: transparent; padding-left: 1.1em; }
.pl-sort__select:hover { border-color: var(--blue-300); }
.pl-sort__select:focus { background-color: #fff; }
@media (min-width: 720px) {
  .pl-bar__row { gap: 18px; }
  .pl-count { display: block; margin: 0; }
  .pl-sort__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .pl-bar__in { padding-block: 14px 16px; }
}

/* phones & tablets: the whole bar slides away under the header while scrolling down, and returns on scroll up */
@media (max-width: 1024px) {
  .pl-bar.is-compact { translate: 0 -100%; opacity: 0; visibility: hidden; pointer-events: none; transition: box-shadow .3s, translate .38s var(--ease), opacity .25s, visibility 0s .38s; }
}

/* 3 ── RESULTS HEAD ─────────────────────────────────────────────────────── */
.pl-body { padding-top: clamp(22px, 3vw, 36px); }
.pl-anchor { height: 0; }
.pl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; }
.pl-head__count { margin: 0; font: 700 .95rem/1.3 var(--font-body); color: var(--ink); }
.pl-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pl-pills__label { font: 800 .72rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-right: 2px; }
.pl-pill { display: inline-flex; align-items: center; gap: .55em; min-height: 40px; padding: .3em .65em .3em 1em; border: 1px solid var(--blue-300); border-radius: var(--r-pill); background: var(--blue-50); color: var(--navy-700); font: 700 .85rem/1.1 var(--font-body); transition: background-color .2s, border-color .2s; }
.pl-pill:hover { background: var(--blue-100); border-color: var(--blue-500); }
.pl-pill .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(0, 56, 120, .1); }
.pl-reset { min-height: 40px; padding-inline: 6px; color: var(--blue-600); font-weight: 700; font-size: .88rem; }
.pl-head:not(.has-filters) .pl-pills { display: none; }
@media (min-width: 720px) {
  .pl-head__count { display: none; }
  .pl-head:not(.has-filters) { display: none; }
}

/* 4 ── BAG GRID ─────────────────────────────────────────────────────────── */
.pl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 28px); margin: 0; padding: 0; list-style: none; }
.pl-grid[hidden] { display: none; }
.pl-item { display: flex; min-width: 0; }
.pl-item[hidden] { display: none !important; }
.pl-item > .product-card { width: 100%; }
/* the reveal rule would otherwise replace the card's own hover transition */
.pl-grid .product-card[data-reveal] { transition: opacity .8s var(--ease), transform .8s var(--ease), translate .3s var(--ease), box-shadow .3s var(--ease); }
.pl-grid .product-card:focus-within { box-shadow: var(--shadow-2); border-color: var(--blue-300); }
.pl-grid .product-card__media { aspect-ratio: 16 / 10; }
.pl-grid .product-card__media::after { content: ""; position: absolute; inset: 9px; border: 2px dashed rgba(255, 255, 255, 0); border-radius: 16px; transition: border-color .35s; pointer-events: none; }
.pl-grid .product-card:hover .product-card__media::after { border-color: rgba(255, 255, 255, .85); }
.pl-grid .product-card__cat { z-index: 2; }
.pl-ico { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--green-700); box-shadow: var(--shadow-1); }
.pl-ico .icon { width: 21px; height: 21px; }
.pl-grid .product-card__text { margin-bottom: 8px; }
.pl-grid .product-card__foot { flex-wrap: wrap; gap: 4px 10px; }
.pl-grid .product-card__foot .link-arrow { min-height: 44px; }
.pl-noscript { padding: clamp(18px, 3vw, 28px); border: 2px dashed var(--line-2); border-radius: var(--r-lg); }
.pl-noscript p { margin: 0 0 .8em; }
.pl-noscript ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.pl-noscript a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

@media (min-width: 1280px) {
  .pl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .pl-grid .product-card__media { aspect-ratio: 4 / 3; }
  .pl-grid .product-card__body { padding: 18px 18px 20px; }
}
@media (max-width: 679px) { .pl-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
@media (min-width: 480px) and (max-width: 679px) { .pl-grid .product-card__media { aspect-ratio: 16 / 9; } }

/* 5 ── EMPTY STATE ──────────────────────────────────────────────────────── */
.pl-empty { display: grid; justify-items: center; gap: 14px; padding: clamp(36px, 6vw, 72px) clamp(18px, 4vw, 48px); text-align: center; border: 2px dashed var(--line-2); border-radius: var(--r-xl); background: var(--surface) var(--weave-on-light); animation: plRise .6s var(--ease) both; }
.pl-empty[hidden] { display: none; }
.pl-empty__art { width: min(220px, 60vw); height: auto; margin-bottom: 4px; }
.pl-empty__shadow { fill: rgba(4, 32, 74, .1); }
.pl-empty__sack { fill: var(--blue-100); stroke: var(--navy-700); stroke-width: 3; stroke-linejoin: round; }
.pl-empty__seam { fill: none; stroke: var(--navy-700); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 5 6; }
.pl-empty__weave { fill: none; stroke: var(--blue-300); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 7; }
.pl-empty__lens circle { fill: rgba(255, 255, 255, .88); stroke: var(--green-600); stroke-width: 5; }
.pl-empty__handle { fill: none; stroke: var(--green-700); stroke-width: 8; stroke-linecap: round; }
.pl-empty__q { fill: none; stroke: var(--navy-700); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.pl-empty__title { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); max-width: 24ch; overflow-wrap: anywhere; }
.pl-empty__text { max-width: 52ch; margin: 0; color: var(--ink-2); }
.pl-empty__sugg { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.pl-empty__sl { font: 800 .72rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.pl-sugg { min-height: 44px; padding: 0 1.1em; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: #fff; color: var(--navy-700); font: 700 .9rem/1 var(--font-body); transition: border-color .2s, background-color .2s, color .2s; }
.pl-sugg:hover { border-color: var(--navy-700); background: var(--blue-50); }
.pl-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

/* 6 ── QUICK GUIDE ──────────────────────────────────────────────────────── */
.pl-guide { overflow: hidden; }
.pl-guide__zig { position: absolute; left: 0; right: 0; --zig: #fff; }
.pl-guide__zig--top { top: -1px; }
.pl-guide__zig--bottom { bottom: -1px; }
.pl-guide__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.pl-gcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 2.4vw, 30px); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-1); overflow: hidden; transition: translate .3s var(--ease), box-shadow .3s var(--ease); }
.pl-gcard:hover { translate: 0 -5px; box-shadow: var(--shadow-2); }
.pl-gcard::after { content: ""; position: absolute; inset: 8px; border: 2px dashed rgba(0, 56, 120, .09); border-radius: 18px; pointer-events: none; }
.pl-gcard__tag { align-self: flex-start; padding: .45em .9em; border-radius: 10px 10px 10px 3px; background: var(--navy-700); color: #fff; font: 800 .86rem/1 var(--font-display); letter-spacing: .1em; }
.pl-gcard h3 { margin: .15em 0 0; font-size: 1.22rem; }
.pl-gcard p { margin: 0; color: var(--ink-3); font-size: .95rem; }
.pl-gcard__list { display: grid; gap: .5em; margin: 2px 0 0; padding: 0; list-style: none; }
.pl-gcard__list li { position: relative; padding-left: 1.5em; font-weight: 600; font-size: .92rem; color: var(--ink); line-height: 1.4; }
.pl-gcard__list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--green-600); border-bottom: 2.5px solid var(--green-600); transform: rotate(-45deg) scale(.85); transform-origin: left top; translate: 0 2px; }
.pl-gcard__links { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.pl-gcard__links .link-arrow { min-height: 44px; font-size: .94rem; }
.pl-gcard--ask { background: var(--navy-900) var(--weave-on-dark); border-color: transparent; }
.pl-gcard--ask::after { border-color: rgba(255, 255, 255, .16); }
.pl-gcard--ask .pl-gcard__tag { background: var(--lime-400); color: var(--navy-950); }
.pl-gcard--ask h3 { color: #fff; }
.pl-gcard--ask p { color: var(--on-dark); }
.pl-gcard--ask .btn { margin-top: auto; align-self: flex-start; }
@supports (grid-template-rows: subgrid) {
  .pl-guide__grid { row-gap: 0; margin-bottom: calc(clamp(16px, 2vw, 24px) * -1); }
  .pl-gcard { display: grid; grid-template-rows: subgrid; grid-row: span 5; gap: 0; align-content: start; margin-bottom: clamp(16px, 2vw, 24px); }
  .pl-gcard__tag { grid-row: 1; justify-self: start; margin-bottom: 14px; }
  .pl-gcard h3 { grid-row: 2; margin: 0 0 .5em; }
  .pl-gcard p { grid-row: 3; margin-bottom: 14px; }
  .pl-gcard__list { grid-row: 4; margin: 0 0 16px; }
  .pl-gcard__links, .pl-gcard--ask .btn { grid-row: 5; margin-top: 0; }
  .pl-gcard__links { align-self: start; }
  .pl-gcard--ask .btn { align-self: end; justify-self: start; }
}
@media (max-width: 1100px) { .pl-guide__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  /* phones: swipeable row of guide cards */
  .pl-guide__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(84%, 340px); gap: 14px; margin-inline: calc(var(--gutter) * -1); padding: 8px var(--gutter) 22px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .pl-guide__grid::-webkit-scrollbar { display: none; }
  .pl-gcard { scroll-snap-align: start; }
  .pl-gcard:hover { translate: none; }
}
@supports (grid-template-rows: subgrid) {
  @media (max-width: 640px) {
    .pl-guide__grid { grid-template-rows: repeat(5, auto); margin-bottom: 0; row-gap: 0; }
    .pl-gcard { grid-row: 1 / span 5; margin-bottom: 0; }
  }
}

/* 7 ── CTA BAND ─────────────────────────────────────────────────────────── */
.pl-cta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.pl-cta__copy { position: relative; z-index: 2; }
.pl-cta h2 { max-width: 22ch; }
.pl-cta__actions { margin-top: 1.6rem; }
.pl-cta__swatches { position: relative; display: none; height: 230px; }
.pl-cta__sw { position: absolute; display: block; overflow: hidden; border: 3px solid rgba(255, 255, 255, .92); border-radius: 26px; box-shadow: 0 18px 36px rgba(3, 22, 50, .45); }
.pl-cta__sw::after { content: ""; position: absolute; inset: 7px; border: 2px dashed rgba(255, 255, 255, .7); border-radius: 18px; }
.pl-cta__sw img { width: 100%; height: 100%; object-fit: cover; }
.pl-cta__sw--a { width: 62%; aspect-ratio: 4 / 3; left: 4%; top: 0; rotate: -5deg; }
.pl-cta__sw--b { width: 56%; aspect-ratio: 1; right: 2%; top: 22%; rotate: 4deg; z-index: 2; }
.pl-cta__sw--c { width: 46%; aspect-ratio: 4 / 3; left: 14%; bottom: -2%; rotate: -2deg; z-index: 3; }
@media (max-width: 1099px) { .pl-cta__actions .btn { flex: 1 1 100%; } }
@media (min-width: 700px) {
  .pl-cta { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
  .pl-cta__swatches { display: block; }
}
@media (min-width: 1100px) { .pl-cta { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); } .pl-cta__swatches { height: 280px; } }

@media (prefers-reduced-motion: reduce) {
  .pl-tag { animation: none; }
  .pl-hero__copy > * { animation: none; }
}
