/* WO435: one product cell, one count bar, one Filter & sort panel, shared by /shop and the four /gifts pages.
   Black and white, square checks, rectangular tags, nothing round. Words, sizes and the 2px paper gap are the owner-signed spec (XS topic shop-and-gifts-one-grid-one-panel, 11-18). */

/* ---- tabs (the gifts pages' tab row; /shop uses it for All · Designers · Entry · Editions) ---- */
.ui-tabs { display: flex; justify-content: center; gap: 40px; padding: 16px; border-top: 1px solid var(--hairline, rgba(128,128,128,.3)); border-bottom: 1px solid var(--hairline, rgba(128,128,128,.3)); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.ui-tabs a { position: relative; color: inherit; text-decoration: none; opacity: .55; padding: 0 0 5px; border-bottom: 1px solid transparent; display: inline-flex; align-items: flex-end; }
.ui-tabs a::before { content: ""; position: absolute; left: -8px; right: -8px; top: -14px; bottom: -14px; }   /* the 44px tap area, invisible */
.ui-tabs a:focus { outline: none; }
.ui-tabs a:focus-visible { outline: 1px solid var(--ink, #111110); outline-offset: 2px; }   /* keyboard only: thin, square, close to the text; a mouse click shows nothing */
.ui-tabs a:hover, .ui-tabs a:focus-visible { opacity: 1; }
.ui-tabs a[aria-current="true"] { opacity: 1; border-bottom-color: var(--wine, #7a1f2b); }

/* ---- count bar: the count on the left, Filter & sort on the right ---- */
.ui-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 40px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.ui-bar .ui-count { opacity: .6; }
.ui-bar button { background: none; border: 0; border-radius: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; min-height: 44px; padding: 0; border-bottom: 1px solid transparent; }
.ui-bar button:hover, .ui-bar button:focus-visible, .ui-bar button[aria-expanded="true"] { border-bottom-color: var(--wine, #7a1f2b); }

/* ---- the product cell ---- */
.pc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.pc-grid > .grid-empty { grid-column: 1 / -1; padding: 48px 24px; text-align: center; }
.pc-grid > .pc--row-start { grid-column-start: 1; }
.pc { display: block; position: relative; color: inherit; text-decoration: none; padding-bottom: 26px; }
.pc-im { display: block; position: relative; aspect-ratio: 4 / 5; background: #fff; overflow: hidden; }
.pc-im picture { display: block; width: 100%; height: 100%; }
.pc-im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-im::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; pointer-events: none; transition: border-color .2s ease; }
.pc:hover .pc-im::after, .pc:focus-visible .pc-im::after { border-color: var(--hairline-strong, rgba(17,17,16,.4)); }
.pc:focus-visible { outline: none; }
.pc-tx { display: block; padding: 14px 16px 0; text-align: center; }
.pc-by { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .55; }
.pc-nm { display: block; margin-top: 6px; font-size: 13px; letter-spacing: .04em; }
/* the material line: its space is reserved so nothing jumps; it appears on hover and keyboard focus, and is always shown on phones */
.pc-mat { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 1.5em; margin-top: 4px; font-size: 12px; line-height: 1.5; opacity: 0; transition: opacity .2s ease; }
.pc:hover .pc-mat, .pc:focus-visible .pc-mat { opacity: .6; }
@media (hover: none) { .pc-mat { opacity: .6; } }
.pc-pr { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .06em; color: var(--wine, #7a1f2b); }
.pc-pr s { opacity: .55; margin-right: .4em; color: inherit; }
.pc-pr .sold { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--grey, #6a6a66); }
.pc.is-sold img { opacity: .55; }

/* ---- the /shop page head (the gifts pages have their hero instead) ---- */
main.shop-v3 { padding: calc(56px + 40px) 0 0; max-width: none; }
.shop-v3 .shop-top { text-align: center; padding: 0 24px 40px; }
.shop-v3 .shop-top .shop-label { display: block; color: var(--wine, #7a1f2b); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.shop-v3 .shop-top h1 { margin: 12px 0 0; font-size: 34px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.shop-v3 .shop-active { margin: 14px 0 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.shop-v3 .shop-more { text-align: center; margin: 32px 0 var(--space-4, 4rem); }

/* ---- the Filter & sort panel: a drawer from the right on desktop, a sheet from the bottom on phones ---- */
body.fp-open { overflow: hidden; }
.fp[hidden] { display: none; }
.fp { position: fixed; inset: 0; z-index: 100; }
.fp-dim { position: absolute; inset: 0; background: rgba(17, 17, 16, .45); }
.fp-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100%; display: flex; flex-direction: column; background: var(--paper, #f4f4f1); color: var(--ink, #111110); outline: none; animation: fpIn .28s ease both; }
@keyframes fpIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fpUp { from { transform: translateY(100%); } to { transform: none; } }
.fp-head { display: flex; justify-content: space-between; align-items: center; flex: none; min-height: 56px; padding: 0 24px; border-bottom: 1px solid var(--hairline, rgba(17,17,16,.18)); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.fp-head h2 { margin: 0; font: inherit; letter-spacing: inherit; }
.fp-close { background: none; border: 0; border-radius: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; min-height: 44px; padding: 0 0 0 16px; }
.fp-body { flex: 1 1 auto; overflow-y: auto; padding: 0 24px; }
.fp-group { margin: 0; padding: 22px 0; border: 0; border-bottom: 1px solid var(--hairline, rgba(17,17,16,.18)); min-width: 0; }
.fp-group:last-child { border-bottom: 0; }
.fp-group legend + * { clear: both; }
.fp-group legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--grey, #6a6a66); }
.fp-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: 13px; cursor: pointer; }
.fp-row input { position: absolute; left: 0; top: 50%; width: 16px; height: 16px; margin: -8px 0 0; opacity: 0; cursor: pointer; }
.fp-box { flex: none; position: relative; width: 14px; height: 14px; border: 1px solid var(--ink, #111110); background: transparent; border-radius: 0; }
.fp-row input:checked + .fp-box::after { content: ""; position: absolute; left: 3px; top: -1px; width: 4px; height: 8px; border: solid var(--ink, #111110); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.fp-row input:focus-visible + .fp-box { outline: 2px solid var(--ink, #111110); outline-offset: 2px; }
.fp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-tag { font: inherit; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; min-height: 34px; padding: 0 14px; background: transparent; color: var(--ink, #111110); border: 1px solid var(--hairline-strong, rgba(17,17,16,.4)); border-radius: 0; cursor: pointer; }
.fp-tag[aria-pressed="true"] { background: #111110; color: #fff; border-color: #111110; }
.fp-tag:focus-visible { outline: 2px solid var(--ink, #111110); outline-offset: 2px; }
.fp-tag:disabled { opacity: .35; cursor: default; }
.fp-foot { display: flex; gap: 12px; flex: none; padding: 16px 24px; border-top: 1px solid var(--hairline, rgba(17,17,16,.18)); }
.fp-foot button { flex: 1 1 0; min-height: 44px; padding: 0 12px; font: inherit; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; border-radius: 0; cursor: pointer; }
.fp-clear { background: transparent; color: var(--ink, #111110); border: 1px solid var(--ink, #111110); }
.fp-show { flex-grow: 1.5 !important; background: #111110; color: #fff; border: 1px solid #111110; }
.fp-foot button:focus-visible, .fp-close:focus-visible { outline: 2px solid var(--ink, #111110); outline-offset: 2px; }
.fp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  .ui-tabs { justify-content: flex-start; gap: 22px; font-size: 10px; }
  .ui-bar { padding-left: 16px; padding-right: 16px; }
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-grid > .pc--row-start { grid-column-start: 1; }
  main.shop-v3 { padding-top: calc(56px + 24px); }
  .shop-v3 .shop-top { padding-bottom: 24px; }
  .shop-v3 .shop-top h1 { font-size: 24px; }
  .pc-tx { padding: 12px 8px 0; }
  .pc-mat { opacity: .6; min-height: 3em; }
}
@media (max-width: 600px) {
  .fp-panel { top: auto; left: 0; right: 0; width: auto; height: 88%; animation-name: fpUp; }
  .fp-tag { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .fp-panel { animation: none; } .pc-mat, .pc-im::after { transition: none; } }

/* ---- the fixed Filter & sort button: bottom centre while the grid is on screen; gives way to the footer and to the panel ---- */
.fp-float { white-space: nowrap; position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; background: #fff; color: var(--ink, #111110); border: 1px solid var(--hairline-strong, rgba(17,17,16,.4)); border-radius: 0; box-shadow: 0 6px 24px rgba(17, 17, 16, .14); font: inherit; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transform: translate(-50%, 12px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.fp-float.is-on { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.fp-float:focus-visible { outline: 2px solid var(--ink, #111110); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .fp-float, .fp-float.is-on { transition: none; } }

/* ---- /shop sections (All view, Featured, no filter): one inset picture per line, then that line's products ---- */
.shop-sections { display: block; }
.ps { margin: 0; }
.ps-pic { display: block; position: relative; margin: 56px 8.3% 44px; aspect-ratio: 16 / 9; overflow: hidden; background: #ddd; color: #fff; text-decoration: none; }
.ps:first-child .ps-pic { margin-top: 28px; }
.ps-pic picture, .ps-pic img { display: block; width: 100%; height: 100%; }
.ps-pic img { object-fit: cover; object-position: var(--pos, 50% 50%); }
.ps-pic::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(0deg, rgba(0,0,0,.42), rgba(0,0,0,0)); pointer-events: none; }
.ps-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 8%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 16px; }
.ps-lab { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.ps-nm { margin-top: 8px; font-size: 30px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
.ps-go { position: relative; margin-top: 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; padding-bottom: 4px; }
.ps-go::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: left center; }
.ps-pic:hover .ps-go::after, .ps-pic:focus-visible .ps-go::after { animation: fxDraw .7s var(--fx-ease); }
.ps-pic:hover .ps-go .fx-ar, .ps-pic:focus-visible .ps-go .fx-ar { transform: translateX(5px); }
@media (prefers-reduced-motion: reduce) { .ps-go::after { animation: none !important; } .ps-go .fx-ar { transform: none !important; } }
.ps-pic:focus-visible { outline: 2px solid var(--ink, #111110); outline-offset: 3px; }
.ps .pc-grid { margin-bottom: 0; }
.ps + .ps .pc-grid, .ps .pc-grid { padding-bottom: 0; }
.ps::after { content: ""; display: block; height: 30px; }
@media (max-width: 760px) {
  .ps-pic { margin: 40px 16px 28px; aspect-ratio: 4 / 5; }
  .ps:first-child .ps-pic { margin-top: 20px; }
  .ps-nm { font-size: 24px; }
}
