/* AG — Cinematic Intelligence · shop listing ("contact sheet")
   Loaded only on the shop, product-category and product-search pages when the
   cine shop listing is on. Product, cart and checkout pages keep the light canvas. */

/* ---------- back to the dark canvas (undo the light-shop tokens on these pages) ---------- */
body.theme-cine.cine-shop { background: #080808; }
body.theme-cine.cine-shop .grain { display: block; }
body.theme-cine.cine-shop .site-main {
  --bg: #080808; --bg-2: #0c0c0c; --bg-3: #121212;
  --ink: #edece7; --ink-soft: #b9b8b3; --ink-faint: #91918f;
  --line: rgba(237, 236, 231, .14); --line-strong: rgba(237, 236, 231, .32);
  --gold: #edece7; --gold-bright: #ffffff; --gold-deep: #91918f; --gold-faint: rgba(237, 236, 231, .06);
  --silver: #cfcec9; --silver-dim: #91918f; --panel: #121212; --panel-2: #181818;
  color: var(--ink-soft); padding-bottom: 0;
}
body.theme-cine.cine-shop .site-main :focus-visible { outline-color: var(--amber); }
body.theme-cine.cine-shop .site-main h1, body.theme-cine.cine-shop .site-main h2, body.theme-cine.cine-shop .site-main h3 { color: var(--ink); }

.cshop { max-width: var(--maxw); margin-inline: auto; padding: clamp(56px, 8vw, 120px) var(--gut) 0; }

/* ---------- head: title, description, plate, filter, search ---------- */
.cshop-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: end; position: relative; }
.cshop-top .ag-shop-toolbar { display: contents; }
.cshop-plate { grid-column: 9 / -1; grid-row: 1 / span 2; align-self: start; }
.cshop-plate .plate-screen { aspect-ratio: 4 / 3; max-height: none; }

body.cine-shop .cshop .ag-shop-toolbar .page-title {
  grid-column: 1 / span 8; grid-row: 1; margin: 0 0 clamp(20px, 2.6vw, 44px); padding: 0;
  font: 800 clamp(3.4rem, 12vw, 13rem)/.84 var(--f-display); font-stretch: 62%; letter-spacing: -.012em; text-transform: uppercase; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere;
}
body.cine-shop .cshop .ag-shop-toolbar .page-title::after { content: "/"; }
body.cine-shop.search .cshop .ag-shop-toolbar .page-title { font-size: clamp(2.4rem, 6vw, 6rem); line-height: .92; }
body.cine-shop.search .cshop .ag-shop-toolbar .page-title::after { content: none; }
.js body.cine-shop .cshop .page-title { animation: cine-head var(--d-scene) var(--e-out) both; }

.cshop .page-description, .cshop .term-description { grid-column: 1 / span 7; grid-row: 2; margin: 0; }
.cshop .page-description p, .cshop .term-description p { margin: 0 0 1em; max-width: 62ch; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); }
.cshop .page-description p:first-child, .cshop .term-description p:first-child { font: 400 clamp(1.2rem, 1.7vw, 1.65rem)/1.32 var(--f-text); font-stretch: 92%; letter-spacing: -.012em; color: var(--ink); max-width: 44ch; text-wrap: pretty; }
.cshop .page-description a, .cshop .term-description a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-faint); }
.cshop .page-description a:hover, .cshop .term-description a:hover { color: var(--amber); text-decoration-color: var(--amber); }

/* category filter: mono tabs */
body.cine-shop .cshop .ag-cat-filter { grid-column: 1 / -1; grid-row: 3; justify-self: start; display: flex; flex-wrap: nowrap; gap: 0; max-width: 100%; margin: clamp(32px, 4vw, 64px) 0 0; padding: 0; border: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
body.cine-shop .cshop .ag-cat-filter::-webkit-scrollbar { display: none; }
body.cine-shop .cshop .ag-cat-filter__chip { flex: none; display: inline-flex; align-items: baseline; gap: 8px; min-height: 48px; padding: 16px 18px; margin: 0; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; white-space: nowrap; box-shadow: none; transition: color var(--d-quick) linear, background var(--d-quick) linear; }
body.cine-shop .cshop .ag-cat-filter__chip:last-child { border-right: 0; }
body.cine-shop .cshop .ag-cat-filter__chip:hover { color: var(--ink); background: transparent; }
body.cine-shop .cshop .ag-cat-filter__chip.is-active { background: #edece7; color: #080808; }
body.cine-shop .cshop .ag-cat-filter__count { margin: 0; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: .64rem; }
body.cine-shop .cshop .ag-cat-filter__chip.is-active .ag-cat-filter__count { color: #3d3d3b; }

/* search: an underlined field */
body.cine-shop .cshop .ag-product-search { grid-column: 9 / -1; grid-row: 3; width: auto; flex: none; margin: 0; }
body.cine-shop .cshop .ag-product-search__form input[type="search"] { height: 50px; padding: 0 44px 0 32px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--ink); font: 400 1rem/1 var(--f-text); box-shadow: none; }
body.cine-shop .cshop .ag-product-search__form input[type="search"]::placeholder { color: var(--ink-2); font: 500 .72rem/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; }
body.cine-shop .cshop .ag-product-search__form input[type="search"]:hover { background: transparent; border-bottom-color: var(--ink); }
body.cine-shop .cshop .ag-product-search__form input[type="search"]:focus { background: transparent; border-bottom-color: var(--amber); box-shadow: none; outline: none; }
body.cine-shop .cshop .ag-product-search__icon { left: 0; width: 18px; height: 18px; color: var(--ink-2); }
body.cine-shop .cshop .ag-product-search__clear { color: var(--ink); }
body.cine-shop .cshop .ag-product-search__results { top: calc(100% + 1px); background: #000; border: 1px solid var(--line-2); box-shadow: none; backdrop-filter: none; }
body.cine-shop .cshop .ag-product-search__result:hover, body.cine-shop .cshop .ag-product-search__result:focus-visible { background: var(--surface); }
body.cine-shop .cshop .ag-product-search__result img { background: #e6e4de; }
body.cine-shop .cshop .ag-product-search__result-price { color: var(--ink); font-family: var(--f-mono); }
body.cine-shop .cshop .ag-product-search__all { color: var(--ink); font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; }
body.cine-shop .cshop .ag-product-search__all:hover { color: var(--amber); }

.cshop .woocommerce-notices-wrapper, .cshop .woocommerce-no-products-found { grid-column: 1 / -1; grid-row: 4; }
.cshop .woocommerce-notices-wrapper:not(:empty) { margin-top: var(--s-3); }
body.cine-shop .cshop .woocommerce-result-count { grid-column: 1 / -1; grid-row: 5; float: none; margin: clamp(24px, 3vw, 40px) 0 14px; padding: 0; color: var(--ink-2); font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; }
body.theme-cine.cine-shop .site-main .cshop .woocommerce-info, body.theme-cine.cine-shop .site-main .cshop .woocommerce-message, body.theme-cine.cine-shop .site-main .cshop .woocommerce-error { grid-column: 1 / -1; margin: var(--s-3) 0 0; padding: 18px 20px; border: 1px solid var(--line-2) !important; border-top-color: var(--amber) !important; background: var(--surface) !important; color: var(--ink) !important; box-shadow: none; list-style: none; font-size: 1.0625rem; }
body.cine-shop .cshop .woocommerce-info::before, body.cine-shop .cshop .woocommerce-message::before, body.cine-shop .cshop .woocommerce-error::before { content: none; }
body.cine-shop .cshop .woocommerce-info a, body.cine-shop .cshop .woocommerce-message a { color: var(--ink); text-decoration: underline; }

/* ---------- the sheet ---------- */
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line); clear: both; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products::before, :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products::after { content: none; display: none; }

:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product {
  display: flex; flex-direction: column; float: none; width: auto !important; min-width: 0; margin: 0 !important; padding: 14px 14px 16px;
  border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; box-shadow: none; backdrop-filter: none; transform: none; text-align: left;
  transition: background var(--d-move) linear;
}
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product:hover, :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product:focus-within { background: var(--surface); transform: none; box-shadow: none; border-color: var(--line); }

.cshop-id { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: .64rem; }
.cshop-id span:first-child { color: var(--ink); transition: color var(--d-quick) linear; }
.cshop-id span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li.product:hover .cshop-id span:first-child, li.product:focus-within .cshop-id span:first-child { color: var(--amber); }

:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1 1 auto; color: inherit; text-decoration: none; outline-offset: 2px; }
.cshop-pic { position: relative; display: block; aspect-ratio: 1 / 1; margin: 0 0 14px; overflow: hidden; overflow: clip; background: #e6e4de; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product a .cshop-pic img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; margin: 0 !important; border: 0; border-radius: 0; background: none; box-shadow: none; mix-blend-mode: multiply; transform: none; transition: transform var(--d-scene) var(--e-out); }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product:hover a .cshop-pic img, :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product:focus-within a .cshop-pic img { transform: scale(1.045); }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .onsale { position: absolute; left: 8px; top: 8px; right: auto; z-index: 1; min-width: 0; min-height: 0; margin: 0; padding: 5px 8px; background: var(--amber); color: #080808; font: 500 .64rem/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; }

:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .woocommerce-loop-product__title { min-height: 0; margin: 0 0 8px; padding: 0; font: 800 clamp(1.2rem, 1.55vw, 1.7rem)/1 var(--f-display); font-stretch: 62%; letter-spacing: 0; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .price { display: block; margin: 0 0 14px; padding: 0; color: var(--ink) !important; font: 500 .78rem/1.3 var(--f-mono); letter-spacing: .06em; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .price del { color: var(--ink-2) !important; font-weight: 500; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .price ins { text-decoration: none; }

:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .button {
  display: flex; align-items: center; justify-content: center; align-self: stretch; min-height: 44px; margin: auto 0 0 !important; padding: 0 12px;
  background: transparent !important; color: var(--ink) !important; border: 1px solid var(--line-2) !important; box-shadow: none !important;
  font: 500 .7rem/1 var(--f-mono) !important; letter-spacing: .09em !important; text-transform: uppercase !important; text-align: center; text-decoration: none;
  transition: background var(--d-quick) linear, color var(--d-quick) linear, border-color var(--d-quick) linear;
}
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product:hover .button { border-color: var(--ink) !important; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .button:hover, :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .button:focus-visible { background: #edece7 !important; color: #080808 !important; border-color: #edece7 !important; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .added_to_cart { display: block; margin-top: 10px; padding: 0; color: var(--amber); font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; text-align: center; }

/* the large frame that opens each reel */
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature { grid-column: span 2; grid-row: span 2; padding: 18px 18px 20px; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .woocommerce-loop-product__title { font-size: clamp(2rem, 3.8vw, 4.2rem); line-height: .92; margin-bottom: 12px; max-width: 16ch; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .price { font-size: .9rem; margin-bottom: 18px; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .cshop-pic { margin-bottom: 18px; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .cshop-id { font-size: .72rem; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .button { min-height: 52px; font-size: .74rem !important; background: #edece7 !important; color: #080808 !important; border-color: #edece7 !important; }
:is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .button:hover, :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .button:focus-visible { background: var(--amber) !important; border-color: var(--amber) !important; }

/* reel heading: one per category on the "All" view */
.cshop-reel { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; column-gap: var(--s-3); margin: 0; padding: clamp(48px, 7vw, 112px) 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-2); list-style: none; }
.cshop-reel:first-child { padding-top: clamp(20px, 2.4vw, 36px); }
.cshop-reel-id { color: var(--amber); padding-bottom: .9em; }
.cshop-reel-name { margin: 0; font: 800 clamp(2.6rem, 7.4vw, 8rem)/.84 var(--f-display); font-stretch: 62%; letter-spacing: -.012em; text-transform: uppercase; }
body.theme-cine.cine-shop .cshop-reel-name a { display: inline-block; color: var(--ink); text-decoration: none; transition: font-stretch var(--d-scene) var(--e-out), color var(--d-quick) linear; }
body.theme-cine.cine-shop .cshop-reel-name a:hover, body.theme-cine.cine-shop .cshop-reel-name a:focus-visible { font-stretch: 78%; }
.cshop-reel-count { font: 900 clamp(2.4rem, 5.4vw, 5.6rem)/.8 var(--f-display); font-stretch: 62%; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(237, 236, 231, .5); }
:lang(is) .cshop-reel-name { line-height: 1; }

body.cine-shop .cshop .woocommerce-pagination { margin: var(--s-4) 0 0; text-align: left; }
body.cine-shop .cshop .woocommerce-pagination ul { display: inline-flex; border: 1px solid var(--line-2); margin: 0; }
body.cine-shop .cshop .woocommerce-pagination ul li { border: 0; border-right: 1px solid var(--line); margin: 0; }
body.cine-shop .cshop .woocommerce-pagination ul li a, body.cine-shop .cshop .woocommerce-pagination ul li span { display: block; min-width: 44px; padding: 15px 12px; background: transparent; color: var(--ink); font: 500 .72rem/1 var(--f-mono); }
body.cine-shop .cshop .woocommerce-pagination ul li span.current { background: #edece7; color: #080808; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cshop-plate { grid-column: 8 / -1; }
  body.cine-shop .cshop .ag-shop-toolbar .page-title, .cshop .page-description, .cshop .term-description { grid-column: 1 / span 7; }
  body.cine-shop .cshop .ag-product-search { grid-column: 8 / -1; }
}

/* ---------- small screens: two frames a row, the plate becomes a backdrop ---------- */
@media (max-width: 820px) {
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature { grid-row: auto; }
}
@media (max-width: 760px) {
  .cshop { padding-top: 44px; }
  /* the description sits before the title in the markup; put the title first on small screens too */
  .cshop-top { display: flex; flex-direction: column; align-items: stretch; }
  body.cine-shop .cshop .ag-shop-toolbar .page-title { order: 1; }
  .cshop .page-description, .cshop .term-description { order: 2; }
  body.cine-shop .cshop .ag-cat-filter { order: 3; }
  body.cine-shop .cshop .ag-product-search { order: 4; }
  .cshop .woocommerce-notices-wrapper, .cshop .woocommerce-no-products-found { order: 5; }
  body.cine-shop .cshop .woocommerce-result-count { order: 6; }
  .cshop-top > *, .cshop-top .ag-shop-toolbar > * { position: relative; z-index: 1; }
  .cshop-plate { position: absolute; z-index: 0; inset: -30px calc(var(--gut) * -1) auto; height: 300px; pointer-events: none; }
  .cshop-plate .plate-screen { aspect-ratio: auto; height: 100%; border: 0; opacity: .32; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 96%); mask-image: linear-gradient(to bottom, #000 30%, transparent 96%); }
  .cshop-plate .plate-meta, .cshop-plate .tick { display: none; }
  body.cine-shop .cshop .ag-shop-toolbar .page-title { font-size: clamp(3rem, 22vw, 8rem); margin-bottom: 22px; overflow-wrap: normal; }
  body.cine-shop.search .cshop .ag-shop-toolbar .page-title { font-size: 11vw; }
  body.cine-shop .cshop .ag-cat-filter { display: flex; margin: 28px calc(var(--gut) * -1) 0; border-inline: 0; padding-inline: 0; }
  body.cine-shop .cshop .ag-cat-filter__chip:first-child { padding-left: var(--gut); }
  body.cine-shop .cshop .ag-product-search { width: 100%; margin-top: 14px; }
  body.cine-shop .cshop .ag-product-search__results { left: 0; right: 0; width: auto; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products { margin-inline: calc(var(--gut) * -1); border-left: 0; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product { padding: 10px 10px 12px; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product:nth-child(odd of .product):not(.cshop-feature) { border-right: 1px solid var(--line); }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .woocommerce-loop-product__title { font-size: 1.12rem; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .price { margin-bottom: 12px; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product .button { font-size: .62rem !important; letter-spacing: .06em !important; padding: 0 6px; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature { padding: var(--gut) var(--gut) 18px; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .woocommerce-loop-product__title { font-size: 11vw; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product.cshop-feature .button { font-size: .72rem !important; }
  .cshop-id { font-size: .58rem; margin-bottom: 8px; }
  .cshop-id span:last-child { display: none; }
  .cshop-feature .cshop-id span:last-child { display: inline; }
  .cshop-reel { padding: 56px var(--gut) 12px; column-gap: 12px; }
  .cshop-reel-name { font-size: 15vw; }
  .cshop-reel-count { font-size: 12vw; }
}

@media (prefers-reduced-motion: reduce) {
  .js body.cine-shop .cshop .page-title { animation: none; }
  :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product a .cshop-pic img, :is(body.cine-shop .cshop, body.cine-woo .site-main) ul.products li.product:hover a .cshop-pic img { transition: none; transform: none; }
  body.theme-cine.cine-shop .cshop-reel-name a:hover { font-stretch: 62%; }
}
