/* MANACA v3: Objects (eyewear, iced jewellery, watches, belts).
   A quiet counter. The objects are the one loud thing: a few per screen, each resting on the dark surface in its own
   low pool of light with one soft shadow under it. Everything else is type.
   The four category names are the switch: the chosen one is set as the heading, the other three sit beside it in
   small text. Tap a name and the row changes. The row scrolls sideways natively (finger, trackpad, drag, arrow keys).
   Each category has its own bay: glasses and belts wide and low, watches tall and narrow, jewellery small (those photos
   are small, so they are never drawn above their own pixels). Markup and behaviour: js/objects.js.
   Colours come only from the tone tokens (--ground, --well, --ink, --mute) and --led for focus and "added". */

.objects { max-width: 1600px; margin: 0 auto; padding: calc(var(--sec) + clamp(8px, 1.6vw, 26px)) 0 0; }

/* ---------- the names ---------- */
.obj-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 var(--gut); }
.obj-tabs { display: flex; align-items: baseline; gap: 0 clamp(2px, 1.1vw, 18px); min-width: 0; margin-left: -8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.obj-tabs::-webkit-scrollbar { display: none; }
.obj-tabs [role="tab"] { flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 0 8px; text-align: left; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  font: 500 17px/1 var(--body); color: var(--mute); transition: color .2s var(--ease); }
.obj-tabs [role="tab"][aria-selected="true"] { color: var(--ink);
  font-family: var(--display); font-weight: 820; font-stretch: 62%; letter-spacing: -.025em; font-size: clamp(44px, 4.8vw, 74px); }
.obj-tabs [role="tab"]:focus-visible { outline: 2px solid rgb(var(--led)); outline-offset: -2px; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) { .obj-tabs [role="tab"]:hover { color: var(--ink); } }
html:not(.js) .obj-head, html:not(.js) #shelf, html:not(.js) .obj-foot { display: none; }

/* the arrows: there for a mouse, and quiet */
.obj-arrows { display: flex; gap: 2px; margin: 0 -10px 2px 0; }
.objects .arrow { width: 44px; height: 44px; color: var(--mute); background: none; box-shadow: none; transition: color .2s var(--ease), opacity .2s var(--ease); }
.objects .arrow:hover:not(:disabled) { color: var(--ink); background: none; box-shadow: none; }
.objects .arrow:focus-visible { outline: 2px solid rgb(var(--led)); outline-offset: -2px; border-radius: 50%; }
@media (hover: none), (max-width: 699px) { .obj-arrows { display: none; } }

/* ---------- the row ---------- */
.shelf { position: relative; margin-top: clamp(22px, 3.4vw, 52px);
  --ow: clamp(250px, 26vw, 410px);          /* one bay */
  --oh: clamp(170px, 18.5vw, 290px);        /* the height an object may take */
  --og: clamp(26px, 4vw, 62px); }           /* air between bays */
.shelf[data-tab="belts"] { --oh: clamp(180px, 19.5vw, 310px); }
.shelf[data-tab="watches"] { --ow: clamp(180px, 17.4vw, 276px); --oh: clamp(270px, 27vw, 420px); }
.shelf[data-tab="jewellery"] { --ow: clamp(170px, 17.6vw, 270px); --oh: clamp(220px, 21vw, 320px); }
@media (max-width: 699px) {
  .shelf { --ow: 76vw; --oh: 50vw; --og: 22px; }
  .shelf[data-tab="belts"] { --oh: 54vw; }
  .shelf[data-tab="watches"] { --ow: 54vw; --oh: 78vw; }
  .shelf[data-tab="jewellery"] { --ow: 46vw; --oh: 58vw; }
}
.shelf-row { display: flex; gap: var(--og); margin: 0; padding: 0 var(--gut) 6px; list-style: none; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--gut); overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row::after { content: ""; flex: 0 0 1px; margin-left: calc(var(--og) * -1); }
#shelf:focus-visible { outline: 2px solid rgb(var(--led)); outline-offset: -2px; }
.shelf.dragging .shelf-row { scroll-snap-type: none; cursor: grabbing; -webkit-user-select: none; user-select: none; }
.shelf.dragging a { cursor: grabbing; }
@media (hover: hover) and (pointer: fine) { .shelf-row { cursor: grab; } }
@media (pointer: coarse) { .shelf-row { scroll-snap-type: x mandatory; } }

/* ---------- one object ---------- */
.obj { position: relative; flex: 0 0 var(--ow); min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; }
.obj-fig { position: relative; isolation: isolate; flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; height: var(--oh); padding-bottom: 0; margin-bottom: clamp(20px, 2.4vw, 34px);
  -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; }
/* the low light it rests in: one step up from the ground and no more, widest at the surface, gone well before the next bay */
.obj-fig::before { content: ""; position: absolute; z-index: -2; left: -9%; right: -9%; bottom: calc(var(--oh) * -.2); height: calc(var(--oh) * .5 + 40px); pointer-events: none; opacity: .85;
  background: radial-gradient(50% 50% at 50% 50%, var(--well) 0%, color-mix(in srgb, var(--well) 46%, transparent) 44%, transparent 100%); transition: opacity .4s var(--ease); }
/* tall dark things (watches, pendants) also need a little of it behind them, or a black strap is lost against the ground */
.shelf[data-tab="watches"] .obj-fig::before, .shelf[data-tab="jewellery"] .obj-fig::before { height: calc(var(--oh) * .86); bottom: calc(var(--oh) * -.14);
  background: radial-gradient(50% 50% at 50% 60%, var(--well) 0%, color-mix(in srgb, var(--well) 46%, transparent) 44%, transparent 100%); }
/* where it touches the surface */
.obj-fig::after { content: ""; position: absolute; z-index: -1; left: 14%; right: 14%; bottom: -9px; height: 20px; pointer-events: none;
  background: radial-gradient(closest-side, rgb(0 0 0 / .78), rgb(0 0 0 / .4) 52%, rgb(0 0 0 / 0)); }
/* the eyewear photos carry their own shadow in their lower quarter: no second one, and the light sits up under the frame */
.shelf[data-tab="eyewear"] .obj-fig::after { content: none; }
.shelf[data-tab="eyewear"] .obj-fig { margin-bottom: 6px; }
.shelf[data-tab="eyewear"] .obj-fig::before { bottom: calc(var(--oh) * -.04); }
.shelf[data-tab="watches"] .obj-fig::after, .shelf[data-tab="jewellery"] .obj-fig::after { left: 24%; right: 24%; }
.obj-fig img { position: relative; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: 50% 100%;
  transition: transform .45s var(--ease); pointer-events: none; -webkit-user-drag: none; }
.shelf[data-tab="watches"] .obj-fig img { max-width: 84%; }
@media (hover: hover) and (pointer: fine) {
  .obj:hover .obj-fig::before, .obj:focus-within .obj-fig::before { opacity: 1; }
  .obj:hover .obj-fig img { transform: translate3d(0, -5px, 0); }
}

/* the name sits on the price: its 44px box takes the slack above it, so one-line and two-line names end on the same line */
.obj-t { align-self: flex-start; display: flex; align-items: flex-end; min-height: 44px; margin-top: auto; font: 500 15px/1.3 var(--body); text-decoration: none; color: var(--ink); }
.obj-t span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.obj-t:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.obj-t:focus-visible { outline: 2px solid rgb(var(--led)); outline-offset: 2px; border-radius: 4px; }
/* price on the left, the add control on the same line: one tap, no box */
.obj-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.obj .price { font: 600 15px/1.2 var(--body); color: var(--ink); gap: 2px 8px; }
.obj .price .was { font-size: 13px; font-weight: 400; color: var(--mute); }
.obj .add { flex: 0 0 auto; width: auto; min-width: 44px; height: 44px; margin-right: -4px; padding: 0 4px 0 8px; gap: 6px; border-radius: 6px; background: none; box-shadow: none; color: var(--ink);
  font: 600 14px/1 var(--body); transition: color .2s var(--ease); }
.obj .add .pl { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.obj .add .lbl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--mute); }
.obj .add:focus-visible { outline: 2px solid rgb(var(--led)); outline-offset: 0; border-radius: 6px; }
@media (hover: hover) { .obj .add:hover { background: none; color: var(--ink); } .obj .add:hover .lbl { text-decoration-color: currentColor; text-decoration-thickness: 2px; } }
.obj .add:active, .obj .add.added, .obj .add.added:hover { background: none; color: rgb(var(--led)); }
.obj .add.added .pl { display: none; }
.obj .add.added .lbl { text-decoration: none; }
.shelf-empty { flex: 1 1 auto; padding: 40px 0 10px; color: var(--mute); }
.shelf-empty a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 650; text-underline-offset: 5px; }
.shelf-row.swap .obj { animation: obj-in .42s var(--ease) both; animation-delay: calc(var(--k) * 35ms); }
@keyframes obj-in { from { opacity: 0; transform: translate3d(14px, 0, 0); } }

/* ---------- under the row: the way to the whole collection ---------- */
.obj-foot { display: flex; align-items: center; min-height: 44px; margin-top: clamp(14px, 1.8vw, 26px); padding: 0 var(--gut); }
.obj-foot .more { color: var(--ink); }

@media (max-width: 699px) {
  .obj-tabs { gap: 0; }
  .obj-tabs [role="tab"] { font-size: 14px; padding: 0 7px; }
  .obj-tabs [role="tab"][aria-selected="true"] { font-size: clamp(30px, 8.6vw, 40px); }
}

/* without JS every object is listed, one row per group */
.shelf-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 34px var(--gut) 0; font: 820 clamp(34px, 4vw, 56px)/1 var(--display); font-stretch: 62%; letter-spacing: -.025em; }
.shelf-h .more { color: var(--ink); }
noscript .obj .price { min-height: 44px; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .obj-tabs [role="tab"], .obj-fig::before, .obj-fig img, .obj .add, .objects .arrow { transition: none; }
  .obj:hover .obj-fig img { transform: none; }
  .shelf-row.swap .obj { animation: none; }
}
