/* Shared comparison selection. Existing catalogue images and anchors stay intact. */
.catalog-center-page .product-card { position:relative; }
.catalog-center-page .product-card__label { padding-right:92px; }
.product-card__compare { position:absolute; right:8px; bottom:5px; min-height:44px; padding:4px 10px; border:0; background:transparent; color:#c0520c; font:inherit; font-size:13px; cursor:pointer; border-radius:8px; }
.product-card__compare:hover,.product-card__compare[aria-pressed="true"] { background:#fff4ed; }
.comparison-rail { position:fixed; right:0; top:45%; z-index:45; border:1px solid #ddd; border-right:0; border-radius:10px 0 0 10px; background:#fff; color:#333; padding:12px 14px; min-height:76px; font:inherit; font-size:14px; font-weight:600; line-height:1.45; cursor:pointer; box-shadow:0 2px 12px #00000008; }
.comparison-rail:hover { color:#c0520c; border-color:#ed7020; }
.comparison-rail__count { display:block; margin:5px auto 0; min-width:22px; width:max-content; border-radius:20px; background:#ed7020; color:#fff; font-size:12px; padding:1px 6px; }
.comparison-drawer { position:fixed; inset:0 0 0 auto; margin:0; width:420px; max-width:100%; height:100dvh; max-height:100dvh; padding:28px 28px 24px; box-sizing:border-box; border:0; border-left:1px solid #e8e8e8; color:#333; background:#fff; font:inherit; overflow:hidden; }
.comparison-drawer[open] { display:flex; flex-direction:column; }
.comparison-drawer::backdrop { background:#23344933; }
body.comparison-drawer-open { overflow:hidden; }
.comparison-drawer button,.comparison-drawer select,.comparison-drawer input { font:inherit; }
.comparison-drawer button { cursor:pointer; }
.comparison-drawer button:disabled { cursor:default; opacity:.5; }
.comparison-drawer button:focus-visible,.comparison-drawer input:focus-visible,.comparison-drawer select:focus-visible,.comparison-rail:focus-visible,.product-card__compare:focus-visible { outline:3px solid #ed702080; outline-offset:2px; }
.comparison-drawer [hidden] { display:none!important; }
.comparison-drawer__header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; }
.comparison-drawer__header h2 { margin:0; font-size:24px; line-height:1.5; }
.comparison-drawer__header>div { display:flex; gap:10px; }
.comparison-drawer__header button { border:0; background:none; color:#666; padding:0 2px; min-height:44px; font-size:13px; }
.comparison-drawer__context { margin:8px 0 12px; color:#888; font-size:13px; }
.comparison-drawer__current { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 12px; padding:12px; flex-shrink:0; border:1px solid #f4d9c7; border-radius:10px; background:#fff8f3; }
.comparison-drawer__current>div { min-width:0; }
.comparison-drawer__current p { margin:0 0 4px; font-size:12px; color:#888; }
.comparison-drawer__current button { flex-shrink:0; min-height:44px; border:1px solid #ed7020; border-radius:8px; padding:6px 10px; background:#fff; color:#c0520c; font-size:13px; }
.comparison-drawer__selected { list-style:none; padding:0; margin:0 0 20px; flex-shrink:0; max-height:210px; overflow:auto; }
.comparison-drawer__item,.comparison-drawer__result { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #e8e8e8; min-height:64px; padding:8px 0; }
.comparison-drawer__item>div,.comparison-drawer__result>div { min-width:0; }
.comparison-drawer strong { display:block; font-size:15px; font-weight:500; line-height:1.45; overflow-wrap:anywhere; }
.comparison-drawer__item span,.comparison-drawer__result span { display:block; color:#888; font-size:12px; line-height:1.5; margin-top:2px; }
.comparison-drawer__item button,.comparison-drawer__result button { border:0; background:transparent; color:#666; min-width:44px; min-height:44px; padding:0 4px; font-size:13px; flex-shrink:0; }
.comparison-drawer__result button { color:#c0520c; }
.comparison-drawer__empty { font-size:14px; color:#888; line-height:1.7; padding:12px 0; margin:0; }
.comparison-drawer__search { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:8px 12px; flex-shrink:0; }
.comparison-drawer__search label { font-size:13px; color:#666; }
.comparison-drawer__search select,.comparison-drawer__search input { width:100%; min-width:0; height:44px; padding:8px 12px; border:1px solid #ddd; border-radius:6px; background:#fff; color:#333; font-size:14px; }
.comparison-drawer__search input { grid-column:1/-1; }
.comparison-drawer__search select:disabled { color:#666; background:#fafafa; opacity:1; }
.comparison-drawer__result-heading { display:flex; align-items:center; justify-content:space-between; margin:16px 0 0; flex-shrink:0; }
.comparison-drawer__result-heading h3 { font-size:14px; margin:0; font-weight:500; }
.comparison-drawer__result-heading span { color:#888; font-size:12px; }
.comparison-drawer__results { list-style:none; padding:0; margin:0; flex:1; min-height:72px; overflow:auto; overscroll-behavior:contain; }
.comparison-drawer__message { font-size:13px; color:#ad4400; margin:8px 0 0; min-height:0; line-height:1.5; flex-shrink:0; }
.comparison-drawer__message:empty { display:none; }
.comparison-drawer__retry { background:#fff; border:1px solid #ddd; border-radius:6px; min-height:44px; margin-top:8px; }
.comparison-drawer__footer { flex-shrink:0; background:#fff; padding-top:16px; }
.comparison-drawer__footer p { font-size:12px; color:#888; line-height:1.6; margin:0 0 14px; }
.comparison-drawer__start { display:block; width:100%; min-height:44px; border:0; border-radius:10px; background:#ed7020; color:#fff; font-size:15px; font-weight:600; }
.comparison-drawer__start:hover:not(:disabled) { background:#d95e12; }
@media(max-width:768px) {
  /* Mobile comparison is unavailable, not merely a hidden floating button. */
  [data-comparison-open], [data-comparison-add], .comparison-drawer[open] { display:none!important; }
  .comparison-drawer { width:390px; padding:20px 20px 24px; }
  .comparison-rail { top:auto; bottom:24px; padding:8px 10px; min-height:64px; font-size:12px; }
  .catalog-center-page .product-card__label { padding-right:14px; padding-bottom:14px; }
  .product-card__compare { left:6px; right:6px; bottom:2px; font-size:12px; }
  .comparison-drawer__header h2 { font-size:22px; }
  .comparison-drawer__selected { max-height:180px; margin-bottom:14px; }
  .comparison-drawer__item { min-height:54px; }
}
@media(max-height:620px) {
  .comparison-drawer { overflow-y:auto; }
  .comparison-drawer__results { flex:none; max-height:160px; }
  .comparison-drawer__selected { max-height:100px; }
}
