
#products .rr-rug-card .card-photo-toggle { display: none; }
#products .product-media.card-photo img[hidden] { display: none; }
#products .product-media.card-photo.rr-rug-media > .rr-rug-only {
  position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box;
  object-fit: contain; padding: 2%; background: #faf8f4;
  opacity: 0; transform: translateX(7%); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
html[data-page="shop"] #collection #products .product-media.rr-rug-media > .rr-rug-only {
  object-fit: contain;
}
html[data-page="shop"] #collection #products .product-media.card-photo > img[hidden] {
  display: none;
}
#products .product-media.card-photo.rr-rug-media > .rr-rug-room {
  transition: opacity .4s ease, transform .4s ease;
}
#products .rr-rug-card[data-rug-frame="1"] .rr-rug-media > .rr-rug-only {
  opacity: 1; transform: none;
}
#products .rr-rug-card[data-rug-frame="1"] .rr-rug-media > .rr-rug-room {
  opacity: 0; transform: translateX(-7%);
}
#products .rr-rug-tools {
  position: absolute; z-index: 6; left: 8px; bottom: 8px;
  display: flex; gap: 1px; padding: 2px; border-radius: 999px;
  background: #fffdf6f5; color: #25372c; box-shadow: 0 2px 9px #24272229;
}
#products .rr-rug-tools[hidden] { display: none; }
#products .rr-rug-tools button {
  display: grid; place-items: center; width: 34px; height: 34px; border: 0;
  padding: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
#products .rr-rug-tools button:hover, #products .rr-rug-tools button[aria-pressed="true"] {
  background: #e6ebdf;
}
#products .rr-rug-tools button:focus-visible { outline: 2px solid #355943; outline-offset: -3px; }
#products .rr-rug-tools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; }
#products .rr-rug-credit {
  position: absolute; pointer-events: none; left: 8px; top: 8px; z-index: 4;
  padding: 3px 6px; background: #fffdf6ec; color: #334737; font: 11px/1.35 system-ui,sans-serif;
  border-radius: 5px; opacity: 0;
}
#products .rr-rug-card[data-rug-frame="1"] .rr-rug-credit { opacity: 1; }
@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  #products .rr-rug-card:hover:not(:has(.rr-rug-tools:hover)) .rr-rug-media { transform: none !important; }
  #products .rr-rug-card:hover:not(:has(.rr-rug-tools:hover)) .rr-rug-media > .rr-rug-only {
    opacity: 1; transform: none;
  }
  #products .rr-rug-card:hover:not(:has(.rr-rug-tools:hover)) .rr-rug-media > .rr-rug-room {
    opacity: 0; transform: translateX(-7%);
  }
  #products .rr-rug-card:hover:not(:has(.rr-rug-tools:hover)) .rr-rug-credit { opacity: 1; }
}
@media (pointer: coarse) {
  #products .rr-rug-tools button { width: 44px; height: 44px; }
}
@media (max-width: 759px) {
  #products .rr-rug-tools, #products .card-photo-toggle { display:none; }
  #products .product-media.card-photo.rr-rug-media > img { transition-duration:.18s; }
  :is(html,html[data-page="shop"]) #collection #products .product {
    display:flex; flex-direction:column; gap:0; min-width:0; overflow:hidden;
    padding:0; border-radius:15px; border:1px solid var(--line); background:var(--surface);
    box-shadow:0 3px 10px #29372a0b;
  }
  :is(html,html[data-page="shop"]) #collection #products .product .pm {
    display:contents;
  }
  :is(html,html[data-page="shop"]) #collection #products .product-media {
    display:block; height:auto; width:100%; aspect-ratio:1.14; border-radius:0;
  }
  :is(html,html[data-page="shop"]) #collection #products .product .save {
    position:absolute; top:5px; right:5px; left:auto; bottom:auto; min-width:44px; min-height:44px;
  }
  :is(html,html[data-page="shop"]) #collection #products .shop-share { display:none; }
  :is(html,html[data-page="shop"]) #collection #products .product-meta {
    display:flex; flex:1; flex-direction:column; align-items:stretch; gap:4px;
    padding:9px 9px 6px; margin:0; min-width:0;
  }
  :is(html,html[data-page="shop"]) #collection #products .product-meta h3 {
    min-height:2.5em; margin:0; color:var(--ink); font:650 .9rem/1.25 var(--sans);
  }
  :is(html,html[data-page="shop"]) #collection #products .shop-product-title {
    display:block; padding:0; width:100%; font:inherit;
  }
  #collection #products .shop-product-title > span {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
  }
  :is(html,html[data-page="shop"]) #collection #products .product-meta p {
    display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    margin:3px 0 0; font-size:.76rem; line-height:1.35;
  }
  :is(html,html[data-page="shop"]) #collection #products .product-meta strong {
    font:750 1rem/1.25 var(--sans); margin:2px 0 0; color:var(--ink);
  }
  :is(html,html[data-page="shop"]) #collection #products .product-meta :is(.try-room,.product-pin) {
    display:none;
  }
  :is(html,html[data-page="shop"]) #collection #products .product .qc {
    position:static; display:grid; order:2; width:100%; max-width:none; height:auto;
    flex:none; gap:4px; padding:0 9px 9px; margin:0; opacity:1; pointer-events:auto; transform:none;
  }
  :is(html,html[data-page="shop"]) #collection #products .product .qc :is(.qadd,.qstep,.qspecial) {
    width:100%; min-width:0; min-height:44px; margin:0; border-radius:10px; box-shadow:none;
  }
  :is(html,html[data-page="shop"]) #collection #products .product .qadd {
    background:#294b39; color:#fffdf6; border:1px solid #294b39; font:750 .825rem/1.2 var(--sans);
    gap:4px; padding:0 5px; letter-spacing:0;
  }
  :is(html,html[data-page="shop"]) #collection #products .product .qadd:active { background:#1c3729; }
  #products .rr-rug-credit { left:5px; top:auto; bottom:5px; }
  #dialog.pd .pd-views { gap:0; padding:3px; max-width:calc(100% - 12px); }
  #dialog.pd .pd-views button { padding:5px clamp(6px,2vw,10px); font-size:.74rem; min-height:44px; }
}
#dialog .pd-art > .rr-detail-rug { display:none; }
#dialog .pd-stage[data-view="rug-only"] .pd-art > img { display:none; }
#dialog .pd-stage[data-view="rug-only"] .pd-art > .rr-detail-rug { display:block; object-fit:contain; filter:none; }
#dialog .pd-stage[data-view="rug-only"] > .pd-tag { visibility:hidden; }
#dialog .pd-stage > :is(.rr-detail-expand,.rr-detail-credit) { display:none; }
#dialog .pd-stage[data-view="rug-only"] > :is(.rr-detail-expand,.rr-detail-credit) {
  display:grid; position:absolute; z-index:2; left:9px; color:#26392d; background:#fffdf6f0;
}
#dialog .rr-detail-expand { bottom:62px; width:44px; height:44px; place-items:center; border-radius:50%; }
#dialog .rr-detail-expand svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.65; }
#dialog .rr-detail-credit { top:8px; padding:4px 7px; border-radius:6px; font:12px/1.3 system-ui,sans-serif; }
@media (prefers-reduced-motion: reduce) {
  #products .product-media.card-photo.rr-rug-media > img { transition: none; }
  #products .rr-rug-tools [data-rug-command="pause"] { display: none; }
}
#rr-rug-fullscreen {
  position: fixed; inset: 0; margin: auto; max-width: none; width: 100%;
  max-height: none; height: 100%; height: 100dvh; border: 0; padding: 12px;
  background: #f7f4ed; color: #26392d; box-sizing: border-box;
}
#rr-rug-fullscreen[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 8px; }
#rr-rug-fullscreen::backdrop { background: #0e2119c4; }
#rr-rug-fullscreen header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0; margin: 0;
}
#rr-rug-fullscreen h2 { margin: 0; font: 650 clamp(16px, 3vw, 23px)/1.25 system-ui,sans-serif; }
#rr-rug-fullscreen button {
  flex: none; width: 44px; height: 44px; border: 1px solid #d6dacf; border-radius: 50%;
  padding: 0; font: 25px/1 system-ui,sans-serif; color: inherit; background: #fffdf8; cursor: pointer;
}
#rr-rug-fullscreen img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
#rr-rug-fullscreen p { margin: 0; color: #4c574d; text-align: center; font: 13px/1.35 system-ui,sans-serif; }
