/* =========================================================================
   MORATO — The Rack (homepage best-seller clothes rail)
   ========================================================================= */
.rk-section { position: relative; isolation: isolate; overflow: hidden;
  /* showroom wall: warm plaster, soft light from above, a floor line at the bottom */
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255,255,255,.95) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #f5f3ef 0%, #efece6 100%); }
.rk-section::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.rk { position: relative; min-height: 640px; padding: 64px 0 0; overflow: hidden; }
.rk-fallback { padding: 48px var(--gutter); }

.rk-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 var(--gutter) 34px; }
.rk-eyebrow, .rk-badge { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rk-head h2 { font-size: clamp(28px, 3.6vw, 48px); letter-spacing: -.04em; line-height: 1.02; margin-top: 10px; }
.rk-hint { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .04em; color: var(--ink-2, #444);
  background: rgba(255,255,255,.7); backdrop-filter: blur(8px); border: 1px solid rgba(0,0,0,.06); border-radius: 999px; padding: 8px 14px; }
.rk-dot { width: 6px; height: 6px; border-radius: 50%; background: #2fa66a; box-shadow: 0 0 0 3px rgba(47,166,106,.18); }
.rk-hint-touch { display: none; }

/* buttons */
.rk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 26px; background: var(--ink); color: #fff; border-radius: 999px;
  border: 1px solid var(--ink); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: background .25s, color .25s, transform .25s; }
.rk-btn:hover { background: #2a2a2a; transform: translateY(-1px); }
.rk-btn:disabled { background: #cfcfcf; border-color: #cfcfcf; cursor: not-allowed; transform: none; }
.rk-btn-ghost { background: transparent; color: var(--ink); }
.rk-btn-ghost:hover { background: var(--ink); color: #fff; }
.rk-btn-block { width: 100%; height: 52px; }
.rk-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.75); border: 1px solid rgba(0,0,0,.08); transition: background .2s, border-color .2s, transform .2s; }
.rk-icon:hover { background: #fff; border-color: var(--ink); transform: translateY(-1px); }

/* ---- stage + rail ---- */
.rk-stage { transition: filter .6s cubic-bezier(.2,.8,.2,1), opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1); }
.rk.is-focus .rk-stage, .rk.is-focus .rk-head { filter: blur(7px); opacity: .16; transform: scale(.97); pointer-events: none; }
.rk.is-focus.is-closing .rk-stage, .rk.is-focus.is-closing .rk-head { filter: none; opacity: 1; transform: none; }
.rk-head { transition: filter .6s, opacity .6s, transform .6s; }

.rk-scroller { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; overscroll-behavior-x: contain; }
.rk-scroller::-webkit-scrollbar { display: none; }
.rk-scroller:active { cursor: grabbing; }
.rk-track { --rail-y: 29px; position: relative; width: max-content; min-width: 100%; padding: 0 var(--gutter) 10px; }
.rk-rail { position: absolute; left: 0; right: 0; top: var(--rail-y); height: 14px; z-index: 3; pointer-events: none; isolation: isolate; }
.rk-pipe { position: absolute; inset: 0; border-radius: 8px; z-index: 1;
  /* brushed steel tube: dark underside, bright specular line, reflected floor light */
  background: linear-gradient(180deg, #ffffff 0%, #e9e9e9 14%, #b9b9b9 34%, #8e8e8e 52%, #6d6d6d 66%, #a7a7a7 84%, #d8d8d8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 1px rgba(0,0,0,.25), 0 1px 1px rgba(0,0,0,.2); }
.rk-pipe::after { content: ''; position: absolute; left: 0; right: 0; top: 3px; height: 1.5px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95) 20%, rgba(255,255,255,.6) 50%, rgba(255,255,255,.95) 80%, transparent); filter: blur(.3px); }
.rk-rail-shadow { z-index: -2; position: absolute; left: 1%; right: 1%; top: 22px; height: 18px; border-radius: 50%; background: rgba(40,30,20,.22); filter: blur(10px); }
.rk-bracket { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; z-index: -1; border-radius: 50%;
  /* wall flange the rail is screwed into */
  background: radial-gradient(circle at 38% 32%, #ffffff 0%, #d6d6d6 38%, #9a9a9a 72%, #7a7a7a 100%);
  box-shadow: 4px 8px 12px -2px rgba(60,45,30,.28), inset 0 0 0 1px rgba(0,0,0,.08); }
.rk-bracket::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 22px; transform: translate(-50%, -50%); border-radius: 4px;
  background: linear-gradient(90deg, #8a8a8a, #ececec 45%, #a0a0a0 70%, #7b7b7b); }
.rk-list { list-style: none; display: flex; gap: 14px; margin: 0; padding: 18px 0 0; }
.rk-slot { position: relative; flex: none; width: 236px; scroll-snap-align: center; }
.rk-slot.is-hover { z-index: 5; }
.rk-item { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; outline: 0; -webkit-tap-highlight-color: transparent; }
.rk-item:focus-visible .rk-garment-wrap { outline: 1px dashed var(--ink); outline-offset: 6px; }

.rk-sway { display: block; transform-origin: 50% 12px; animation: rk-sway 6.5s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -.83s); }
@keyframes rk-sway { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
.rk-hang { display: block; transform: rotate(var(--swing, 0deg)); transform-origin: 50% 12px; will-change: transform; }
.rk-garment-wrap { display: block; width: 226px; transform-origin: 50% 12px; transition: transform .6s cubic-bezier(.34,1.56,.64,1), opacity .4s, filter .4s; }
/* garments cast a soft shadow onto the wall behind them */
.rk-garment { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(10px 22px 16px rgba(60,45,30,.16)) drop-shadow(0 2px 2px rgba(0,0,0,.06)); transition: filter .45s; }
.rk-slot.is-hover .rk-garment-wrap { transform: translateY(6px) scale(1.07); }
.rk-slot.is-hover .rk-garment { filter: drop-shadow(16px 34px 24px rgba(60,45,30,.24)) drop-shadow(0 2px 3px rgba(0,0,0,.08)); }
.rk-list:has(.is-hover) .rk-slot:not(.is-hover) .rk-garment-wrap { opacity: .55; filter: saturate(.7); }
.rk-slot.is-away .rk-garment-wrap { opacity: 0 !important; transition: opacity .15s; }

/* product photos (e.g. 2000×2000 cut-outs) hang from a real hanger and are shown whole — never cropped */
.rk-photo { position: relative; padding-top: 26.6%; }
.rk-photo-img { --top: 0; position: relative; display: block; margin-top: calc(var(--top) * -100% + 1%); }
.rk-photo img { position: relative; z-index: 2; display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.rk-photo-hook { position: absolute; top: 0; left: 0; width: 100%; height: auto; z-index: 1; overflow: visible; }
/* the wooden bar sits behind the shoulders, so it shows through the neck like a real hanger */
.rk-photo-bar { position: absolute; z-index: 1; left: 13%; width: 74%; top: calc(var(--top) * 100% - 2.5%); height: auto; }
.rk-photo-clip { position: absolute; z-index: 3; left: 20%; width: 60%; top: 24.5%; height: auto; }
.rk-photo.is-pants .rk-photo-img { margin-top: calc(var(--top) * -100% + 2%); }
.rk-photo.is-cap .rk-photo-img, .rk-photo.is-sneaker .rk-photo-img { margin-top: calc(var(--top) * -100% - 2%); }

.rk-meta { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px 8px; min-height: 76px; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.rk-slot.is-hover .rk-meta { transform: translateY(4px); }
.rk-tag { align-self: center; font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rk-name { font-size: 13px; font-weight: 500; line-height: 1.3; }
.rk-price { font-size: 12.5px; display: inline-flex; gap: 6px; justify-content: center; color: var(--ink-2, #444); }
.rk-price s, .rk-focus-price s { color: var(--muted); }

.rk-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px var(--gutter) 26px; margin-top: 18px;
  /* the floor the rail stands over */
  background: linear-gradient(180deg, rgba(120,100,80,.07), rgba(120,100,80,.02)); box-shadow: inset 0 1px 0 rgba(120,100,80,.12); }
.rk-counter { display: flex; align-items: center; gap: 4px; min-width: 0; font-variant-numeric: tabular-nums; }
.rk-counter strong { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.rk-counter > span:nth-child(2) { color: var(--muted); font-size: 13px; }
.rk-progress { width: 120px; height: 2px; border-radius: 2px; background: rgba(0,0,0,.08); margin: 0 14px; position: relative; flex: none; overflow: hidden; }
.rk-progress span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--ink); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.rk-current { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-bar-actions { display: flex; gap: 8px; flex: none; }

/* ---- focus view ---- */
.rk-focus { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; padding: 28px var(--gutter) 24px;
  animation: rk-fade .45s ease both; touch-action: pan-y; }
.rk-focus.is-closing { animation: rk-fade-out .42s ease both; }
.rk-focus.is-closing .rk-focus-box { transform: scale(.85) translateY(20px) !important; transition: transform .42s cubic-bezier(.4,0,.2,1) !important; }
@keyframes rk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rk-fade-out { from { opacity: 1; } to { opacity: 0; } }
.rk-close { position: absolute; top: 22px; right: var(--gutter); display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 10px 0; z-index: 3; }
.rk-arrow { position: absolute; top: 36%; z-index: 3; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.85); backdrop-filter: blur(8px); display: grid; place-items: center; transition: border-color .2s, transform .3s cubic-bezier(.34,1.56,.64,1); }
.rk-arrow:hover { border-color: var(--ink); transform: scale(1.06); }
.rk-arrow-l { left: max(var(--gutter), calc(50% - 300px)); } .rk-arrow-r { right: max(var(--gutter), calc(50% - 300px)); }
.rk-focus-rail { position: relative; z-index: 2; width: min(460px, 74vw); height: 14px; flex: none; margin-top: 18px; }
.rk-focus-rail::after { content: ''; position: absolute; left: 4%; right: 4%; top: 18px; height: 16px; border-radius: 50%; background: rgba(40,30,20,.2); filter: blur(10px); }
.rk-focus-box { width: min(300px, 58vw); margin-top: -13px; will-change: transform; }
.rk-focus-enter { animation: rk-pop .55s cubic-bezier(.2,.85,.25,1) both; }
.rk-focus-enter.from-r { animation-name: rk-in-r; } .rk-focus-enter.from-l { animation-name: rk-in-l; }
@keyframes rk-pop { from { opacity: .4; } to { opacity: 1; } }
@keyframes rk-in-r { from { opacity: 0; transform: translateX(140px) rotate(5deg); } to { opacity: 1; transform: none; } }
@keyframes rk-in-l { from { opacity: 0; transform: translateX(-140px) rotate(-5deg); } to { opacity: 1; transform: none; } }
.rk-focus .rk-hang { transform-origin: 50% 4%; }
.rk-focus-garment { display: block; width: 100%; cursor: zoom-in; }
.rk-focus-garment .rk-garment { filter: drop-shadow(0 34px 28px rgba(0,0,0,.18)); }
.rk-focus-info { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; animation: rk-fade .5s .1s both; }
.rk-focus-info h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.025em; }
.rk-focus-price { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.rk-avail { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--success); border: 1px solid currentColor; padding: 2px 7px; }
.rk-avail.is-out { color: var(--error); }
.rk-focus-cta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.rk-count { font-size: 11px; color: var(--muted); letter-spacing: .1em; margin-top: 8px; font-variant-numeric: tabular-nums; }

/* ---- quick view ---- */
.rk-qv-wrap { position: fixed; inset: 0; z-index: 300; background: rgba(10,10,10,.45); display: grid; place-items: center; padding: 16px; animation: rk-fade .3s both; }
.rk-qv { position: relative; width: min(1000px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 18px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.45);
  animation: rk-qv-in .5s cubic-bezier(.2,.85,.25,1) both; }
@keyframes rk-qv-in { from { opacity: 0; transform: translateY(30px) scale(.98); } to { opacity: 1; transform: none; } }
.rk-qv-close { position: absolute; top: 14px; right: 14px; z-index: 4; width: 40px; height: 40px; display: grid; place-items: center; background: #fff; border-radius: 50%; }
.rk-qv-viewer { position: relative; background: linear-gradient(180deg, #f4f2ee, #ebe8e2); display: flex; flex-direction: column; align-items: center; padding: 22px 20px 18px; min-height: 560px; overflow: hidden; }
.rk-qv-toggle { display: inline-flex; border: 1px solid rgba(0,0,0,.08); background: #fff; z-index: 2; border-radius: 999px; padding: 3px; }
.rk-qv-toggle button { padding: 7px 18px; border-radius: 999px; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: background .25s, color .25s; }
.rk-qv-toggle button.is-on { background: var(--ink); color: #fff; }
.rk-qv-stage { position: relative; flex: 1; width: 100%; display: flex; justify-content: center; padding-top: 18px; }
.rk-qv-ghost, .rk-qv-fit { position: absolute; top: 18px; width: min(250px, 60%); transform-origin: 50% 4%; }
.rk-qv-ghost { color: rgba(0,0,0,.28); }
.rk-qv-fit { transition: transform .7s cubic-bezier(.34,1.56,.64,1); }
.rk-qv .rk-hang { transform-origin: 50% 4%; }
.rk-flip { position: relative; transform: perspective(1400px) rotateY(0deg); transform-style: preserve-3d; transition: transform .85s cubic-bezier(.2,.8,.2,1); }
.rk-flip.is-back { transform: perspective(1400px) rotateY(180deg); }
.rk-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rk-face-back { position: absolute; inset: 0; transform: rotateY(180deg); }
.rk-qv-fitlabel { z-index: 2; display: flex; gap: 10px; align-items: baseline; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.8); padding: 6px 12px; }
.rk-qv-fitlabel strong { color: var(--ink); font-weight: 600; }
.rk-qv-fitlabel span { text-transform: none; letter-spacing: 0; }

.rk-qv-info { padding: 44px 36px 32px; display: flex; flex-direction: column; gap: 8px; }
.rk-qv-info h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; }
.rk-qv-desc { color: var(--ink-2); font-size: 13px; margin: 6px 0 0; }
.rk-qv-label { display: flex; justify-content: space-between; margin-top: 18px; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.rk-qv-label span { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.rk-swatches { display: flex; gap: 10px; }
.rk-swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.rk-swatch.is-on { outline: 1px solid var(--ink); outline-offset: 3px; }
.rk-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; margin-bottom: 14px; }
.rk-sizes button { height: 46px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; transition: all .2s; }
.rk-sizes button:hover:not(:disabled) { border-color: var(--ink); }
.rk-sizes button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rk-sizes button.is-out { color: #c4c4c4; cursor: not-allowed; background: linear-gradient(to top right, transparent calc(50% - .5px), #e4e4e4 50%, transparent calc(50% + .5px)); }
.rk-qv-msg { color: var(--error); font-size: 12px; margin: 4px 0 0; }
.rk-qv-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; align-self: flex-start; }
.rk-qv-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .rk { min-height: 560px; padding-top: 36px; }
  .rk-focus { padding-top: 60px; }
  .rk-head { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 18px; }
  .rk-hint-touch { display: inline; }
  .rk-scroller { scroll-snap-type: x mandatory; cursor: auto; }
  .rk-slot { width: 168px; }
  .rk-list { gap: 10px; }
  .rk-track { --rail-y: 24px; }
  .rk-garment-wrap { width: 156px; }
  .rk-meta { min-height: 72px; }
  .rk-list:has(.is-hover) .rk-slot:not(.is-hover) .rk-garment-wrap { opacity: 1; filter: none; }
  .rk-current, .rk-progress { display: none; }
  .rk-bar .rk-icon { display: none; }
  .rk-arrow { width: 44px; height: 44px; top: 30%; }
  .rk-arrow-l { left: 12px; } .rk-arrow-r { right: 12px; }
  .rk-focus-box { width: min(240px, 56vw); }

  .rk-qv-wrap { place-items: end stretch; padding: 0; }
  .rk-qv { grid-template-columns: 1fr; max-height: 92vh; width: 100%; animation-name: rk-drawer; border-radius: 18px 18px 0 0; }
  @keyframes rk-drawer { from { transform: translateY(100%); } to { transform: none; } }
  .rk-qv-viewer { min-height: 380px; padding-top: 16px; }
  .rk-qv-ghost, .rk-qv-fit { width: min(190px, 50%); }
  .rk-qv-viewer { min-height: 400px; }
  .rk-qv-info { padding: 22px var(--gutter) 28px; }
}
/* inline add-to-bag on the focus view */
.rk-qa { width: min(380px, 100%); margin-top: 12px; text-align: left; }
.rk-qa-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2, #444); margin-bottom: 8px; }
.rk-qa-head em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--accent, #c0743e); }
.rk-qa-fit { font-size: 11px; letter-spacing: .02em; text-transform: none; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.rk-qa-fit:hover { color: var(--ink); }
.rk-qa .rk-sizes { margin-bottom: 10px; }
.rk-qa .rk-sizes button { height: 42px; background: rgba(255,255,255,.75); }
.rk-qa .rk-sizes button.is-on { background: var(--ink); }
.rk-qa-add { border-radius: 999px; height: 50px; transition: background .25s, transform .2s; }
.rk-qa-add:active { transform: scale(.98); }
.rk-qa-add.is-done { background: var(--success, #1f7a4d); border-color: var(--success, #1f7a4d); }
.rk-qa-msg { margin: 8px 0 0; font-size: 12px; color: var(--error, #b42318); text-align: center; }
.rk-qa-msg a { color: inherit; text-decoration: underline; }
.rk-focus-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.rk-focus-link:hover { color: var(--ink); }
@media (max-width: 960px) { .rk-qa { width: min(340px, calc(100vw - 48px)); } }

@media (prefers-reduced-motion: reduce) {
  .rk-sway { animation: none; }
  .rk-focus-enter, .rk-qv, .rk-focus { animation: none; }
}
/* room for the size picker + add to bag on the focus view */
.rk-qa .rk-sizes { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
.rk.is-focus { min-height: 720px; transition: min-height .4s ease; }
@media (max-width: 960px) { .rk.is-focus { min-height: 760px; } }
