/* compare.css — кнопка «Порівняти» на картках, плаваюча панель, таблиця на /porivnyannya/.
   Токени --sh-* (перемикаються у theme.css). */

/* Кнопка-тогл на картці товару */
.cmp-toggle {
  position: absolute; left: 10px; bottom: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 9px;
  border-radius: 999px; border: 1px solid var(--sh-border); background: rgba(255,255,255,.94);
  color: var(--sh-gray-dark); font-family: 'Geologica', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); transition: .15s;
}
:root[data-theme="dark"] .cmp-toggle { background: rgba(23,27,34,.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cmp-toggle { background: rgba(23,27,34,.9); } }
.cmp-toggle svg { width: 17px; height: 17px; flex: 0 0 auto; }
.cmp-toggle:hover { border-color: var(--sh-blue); color: var(--sh-blue); }
.cmp-toggle.is-on { background: var(--sh-accent); border-color: var(--sh-accent); color: #fff; }

/* Плаваюча панель порівняння */
.cmp-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  background: var(--sh-blue); color: #fff; border-radius: 999px; box-shadow: 0 12px 30px rgba(30,74,140,.4);
  font-family: 'Geologica', sans-serif;
}
.cmp-bar-ic { position: relative; display: inline-flex; }
.cmp-bar-ic svg { width: 24px; height: 24px; stroke: #fff; }
.cmp-bar-n { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sh-accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.cmp-bar-btn { background: #fff; color: var(--sh-blue); border-radius: 999px; padding: 9px 18px; font-family: 'Unbounded', sans-serif; font-size: 12px; font-weight: 600; text-decoration: none; }
.cmp-bar-btn:hover { background: #eef4ff; }
.cmp-bar-x { border: none; background: rgba(255,255,255,.2); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.cmp-bar-x:hover { background: rgba(255,255,255,.32); }
@media (max-width: 768px) { .cmp-bar { bottom: 62px; } }

/* Таблиця порівняння на /porivnyannya/ */
.cmp-cat { margin: 0 0 34px; }
.cmp-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.cmp-cat-head h2 { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; color: var(--sh-gray-900); margin: 0; }
.cmp-cat-link { font-size: 13px; color: var(--sh-blue); text-decoration: none; font-weight: 600; }
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--sh-border); border-radius: 14px; }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 460px; font-family: 'Geologica', sans-serif; }
.cmp-table th, .cmp-table td { border-bottom: 1px solid var(--sh-border); padding: 12px 14px; text-align: left; vertical-align: top; font-size: 13.5px; color: var(--sh-gray-dark); }
.cmp-table thead th { background: var(--sh-surface-2); position: relative; vertical-align: bottom; }
.cmp-th-lbl { width: 150px; min-width: 130px; }
.cmp-th-prod { min-width: 160px; }
.cmp-th-media { display: block; width: 100%; height: 96px; border-radius: 10px; overflow: hidden; background: var(--nk-photo-bg, #f2f4f8); margin-bottom: 8px; }
.cmp-th-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-th-name { display: block; font-family: 'Unbounded', sans-serif; font-size: 13px; font-weight: 600; color: var(--sh-gray-900); text-decoration: none; line-height: 1.3; }
.cmp-th-name:hover { color: var(--sh-blue); }
.cmp-price { display: block; margin-top: 5px; font-weight: 700; color: var(--sh-accent); font-size: 13px; }
.cmp-th-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--sh-border); background: var(--sh-surface); color: var(--sh-gray); font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.cmp-th-del:hover { color: #EF4444; border-color: #EF4444; }
.cmp-td-lbl { font-weight: 600; color: var(--sh-gray-900); background: var(--sh-surface-2); }
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: none; }
.cmp-table tr.cmp-diff td:not(.cmp-td-lbl) { color: var(--sh-gray-900); font-weight: 500; }
.cmp-table tr.cmp-diff .cmp-td-lbl { box-shadow: inset 3px 0 0 var(--sh-accent); }
.cmp-actions { margin: 6px 0 0; }
.cmp-clear { background: none; border: 1px solid var(--sh-border); border-radius: 9px; padding: 10px 18px; font-family: 'Geologica', sans-serif; font-size: 13px; color: var(--sh-gray-dark); cursor: pointer; }
.cmp-clear:hover { border-color: #EF4444; color: #EF4444; }
.cmp-empty { text-align: center; padding: 48px 20px; background: var(--sh-surface-2); border: 1px dashed var(--sh-border); border-radius: 16px; }
.cmp-empty-title { font-family: 'Unbounded', sans-serif; font-size: 17px; font-weight: 600; color: var(--sh-gray-900); margin: 12px 0 6px; }
.cmp-empty-hint { font-size: 14px; color: var(--sh-gray); max-width: 480px; margin: 0 auto 18px; line-height: 1.55; }
.cmp-empty-btn { display: inline-block; background: var(--sh-blue); color: #fff; border-radius: 9px; padding: 12px 24px; font-family: 'Unbounded', sans-serif; font-size: 13px; font-weight: 600; text-decoration: none; }
