/* R3.8.2 — shared flat-profile rendering; independent of price configuration. */
:where(.framed,.w32-artbox,.p37-picture,.p37-frames i){--lbp-frame-texture:url("frames-r382/black.png");--lbp-frame-width:5px}
[data-profile="Чёрный"],[data-profile="Чёрная"]{--lbp-frame-texture:url("frames-r382/black.png")}
[data-profile="Белый"],[data-profile="Белая"]{--lbp-frame-texture:url("frames-r382/white.png")}
[data-profile="Серебро"]{--lbp-frame-texture:url("frames-r382/silver.png")}
[data-profile="Золото"]{--lbp-frame-texture:url("frames-r382/gold.png")}
[data-profile="Серый"]{--lbp-frame-texture:url("frames-r382/grey.png")}
[data-profile="Дерево"],[data-profile="Дуб"]{--lbp-frame-texture:url("frames-r382/wood.png")}
[data-profile="Красное дерево"],[data-profile="Орех"]{--lbp-frame-texture:url("frames-r382/redwood.png")}

/* Keep the aperture equal to the original artwork, with the moulding outside. */
:is(.framed,.w32-artbox,.p37-picture)[data-profile]:not([data-profile="Без рамы"]){isolation:isolate;overflow:visible!important;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important}
:is(.framed,.w32-artbox,.p37-picture)[data-profile]:not([data-profile="Без рамы"])::before{content:"";display:block!important;position:absolute;inset:calc(-1 * var(--lbp-frame-width));box-sizing:border-box;border:var(--lbp-frame-width) solid transparent;border-image-source:var(--lbp-frame-texture);border-image-slice:48;border-image-repeat:stretch;background:none!important;box-shadow:1px 2px 0 #18151342,3px 6px 12px #231a174d;z-index:-1;pointer-events:none}
:is(.framed,.w32-artbox,.p37-picture)[data-profile]::after{display:none!important}
:is(.framed,.w32-artbox,.p37-picture)[data-profile="Без рамы"]::before{display:none!important;content:none!important}
:is(.framed,.w32-artbox,.p37-picture)[data-profile="Без рамы"]{box-shadow:2px 3px 9px #231a1733!important}
.ad-fit .framed,.ad-hang>a .framed{--lbp-frame-width:clamp(3px,1.9cqw,10px);width:min(86cqw,calc(86cqh * var(--art-ratio)))!important}
.w32-artbox{--lbp-frame-width:clamp(3px,2.1cqw,9px);width:calc(min(84cqw,84cqh * var(--art-ratio,.72)) * var(--slot-scale,.48))}
.p37-picture{--lbp-frame-width:clamp(5px,2.3cqw,18px)}
.p37-art .p37-picture{width:min(85cqw,86cqh * var(--ratio))}
.p37-room .p37-picture,.p37-pair .p37-picture,.p37-inspire-art{--lbp-frame-width:clamp(3px,.85cqw,8px)}
.p37-mini .p37-picture{--lbp-frame-width:clamp(1.5px,2.6cqw,4px)}
.p37-recent .p37-picture{--lbp-frame-width:3px}
/* Larger profile-corner samples, using the very same material as the preview. */
.p37-frames button{gap:7px;min-height:84px;justify-content:flex-start;padding:7px 4px 8px}
.p37-frames i{position:relative;display:block;width:100%;height:49px;max-width:90px;border:0!important;border-image:none!important;box-shadow:none!important;background:#ede9e0!important;overflow:hidden}
.p37-frames i:not([data-profile="Без рамы"])::before{content:"";position:absolute;left:13%;top:12%;width:115%;height:140%;box-sizing:border-box;border:12px solid transparent;border-image-source:var(--lbp-frame-texture);border-image-slice:48;border-image-repeat:stretch;filter:drop-shadow(2px 3px 2px #30291f60);pointer-events:none}
.p37-frames i[data-profile="Без рамы"]::before{content:"";position:absolute;left:13%;top:12%;width:82%;height:82%;border:1px dashed #b3b0a7;box-sizing:border-box}
#ownview .framed{--lbp-frame-width:clamp(6px,1vw,16px);max-width:78%;width:fit-content}
#ownview .framed img{display:block;width:auto;max-width:100%;height:auto;max-height:350px}
@media(max-width:720px){.p37-thumbs{grid-template-columns:repeat(3,minmax(0,1fr))}.p37-thumbs:has(>button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}.p37-frames button{min-height:74px;font-size:10px}.p37-frames i{height:39px}.p37-frames i:not([data-profile="Без рамы"])::before{border-width:9px}.p37-picture{--lbp-frame-width:clamp(5px,2.6cqw,14px)}}
