/* Shared article shopping window. IKEA Furniture Upgrades is the visual reference. */
.pieces-trigger, .piece-picker > summary {
  display: inline-flex; align-items: center; gap: 1.25rem; min-height: 44px;
  margin: 12px 0 0; padding: 8px 15px; list-style: none;
  border: 1px solid #252522; background: #fff; color: #252522; cursor: pointer;
  font: 500 12px/1.4 'DM Sans', Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase;
}
.piece-picker > summary::-webkit-details-marker { display: none; }
.pieces-trigger::after, .piece-picker > summary::after { content: '+'; font-size: 18px; }
.piece-picker[open] > summary::after { content: '−'; }
html:has(.pieces-dialog[open]) { overflow: hidden; }
.pieces-dialog.article-pieces {
  box-sizing: border-box; position: fixed; inset: 0; margin: auto;
  width: min(880px, calc(100% - 48px)); max-width: none; max-height: 88vh; max-height: 88dvh;
  padding: 0; overflow: auto; overscroll-behavior: contain;
  border: 0; border-radius: 0; background: #fff; color: #252525;
  box-shadow: 0 12px 60px #0004; text-align: left;
}
.pieces-dialog.article-pieces::backdrop { background: #0006; }
.article-pieces .pieces-header {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; background: white;
  border-bottom: 1px solid #eee; padding: 24px 24px 20px 36px;
}
.article-pieces .pieces-header h2 {
  margin: 0; color: #252525; font: 400 32px/1.2 Georgia, serif; letter-spacing: normal; text-transform: none;
}
.article-pieces .pieces-close {
  flex: 0 0 44px; height: 44px; border: 0; background: white; color: #252525;
  font: 400 26px/1 'DM Sans', Arial, sans-serif; cursor: pointer;
}
.article-pieces .selection, .piece-picker > .selection { padding: 24px 36px 25px; }
:is(.article-pieces, .piece-picker) .products {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px 22px;
  list-style: none; margin: 0; padding: 0;
}
:is(.article-pieces, .piece-picker) .product { min-width: 0; margin: 0; padding: 0; }
:is(.article-pieces, .piece-picker) .product-image {
  aspect-ratio: 1.3; display: grid; place-items: center; width: 100%;
  background: #f7f7f5; overflow: hidden;
}
:is(.article-pieces, .piece-picker) .piece-photo-link { display: block; margin: 0 0 16px; }
:is(.article-pieces, .piece-picker) .product-image img {
  display: block; width: 90%; height: 90%; min-height: 0; object-fit: contain;
  margin: 0; mix-blend-mode: multiply;
}
.piece-swatch { width: 86%; height: 81%; }
:is(.article-pieces, .piece-picker) .brand {
  margin: 0 0 6px; color: #54514d; font: 600 10px/1.4 'DM Sans', Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase;
}
:is(.article-pieces, .piece-picker) .product h4 {
  margin: 0 0 8px; font: 400 15px/1.45 'DM Sans', Arial, sans-serif; color: #252525; letter-spacing: 0; text-transform: none;
}
:is(.article-pieces, .piece-picker) .piece-note, :is(.article-pieces, .piece-picker) .piece-disclosure {
  margin: 0 0 10px; color: #615e58; font: 400 13px/1.5 'DM Sans', Arial, sans-serif;
}
:is(.article-pieces, .piece-picker) .piece-cta {
  display: inline-block; padding: 4px 0; color: #252525; font: 400 13px/1.5 'DM Sans', Arial, sans-serif;
  text-decoration: underline; text-underline-offset: 3px;
}
:is(.article-pieces, .piece-picker) .piece-disclosure { margin: 24px 0 0; padding-top: 14px; border-top: 1px solid #eee; }
.piece-disclosure a { color: inherit; }
.pieces-trigger:focus-visible, .piece-picker summary:focus-visible, .article-pieces :focus-visible { outline: 2px solid #645348; outline-offset: 2px; }
@media (max-width: 700px) {
  .pieces-dialog.article-pieces {
    inset: auto 0 0; margin: 0; width: 100%; max-height: 90vh; max-height: 90svh;
    border-radius: 16px 16px 0 0;
  }
  .article-pieces .pieces-header { padding: 16px 14px 16px 22px; gap: 12px; }
  .article-pieces .pieces-header h2 { font-size: 28px; }
  .article-pieces .selection, .piece-picker > .selection { padding: 20px 22px max(28px,env(safe-area-inset-bottom)); }
  :is(.article-pieces, .piece-picker) .products { gap: 22px 16px; }
  :is(.article-pieces, .piece-picker) .product-image { aspect-ratio: 1; }
}
