/* Compare page — Multikala */
.mk-compare-page{background:var(--mk-surface)}
.mk-compare{padding:1.1rem 0 3.5rem}
.mk-compare__shell{display:flex;flex-direction:column;gap:1rem}
.mk-compare__head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;
}
.mk-compare__title{margin:0;font-size:clamp(1.15rem,2.4vw,1.55rem);font-weight:800;letter-spacing:-.01em}
.mk-compare__diff-toggle{
  display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .75rem;border-radius:999px;
  background:#fff;border:1px solid var(--mk-gray-line);font-size:.78rem;font-weight:700;cursor:pointer;
  user-select:none;box-shadow:var(--mk-shadow-sm);
}
.mk-compare__diff-toggle input{accent-color:var(--mk-orange);width:1rem;height:1rem}

/* Sticky mini cards — fixed so show/hide does not shift page layout */
.mk-compare__sticky{
  position:fixed;inset-inline:0;top:calc(var(--mk-header-h) + .35rem);z-index:30;
  width:min(1176px, calc(100% - 1.5rem));margin-inline:auto;
  display:grid;gap:.65rem;padding:.55rem;border-radius:1rem;
  background:rgba(255,255,255,.92);border:1px solid rgba(232,234,238,.95);
  backdrop-filter:blur(10px);box-shadow:0 10px 28px rgba(10,10,10,.08);
}
.mk-compare__sticky[hidden]{display:none!important}
.mk-compare__sticky-card,
.mk-compare__sticky-add{
  display:grid;grid-template-columns:48px 1fr;gap:.55rem;align-items:center;width:100%;
  min-width:0;padding:.35rem .45rem;border-radius:.75rem;background:var(--mk-gray-bg);
  border:0;cursor:pointer;text-align:right;color:inherit;font:inherit;
}
.mk-compare__sticky-add{grid-template-columns:auto 1fr;justify-items:start}
.mk-compare__sticky-add-ico{
  width:1.7rem;height:1.7rem;border-radius:.45rem;display:inline-flex;align-items:center;justify-content:center;
  background:#fff;border:1px dashed #d5d8de;color:var(--mk-gray);font-size:1.1rem;font-weight:300;line-height:1;
}
.mk-compare__sticky-card:hover,
.mk-compare__sticky-add:hover{background:#eceef2}
.mk-compare__sticky-card img{width:48px;height:48px;object-fit:contain;border-radius:.45rem;background:#fff}
.mk-compare__sticky-body{min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:.2rem}
.mk-compare__sticky-card strong{display:block;font-size:.72rem;font-weight:700;line-height:1.35;
  overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}
.mk-compare__sticky-add span:last-child{font-size:.75rem;font-weight:750;color:var(--mk-ink)}

/* Product slots */
.mk-compare__cards{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;align-items:stretch;
}
.mk-compare__card-slot{display:flex;min-width:0;min-height:100%}
.mk-compare__card-slot > .mk-compare__card,
.mk-compare__card-slot > .mk-compare__add{flex:1 1 auto;width:100%}
@media (min-width:768px){
  .mk-compare__cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
  .mk-compare__sticky{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:767.98px){
  .mk-compare__sticky{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mk-compare__card-slot[data-slot="2"]{display:none!important}
}

.mk-compare__card{
  position:relative;display:flex;flex-direction:column;gap:.7rem;min-width:0;height:100%;
  padding:1rem .9rem .9rem;border-radius:1.15rem;background:#fff;
  border:1px solid var(--mk-gray-line);box-shadow:var(--mk-shadow-sm);
  transition:box-shadow .25s var(--mk-ease), transform .25s var(--mk-ease);
}
.mk-compare__card:hover{box-shadow:var(--mk-shadow);transform:translateY(-2px)}
.mk-compare__card-remove{
  position:absolute;top:.65rem;inset-inline-start:.65rem;z-index:2;
  width:1.85rem;height:1.85rem;border:0;border-radius:999px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(15,15,15,.06);color:var(--mk-ink);
}
.mk-compare__card-remove:hover{background:rgba(15,15,15,.12);color:#b91c1c}
.mk-compare__card-img{
  display:flex;align-items:center;justify-content:center;min-height:160px;padding:.35rem .2rem .1rem;
}
.mk-compare__card-img img{max-width:100%;max-height:190px;width:auto;height:auto;object-fit:contain;margin-inline:auto}
.mk-compare__card-title{
  margin:0;font-size:.86rem;font-weight:750;line-height:1.45;min-height:2.7em;
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.mk-compare__card-meta{
  display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:.35rem;margin-top:auto;
}
.mk-compare__rating{display:inline-flex;align-items:center;gap:.25rem;color:#ca8a04;font-weight:800;font-size:.78rem}
.mk-compare__rating svg{color:#eab308}
.mk-compare__price.mk-card__price,
.mk-compare__price.price{
  color:var(--mk-orange-text);font-weight:800;font-size:.92rem;margin:0;display:block;text-align:right;font-style:normal;width:100%;
}
.mk-compare__price .woocommerce-Price-amount,
.mk-compare__price bdi{color:var(--mk-orange-text)}
.mk-compare__price .mk-price{width:100%}
.mk-compare__price .mk-price__sale{font-size:.92rem;text-align:right}
.mk-compare__price .mk-price__meta{direction:rtl}
.mk-compare__price .mk-card__oos{color:var(--mk-muted-text);font-weight:700;font-size:.82rem}

/* Sticky price must beat .mk-compare__price (.92rem) — match title .72rem */
.mk-compare__sticky-card .mk-compare__sticky-price.mk-compare__price,
.mk-compare__sticky-card .mk-compare__sticky-price.mk-card__price,
.mk-compare__sticky-card .mk-compare__sticky-price.price{
  color:var(--mk-orange-text);font-weight:700;font-size:.68rem!important;margin:0;display:block;text-align:right;
  font-style:normal;width:100%;line-height:1.3;
}
.mk-compare__sticky-card .mk-compare__sticky-price .woocommerce-Price-amount,
.mk-compare__sticky-card .mk-compare__sticky-price bdi,
.mk-compare__sticky-card .mk-compare__sticky-price .amount{
  color:var(--mk-orange-text)!important;font-size:.68rem!important;font-weight:700!important;
}
.mk-compare__sticky-card .woocommerce-Price-currencySymbol{
  font-size:8px!important;font-weight:650!important;
}
.mk-compare__sticky-card .mk-compare__sticky-price .mk-price{width:100%;gap:0}
.mk-compare__sticky-card .mk-compare__sticky-price .mk-price__sale{
  font-size:.68rem!important;text-align:right;font-weight:700!important;line-height:1.3;
}
.mk-compare__sticky-card .mk-compare__sticky-price .mk-price__meta{direction:rtl;font-size:.58rem!important;gap:.25rem}
.mk-compare__sticky-card .mk-compare__sticky-price .mk-price__badge{font-size:.55rem;padding:.08rem .28rem}
.mk-compare__sticky-card .mk-compare__sticky-price del,
.mk-compare__sticky-card .mk-compare__sticky-price .mk-price__regular{
  font-size:.58rem!important;font-weight:650!important;
}
.mk-compare__sticky-card .mk-compare__sticky-price .mk-card__oos{
  color:var(--mk-muted-text);font-weight:700;font-size:.64rem!important;
}
@media (max-width:767.98px){
  .mk-compare__sticky-card strong{font-size:.68rem}
  .mk-compare__sticky-card .mk-compare__sticky-price.mk-compare__price,
  .mk-compare__sticky-card .mk-compare__sticky-price.mk-card__price,
  .mk-compare__sticky-card .mk-compare__sticky-price.price,
  .mk-compare__sticky-card .mk-compare__sticky-price .woocommerce-Price-amount,
  .mk-compare__sticky-card .mk-compare__sticky-price bdi,
  .mk-compare__sticky-card .mk-compare__sticky-price .mk-price__sale{
    font-size:.64rem!important;
  }
}
.mk-compare__buy{
  display:inline-flex;align-items:center;justify-content:center;gap:.35rem;
  width:100%;padding:.7rem .85rem;border-radius:.85rem;border:1.5px solid rgba(255,146,28,.55);
  background:#fff;text-wrap:nowrap;color:var(--mk-orange-text);font-weight:800;font-size:.82rem;
  transition:background .2s var(--mk-ease), color .2s var(--mk-ease), border-color .2s var(--mk-ease);
}
.mk-compare__buy:hover{background:var(--mk-orange);color:var(--mk-black)!important;border-color:var(--mk-orange)}

/* Empty add slot — stretch to match sibling card; button aligns with buy */
.mk-compare__add{
  display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:.85rem;
  height:100%;min-height:100%;box-sizing:border-box;
  padding:1rem .9rem .9rem;border-radius:1.15rem;background:#fff;border:1.5px dashed #d5d8de;
  text-align:center;
}
.mk-compare__add-body{
  flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.85rem;
  min-height:160px;padding:.35rem 0;
}
.mk-compare__add-frame{
  width:4.5rem;height:4.5rem;border-radius:1rem;display:inline-flex;align-items:center;justify-content:center;
  background:var(--mk-gray-bg);color:var(--mk-gray-soft);font-size:2rem;font-weight:300;line-height:1;
}
.mk-compare__add-skel{width:70%;display:grid;gap:.4rem}
.mk-compare__add-skel i{display:block;height:.55rem;border-radius:999px;background:linear-gradient(90deg,#eceef2,#f7f8fa,#eceef2);background-size:200% 100%;animation:mkCmpShimmer 1.4s linear infinite}
.mk-compare__add-skel i:nth-child(2){width:85%}
.mk-compare__add-skel i:nth-child(3){width:55%}
@keyframes mkCmpShimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}
.mk-compare__add-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.4rem;
  width:100%;margin-top:auto;padding:.7rem .85rem;border:0;border-radius:.85rem;cursor:pointer;
  background:var(--mk-black);color:#fff;font-weight:800;font-size:.82rem;
  box-shadow:0 8px 22px rgba(10,10,10,.18);
}
.mk-compare__add-btn:hover{background:#222}

/* Specs table */
.mk-compare__table-wrap{margin-top:.35rem}
.mk-compare__table-wrap[hidden]{display:none!important}
.mk-compare__section{
  margin:0 0 .85rem;padding:.55rem .85rem;border-radius:.75rem;
  background:linear-gradient(90deg, rgb(28 151 255 / 16%), rgb(28 77 255 / 5%));
  color:var(--mk-ink);font-weight:800;font-size:.86rem;
}
.mk-compare__row{
  display:grid;gap:.65rem;align-items:stretch;margin:0 0 .35rem;
  padding:.55rem .15rem;border-radius:.65rem;
}
.mk-compare__row.is-alt{background:rgba(244,245,247,.65)}
.mk-compare__row.is-same[data-diff-dimmed="1"]{opacity:.3}
.mk-compare__row-label{
  grid-column:1 / -1;font-size:.75rem;font-weight:700;color:var(--mk-gray);padding:0 .35rem .1rem;
}
.mk-compare__row-vals{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;
}
@media (min-width:768px){
  .mk-compare__row-vals{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:767.98px){
  .mk-compare__row-vals > :nth-child(3){display:none!important}
}
.mk-compare__cell{
  min-width:0;padding:.55rem .65rem;border-radius:.7rem;background:#fff;border:1px solid var(--mk-gray-line);
  font-size:.8rem;font-weight:650;line-height:1.55;word-break:break-word;
}
.mk-compare__cell.is-empty{color:var(--mk-gray-soft);font-weight:600}
.mk-compare__cell.is-diff{border-color:rgba(255,146,28,.45);background:rgba(255,146,28,.06)}

/* Modal */
.mk-compare-modal[hidden]{display:none!important}
.mk-compare-modal{
  position:fixed;inset:0;bottom:var(--mk-bottom-nav-h,0px);z-index:1200;
  display:flex;align-items:flex-end;justify-content:center;
}
@media (min-width:768px){
  .mk-compare-modal{align-items:center;padding:1rem}
}
.mk-compare-modal__backdrop{position:absolute;inset:0;background:rgba(10,10,10,.48);backdrop-filter:blur(2px)}
.mk-compare-modal__dialog{
  position:relative;z-index:1;width:min(1100px,100%);
  max-height:min(92vh, calc(100dvh - var(--mk-bottom-nav-h,0px) - .5rem), 920px);
  display:flex;flex-direction:column;gap:.75rem;
  background:#fff;border-radius:1.25rem 1.25rem 0 0;padding:1.1rem .9rem .85rem;
  box-shadow:0 -8px 40px rgba(10,10,10,.18);overflow:hidden;
}
@media (min-width:768px){
  .mk-compare-modal__dialog{border-radius:1.25rem;padding:1.25rem 1.25rem 1rem}
}
.mk-compare-modal__head{
  display:flex;align-items:center;justify-content:space-between;gap:.75rem;
  flex:0 0 auto;
}
.mk-compare-modal__title{
  margin:0;flex:1 1 auto;min-width:0;text-align:right;font-size:1rem;font-weight:800;line-height:1.35;
}
.mk-compare-modal__x{
  position:static;flex:0 0 auto;width:2rem;height:2rem;border:0;border-radius:999px;
  background:var(--mk-gray-bg);color:var(--mk-ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
}
.mk-compare-modal__toolbar{display:flex;flex-direction:column;gap:.55rem;align-items:center}
.mk-compare-modal__search{
  width:min(420px,100%);display:flex;align-items:center;gap:.45rem;padding:.55rem .8rem;
  border-radius:999px;background:var(--mk-gray-bg);border:1px solid var(--mk-gray-line);color:var(--mk-gray);
}
.mk-compare-modal__search input{
  flex:1;min-width:0;border:0;background:transparent;outline:0;color:var(--mk-ink);font-size:.88rem;
}
.mk-compare-modal__meta{
  display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap;
  font-size:.75rem;color:var(--mk-gray);font-weight:650;
}
.mk-compare-modal__selected{display:flex;flex-wrap:wrap;gap:.4rem;justify-content:center;min-height:0}
.mk-compare-modal__chip{
  display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .35rem .2rem .55rem;
  border-radius:999px;background:var(--mk-gray-bg);border:1px solid var(--mk-gray-line);
}
.mk-compare-modal__chip img{width:28px;height:28px;object-fit:contain;border-radius:.35rem;background:#fff}
.mk-compare-modal__chip button{
  width:1.35rem;height:1.35rem;border:0;border-radius:999px;background:rgba(15,15,15,.08);cursor:pointer;color:var(--mk-ink);
}
.mk-compare-modal__grid{
  flex:1;min-height:180px;overflow:auto;display:grid;gap:.75rem;padding:.15rem .1rem .5rem;
  grid-template-columns:repeat(2,minmax(0,1fr));
  -webkit-overflow-scrolling:touch;
}
@media (min-width:640px){
  .mk-compare-modal__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:960px){
  .mk-compare-modal__grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.mk-compare-modal__sentinel{grid-column:1 / -1;height:1px;pointer-events:none}
.mk-compare-modal__item{
  position:relative;display:flex;flex-direction:column;gap:.45rem;min-width:0;
  padding:.75rem .65rem;border-radius:1rem;background:#fff;border:1px solid var(--mk-gray-line);
  cursor:pointer;text-align:right;transition:border-color .2s var(--mk-ease), box-shadow .2s var(--mk-ease);
}
.mk-compare-modal__item:hover{border-color:rgba(255,146,28,.45);box-shadow:var(--mk-shadow-sm)}
.mk-compare-modal__item.is-on{border-color:var(--mk-orange);box-shadow:0 0 0 1px rgba(255,146,28,.35)}
.mk-compare-modal__check{
  position:absolute;top:.45rem;inset-inline-start:.45rem;width:1.35rem;height:1.35rem;
  display:none;align-items:center;justify-content:center;z-index:1;
}
.mk-compare-modal__check .mk-toast__tick{display:block;width:1.25rem;height:1.25rem}
.mk-compare-modal__check .mk-toast__tick-ring{animation:none}
.mk-compare-modal__check .mk-toast__tick-path{stroke-dasharray:none;stroke-dashoffset:0;animation:none}
.mk-compare-modal__item.is-on .mk-compare-modal__check{display:inline-flex}
.mk-compare-modal__item img{width:100%;height:120px;object-fit:contain;margin:.15rem 0}
.mk-compare-modal__item strong{
  font-size:.78rem;font-weight:750;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.5em;
}
.mk-compare-modal__item-meta{display:flex;flex-direction:column;align-items:stretch;gap:.25rem}
.mk-compare-modal__item-price,
.mk-compare-modal__item-price.mk-card__price,
.mk-compare-modal__item-price.price{
  color:var(--mk-orange-text);font-weight:800;font-size:.78rem;text-align:right;width:100%;
}
.mk-compare-modal__foot{
  padding-top:.15rem;flex:0 0 auto;background:#fff;
  position:sticky;bottom:0;z-index:2;
  padding-bottom:max(.35rem, env(safe-area-inset-bottom,0px));
}
.mk-compare-modal__confirm{
  width:100%;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  flex-direction:row;
}
.mk-compare-modal__confirm:disabled{opacity:.45;cursor:not-allowed}
.mk-compare-modal__confirm-ico{
  width:1.35rem;height:1.35rem;border-radius:999px;background:rgba(255,255,255,.2);
  display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:0;
}
.mk-compare-modal__confirm-ico .mk-icon,
.mk-compare-modal__confirm-svg{
  display:block;margin:0;width:16px;height:16px;
}
.mk-compare-modal__hint{
  grid-column:1 / -1;text-align:center;color:var(--mk-gray);padding:2rem .5rem;font-size:.88rem;
}
body.mk-compare-modal-open{overflow:hidden}
