body.sww-gallery {
    --gallery-ink: #272621;
    --gallery-paper: #faf8f3;
    --gallery-line: #ddd7ca;
}

body.sww-gallery #view {
    overflow: clip;
    touch-action: pinch-zoom;
    overscroll-behavior: none;
    isolation: isolate;
    background: #e7e0d4;
}

body.sww-gallery #view::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #242b341c, #25283026), var(--gallery-backdrop, url('gallery-room.webp')) center / cover no-repeat;
    pointer-events: none;
}

body.sww-gallery #far { display: none; }
body.sww-gallery #world { color: var(--gallery-ink); perspective: var(--gallery-camera); will-change: auto; }
body.sww-gallery #world > .sww-gallery-aisle {
    position: absolute;
    inset: 0;
    width: var(--scene-width);
    transform-style: preserve-3d;
    pointer-events: none;
}

body.sww-gallery #world > .sww-gallery-welcome { position: absolute; inset: 0; }
.sww-gallery-welcome, .sww-gallery-room {
    visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(var(--gallery-camera)) rotateY(var(--gallery-turn, 0deg)) translateZ(calc(-1 * var(--gallery-camera)));
}
.sww-gallery-facing { visibility: visible; }
.sww-gallery-room.sww-gallery-facing:not([inert]) { pointer-events: auto; }
.sww-gallery-outgoing { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.sww-gallery-welcome, .sww-gallery-room { width: var(--scene-width); }
.sww-gallery-welcome {
    display: grid;
    align-items: end;
    justify-items: start;
    padding: clamp(18px, 5vw, 78px);
}
.sww-gallery-welcome-copy {
    width: min(100%, 535px);
    padding: clamp(19px, 3vw, 40px);
    background: #faf7eff5;
    border: 1px solid #fff;
    border-radius: 18px;
    box-shadow: 0 18px 55px #372b2425;
}
body.sww-gallery #world .sww-gallery-welcome h1 {
    margin: 0 0 11px;
    font-size: clamp(29px, 5.8vw, 65px);
    line-height: 1;
    letter-spacing: -.055em;
    color: var(--gallery-ink);
    font-weight: 750;
}
.sww-gallery-welcome-copy p { margin: 0 0 23px; font-size: 15px; line-height: 1.5; color: #575044; }
.sww-gallery-welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sww-gallery-hotspots { position: absolute; right: 9%; top: 43%; display: flex; flex-wrap: wrap; justify-content: end; gap: 12px; max-width: 45%; }
.sww-gallery-hotspot { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 5px 13px 5px 5px; border: 1px solid #fff; border-radius: 999px; background: #faf8f1e8; color: var(--gallery-ink); font-size: 12px; font-weight: 740; box-shadow: 0 8px 19px #392b2126; }
.sww-gallery-hotspot > span { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border-radius: 50%; background: #292923; color: #fff; }
.sww-gallery-hotspot svg { width: 15px; height: 15px; }
.sww-gallery-hotspot:hover { background: white; }
.sww-gallery-primary, .sww-gallery-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 740;
    line-height: 1.1;
    white-space: nowrap;
}
.sww-gallery-primary { background: #292923; color: #fff; }
.sww-gallery-primary:hover { background: #464338; }
.sww-gallery-secondary { background: #fff9; color: var(--gallery-ink); border-color: var(--gallery-line); }
.sww-gallery-secondary:hover { background: #fff; }
.sww-gallery-primary svg, .sww-gallery-secondary svg { width: 15px; height: 15px; }

.sww-gallery-room {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    place-items: center;
    padding: 90px clamp(54px, 7vw, 115px) 100px;
}
.sww-gallery-exhibit {
    width: min(100%, 1060px);
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(9px, 2vh, 18px);
}

body.sww-gallery #world .sww-gallery-heading {
    width: fit-content;
    max-width: 100%;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 3vw, 34px);
    padding: 9px 10px 9px 18px;
    background: #fffaf0e8;
    border: 1px solid #fff;
    border-radius: 30px;
    box-shadow: 0 8px 30px #352b2218;
}
.sww-gallery-heading > div { min-width: 0; }
.sww-gallery-heading small { display: block; margin-bottom: 4px; color: #625b4d; font-size: 11px; line-height: 1.2; }
body.sww-gallery #world .sww-gallery-heading h2 {
    margin: 0;
    color: var(--gallery-ink);
    font-size: clamp(15px, 2.3vw, 26px);
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.sww-gallery-display {
    position: relative;
    align-self: center;
    width: min(100%, calc(var(--gallery-items) * 330px));
    display: grid;
    grid-template-columns: repeat(var(--gallery-items), minmax(0, 1fr));
    gap: clamp(10px, 2.2vw, 32px);
}
.sww-gallery-product {
    display: grid;
    grid-template-rows: minmax(0, clamp(110px, calc(var(--scene-h) - 390px), 285px)) minmax(100px, auto);
    min-width: 0;
    border-radius: 18px 18px 10px 10px;
    box-shadow: 0 24px 42px -11px #251a12a1;
    overflow: hidden;
    border: 6px solid #332e29;
    border-bottom-width: 13px;
    background: var(--gallery-paper);
}
.sww-gallery-photo {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    background: radial-gradient(ellipse at 48% 10%, #fffdf3, #e4d7c3);
    border-bottom: 1px solid #dcd3c4;
}
.sww-gallery-photo-frame {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    mix-blend-mode: multiply;
}
.sww-gallery-photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    transform: var(--sww-photo-transform, scale(.81));
}
.sww-gallery-photo img[data-sww-src] { visibility: hidden; }
.sww-gallery-photo img[data-sww-placeholder] { width: min(68%, 100px); }
.sww-gallery-photo .sww-photo-note { position: absolute; bottom: 6px; }
.sww-gallery-photo .sww-cart-status:not([hidden]) { right: 7px; }
.sww-gallery-product-label {
    position: relative;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 5px;
    padding: 9px 6px 9px 10px;
    box-shadow: inset 0 -3px #82786722;
}
.sww-gallery-product-label > div { min-width: 0; flex: 1; }
.sww-gallery-product-label > div > small { display: block; color: #635849; font-size: 10px; line-height: 1.1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sww-gallery-product-name {
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    margin: 3px 0 6px;
    color: var(--gallery-ink);
    font-size: 12px;
    line-height: 1.25;
    font-weight: 760;
    text-align: left;
}
.sww-gallery-price { font-size: 13px; line-height: 1.25; font-weight: 750; }
body.sww-gallery #world .sww-gallery-price .compact { gap: 2px; }
body.sww-gallery #world .sww-gallery-price .compact > div { display: flex !important; justify-content: space-between; align-items: baseline; gap: 5px; }
body.sww-gallery #world .sww-gallery-price .compact small { font-size: 9px !important; line-height: 1.15 !important; }
.sww-gallery-price .compact small span:first-child { display: none; }
body.sww-gallery #world .sww-gallery-price .compact strong { color: #262621; font-size: 13px !important; line-height: 1.2 !important; }
body.sww-gallery #world .sww-gallery-price .compact .transfer strong { color: #176249; }
.sww-gallery-add {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    background: #292923;
}
.sww-gallery-add svg { width: 17px; height: 17px; }
.sww-gallery-add:hover { background: #4c483b; }
.sww-gallery-empty {
    justify-self: center;
    align-self: center;
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 26px;
    border-radius: 13px;
    background: var(--gallery-paper);
    font-size: 14px;
    text-align: center;
}
.sww-gallery-empty > svg { width: 34px; height: 34px; color: #766b56; }

body.sww-gallery #view { position: absolute; inset: 0; }
body.sww-gallery #loading {
    backdrop-filter: none;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 12px 16px;
    border: 1px solid #fff9;
    border-radius: 999px;
    background: #fff9edee;
    color: #514432;
    pointer-events: none;
}
body.sww-gallery #swwApp > .sww-header {
    position: absolute;
    inset: 13px clamp(12px, 3vw, 42px) auto;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    gap: 8px;
    min-height: 45px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    pointer-events: none;
}
body.sww-gallery .sww-header .grow { display: none; }
body.sww-gallery .sww-header .brand,
body.sww-gallery .sww-gallery-zone,
body.sww-gallery #swwApp .sww-header .hb,
body.sww-gallery #sceneNav .walk,
body.sww-gallery #mapbar {
    background: #fcfaf3e8;
    border: 1px solid #fff9;
    box-shadow: 0 7px 24px #34251825;
    pointer-events: auto;
}
body.sww-gallery .sww-header .brand { min-height: 44px; justify-content: center; padding: 7px 16px; border-radius: 999px; }
body.sww-gallery .sww-header .brand img { width: clamp(90px,12vw,165px); max-height: 28px; object-fit: contain; }
.sww-gallery-zone { display: flex; align-items: center; min-width: 0; width: fit-content; max-width: 100%; gap: 7px; padding: 8px 13px; border-radius: 999px; color: #322b22; font-size: 11px; }
.sww-gallery-zone > span { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #53402b; }
.sww-gallery-zone strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sww-gallery-zone svg { width: 13px; height: 13px; flex: none; transform: rotate(90deg); }
.sww-gallery-zone:focus-visible { outline: 2px solid #272621; outline-offset: 2px; }
.sww-gallery-zone[aria-busy="true"] > span { animation: sww-gallery-pulse .9s .25s ease-in-out infinite alternate; }
@keyframes sww-gallery-pulse {
    to { opacity: .35; box-shadow: 0 0 0 3px #53402b45; }
}
@media (prefers-reduced-motion: reduce) {
    .sww-gallery-zone[aria-busy="true"] > span { animation: none; outline: 2px solid #53402b; outline-offset: 2px; }
}
.sww-gallery-actions { display: flex; justify-content: end; align-items: center; gap: 6px; }
body.sww-gallery #swwApp .sww-header .hb { min-height: 42px; justify-content: center; border-radius: 999px; color: var(--gallery-ink); }
body.sww-gallery #swwApp .sww-header .hb.pri, body.sww-gallery #mapbar .mp.on { color: #fff; background: #282823; border-color: #282823; }
body.sww-gallery #swwApp #helpButton .lbl { display: none; }
body.sww-gallery #swwApp .sww-header .hb:focus-visible, body.sww-gallery #sceneNav .walk:focus-visible { outline: 2px solid #272621; outline-offset: 2px; }

body.sww-gallery #sceneNav { position: absolute; inset: 0; height: auto; background: none; border: 0; pointer-events: none; }
body.sww-gallery #sceneNav .walk { top: 50%; bottom: auto; transform: translateY(-50%); margin: 0; width: 45px; height: 45px; color: var(--gallery-ink); }
body.sww-gallery #sceneNav .walk.l { left: clamp(9px, 3vw, 42px); }
body.sww-gallery #sceneNav .walk.r { right: clamp(9px, 3vw, 42px); }
body.sww-gallery #sceneNav .walk:disabled { visibility: hidden; }
body.sww-gallery #sceneNav #shelfPager {
    bottom: 76px;
    height: 43px;
    max-width: calc(100% - 24px);
    gap: 6px;
    background: #fcfaf3f5;
    color: var(--gallery-ink);
    border-radius: 14px;
    backdrop-filter: none;
    pointer-events: auto;
}
body.sww-gallery #shelfPager > span { min-width: 0; text-align: center; line-height: 1.25; }
body.sww-gallery #shelfPager small { display: block; overflow: hidden; max-width: min(186px, 48vw); color: var(--gallery-ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
body.sww-gallery #shelfPager button { flex: none; color: var(--gallery-ink); }
body.sww-gallery #mapbar, body.sww-gallery:has(#hiwa-root) #mapbar {
    position: absolute;
    left: 50%;
    bottom: 17px;
    width: max-content;
    max-width: calc(100% - 126px);
    height: auto;
    min-height: 42px;
    transform: translateX(-50%);
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    justify-content: safe center;
}
body.sww-gallery #mapbar .mp { min-height: 34px; color: var(--gallery-ink); border-radius: 999px; background: none; box-shadow: none; white-space: nowrap; }
body.sww-gallery #mapbar .mp.on { color: white; background: #282823; }
body.sww-gallery #mapbar .sww-current-room { flex: none; max-width: min(58vw, 265px); overflow: hidden; display: block; line-height: 34px; text-overflow: ellipsis; }
body.sww-gallery #mapbar .mp svg, body.sww-gallery #mapbar .mp img { display: none; }

.sww-gallery-tools {
    position: absolute;
    top: 66px;
    right: clamp(10px,3vw,42px);
    z-index: 56;
    width: min(calc(100% - 20px), 590px);
    max-height: calc(100% - 83px);
    overflow-y: auto;
    background: #fffdf8;
    border: 1px solid #e1d9ca;
    border-radius: 19px;
    box-shadow: 0 15px 46px #37271951;
}
.sww-gallery-tools[hidden] { display: none; }
.sww-gallery-tools-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px 5px; }
.sww-gallery-tools-head h2 { margin: 0; color: var(--gallery-ink); font-size: 16px; }
.sww-gallery-tools-head button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #f0ebe0; }
.sww-gallery-tools-head svg { width: 14px; height: 14px; }
body.sww-gallery #catalogControls { position: static; padding: 9px 14px 14px; background: none; border: 0; }
body.sww-gallery #catalogControls .controls-main { display: grid; grid-template-columns: minmax(0,1fr) auto auto; }
body.sww-gallery #catalogControls .control-search { min-width: 0; background: #eeeae0; }
body.sww-gallery #catalogControls .category-fields { grid-column: 1/-1; grid-row: 2; }
body.sww-gallery #filterPanel { position: static; width: auto; max-width: none; margin-top: 10px; box-shadow: none; }
body.sww-gallery #productPanel { background: #fffdf8; }
body.sww-gallery #productPanel .p-hero { background: radial-gradient(ellipse at 35% 20%,#fffefa,#e7e1d8); }
body.sww-gallery #productPanel .p-brand { color: #6c6152; }
body.sww-gallery #productPanel .p-body h2 { color: var(--gallery-ink); }
body.sww-gallery #productPanel .bt.pri { color: #fff; background: #282823; }
body.sww-gallery #scrim { backdrop-filter: none; }
body.sww-gallery #productPanel .sww-gallery-purchase {
    flex: none;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #e1dacd;
    background: #fffdf8;
    box-shadow: 0 -5px 20px #28282310;
}
body.sww-gallery #productPanel .sww-gallery-purchase .sww-buy-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: end; gap: 9px; }
body.sww-gallery #productPanel .sww-gallery-purchase .sww-quantity-label { color: #4d463b; font-size: 11px; gap: 4px; }
body.sww-gallery #productPanel .sww-gallery-purchase input { width: 100%; height: 44px; font-size: 16px; color: #282823; }
body.sww-gallery #productPanel .sww-gallery-purchase .bt.pri {
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    gap: 8px;
    justify-content: center;
    font-size: 15px;
    font-weight: 750;
    text-align: center;
    box-shadow: none;
    transform: none;
}
body.sww-gallery #productPanel .sww-gallery-purchase .bt.pri:hover { background: #3d3a31; }
body.sww-gallery #productPanel .sww-gallery-purchase .bt svg { width: 20px; height: 20px; flex: none; }
body.sww-gallery #productPanel .sww-gallery-purchase .bt[data-sww-pending] { background: #414039; }
body.sww-gallery #productPanel .sww-gallery-purchase .bt[data-sww-pending]::before { border-color: #fff5; border-top-color: #fff; }
body.sww-gallery #productPanel .sww-purchase-status { display: block; color: #176249; font-size: 12px; font-weight: 700; text-align: end; margin-top: 5px; }
body.sww-gallery #productPanel .sww-purchase-status[hidden] { display: none; }
body.sww-gallery #productPanel .sww-purchase-status[data-sww-pending] { color: #4d463b; }
body.sww-gallery #cartDrawer .df { background: #f8f5ed; }
body.sww-gallery #cartDrawer .sww-cart-actions .pri { color: #fff; background: #282823; box-shadow: none; }
@media (min-width: 821px) {
    body.sww-gallery #productPanel { width: min(880px, calc(100vw - 48px)); height: min(630px, calc(100dvh - 85px)); }
    body.sww-gallery #productPanel .sww-gallery-purchase { padding-inline: calc(45% + 20px) 28px; }
}
.sww-gallery-photo-nav { position: absolute; bottom: 8px; inset-inline: 8px; display: flex; justify-content: safe center; gap: 5px; overflow-x: auto; }
.sww-gallery-photo-nav button { flex: none; min-width: 30px; height: 30px; background: #fff; border: 1px solid var(--gallery-line); border-radius: 50%; color: var(--gallery-ink); font-weight: 700; font-size: 11px; }
.sww-gallery-photo-nav button[aria-pressed="true"] { color: #fff; background: #282823; }

@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) {
    .sww-gallery-room { padding-inline: 44px; }
    .sww-gallery-hotspots { display: none; }
    .sww-gallery-display:has(> .sww-gallery-product:nth-child(3)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sww-gallery-display > .sww-gallery-product:nth-child(n + 3) { display: none; }
    .sww-gallery-product { grid-template-rows: minmax(0, clamp(70px, calc(var(--scene-h) - 372px), 268px)) minmax(90px, auto); border-width: 3px 3px 8px; }
    .sww-gallery-product-label { align-items: end; }
    body.sww-gallery #world .sww-gallery-price .compact > div { display: grid !important; gap: 5px; }
    .sww-gallery-product-name { font-size: 11px; }
    .sww-gallery-welcome-copy p { margin-bottom: 14px; font-size: 13px; }
}

@media (max-width: 640px) {
    body.sww-gallery #view::before { background-position: center, 9% center; }
    body.sww-gallery #swwApp > .sww-header { grid-template-columns: minmax(0,1fr) auto; inset: 10px 10px auto; }
    body.sww-gallery .sww-header .brand { justify-self: start; min-height: 39px; padding-inline: 11px; }
    body.sww-gallery #swwApp .sww-header .hb { min-height: 38px; min-width: 36px; }
    .sww-gallery-zone { position: absolute; top: 49px; left: 0; max-width: calc(100vw - 20px); }
    body.sww-gallery #sceneNav .walk { width: 32px; height: 32px; }
    body.sww-gallery #sceneNav .walk.l { left: 6px; }
    body.sww-gallery #sceneNav .walk.r { right: 6px; }
    body.sww-gallery #mapbar, body.sww-gallery:has(#hiwa-root) #mapbar { left: 9px; transform: none; max-width: calc(100% - 66px); bottom: 10px; }
    body.sww-gallery #sceneNav #shelfPager { bottom: 75px; }
    .sww-gallery-room { padding-block: 87px 119px; }
    .sww-gallery-add { position: absolute; right: 6px; top: -41px; width: 34px; height: 34px; box-shadow: 0 3px 8px #332e2940; }
    .sww-gallery-product-label { padding-inline: 6px; }
    .sww-gallery-product-name { -webkit-line-clamp: 3; }
    body.sww-gallery #world .sww-gallery-price .compact strong { font-size: 11px !important; }
    body.sww-gallery #world .sww-gallery-welcome { padding: 92px 14px 73px; }
}

@media (max-width: 380px) {
    .sww-gallery-room { padding-inline: 40px; }
    body.sww-gallery #world .sww-gallery-heading { padding: 7px 9px; }
    .sww-gallery-heading .sww-gallery-secondary { min-height: 34px; padding-inline: 9px; }
    .sww-gallery-exhibit { gap: 8px; }
    body.sww-gallery #world .sww-gallery-price .compact > div { grid-template-columns: 1fr !important; gap: 1px; }
}

@media (max-width: 380px) and (max-height: 660px) {
    .sww-gallery-product { grid-template-rows: clamp(46px, calc(var(--scene-h) - 424px), 205px) auto; }
}

@media (max-height: 530px) {
    .sww-gallery-room { padding-block: 66px 119px; }
    .sww-gallery-hotspots { display: none; }
    .sww-gallery-exhibit { gap: 5px; }
    body.sww-gallery #world .sww-gallery-heading { padding-block: 4px; }
    body.sww-gallery #world .sww-gallery-heading h2 { font-size: 16px; }
    .sww-gallery-heading small { display: none; }
    .sww-gallery-product { grid-template-rows: minmax(0, clamp(40px, calc(var(--scene-h) - 310px), 120px)) auto; }
    .sww-gallery-product-label { padding-block: 4px; }
    .sww-gallery-product-name { margin-block: 2px; -webkit-line-clamp: 2; }
}
