/* Compare (InFront, Oct 2026): /compare page, compare tray, sticky product bar, compare toggles. */

:root {
  --cmp-ink: #111827;
  --cmp-ink2: #374151;
  --cmp-mute: #6b7280;
  --cmp-line: #e5e7eb;
  --cmp-soft: #f9fafb;
  --cmp-accent: #0f766e;
  --cmp-tray-h: 82px;
}

/* ---------------------------------------------------------------- toggles on cards / product page */

.btn-iqitcompare-add .added { display: none; }
.btn-iqitcompare-add.iqitcompare-added .added { display: inline-block; }
.btn-iqitcompare-add.iqitcompare-added .not-added { display: none; }
.product-functional-buttons-links .btn-iqitcompare-add.iqitcompare-added,
.btn-iqitcompare-add.iqitcompare-added:not(.btn) { color: #fff !important; background: var(--cmp-ink) !important; border-color: var(--cmp-ink) !important; }
#iqit-compare-product-btn.iqitcompare-added { color: #fff; background: var(--cmp-ink); border-color: var(--cmp-ink); }
.ift-cmp-pdpbtn { display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; padding-left: 16px; padding-right: 16px; white-space: nowrap; }
.ift-cmp-pdpbtn .ift-cmp-pdpbtn__txt { font-size: 14px; font-weight: 600; line-height: 1; }
.btn-iqitcompare-add.is-busy { opacity: .55; pointer-events: none; }
.ift-cmp-navcount { font-variant-numeric: tabular-nums; }
#iqitcompare-floating, #iqitcompare-notification { display: none !important; }

/* ---------------------------------------------------------------- page */

.ift-cmp { margin: 6px 0 48px; color: var(--cmp-ink); }
.ift-cmp.is-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }
.ift-compare-page #content-wrapper, .ift-compare-page .page-content { overflow: visible; }

.ift-cmp__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 2px 0 16px; border-bottom: 1px solid var(--cmp-line); margin-bottom: 14px; }
.ift-cmp__title { font-size: 28px; line-height: 1.2; font-weight: 700; margin: 0; letter-spacing: -.01em; color: var(--cmp-ink); }
.ift-cmp__sub { margin: 6px 0 0; color: var(--cmp-mute); font-size: 14px; max-width: 640px; }
.ift-cmp__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ift-cmp__act { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: var(--cmp-ink2); font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1; }
.ift-cmp__act:hover, .ift-cmp__act:focus-visible { border-color: var(--cmp-ink); color: var(--cmp-ink); }
a.ift-cmp__act { text-decoration: none !important; color: var(--cmp-ink2); }
.ift-cmp__act--quiet { border-color: transparent; color: var(--cmp-mute); padding: 0 6px; }
.ift-cmp__act--quiet:hover { border-color: transparent; text-decoration: underline; }
.ift-cmp__printmeta { display: none; }

.ift-cmp__tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--cmp-line); margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.ift-cmp__tab { border: 0; background: none; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--cmp-mute); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.ift-cmp__tab:hover { color: var(--cmp-ink); }
.ift-cmp__tab.is-active { color: var(--cmp-ink); border-bottom-color: var(--cmp-ink); }
.ift-cmp__tabcount { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: #f3f4f6; font-size: 12px; color: var(--cmp-ink2); margin-left: 4px; text-align: center; }

.ift-cmp__toolbar { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 2px 0 14px; font-size: 14px; color: var(--cmp-ink2); }
.ift-cmp__switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; margin: 0; user-select: none; position: relative; font-weight: 500; }
.ift-cmp__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ift-cmp__knob { width: 34px; height: 20px; border-radius: 10px; background: #d1d5db; position: relative; transition: background .15s; flex: none; }
.ift-cmp__knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.ift-cmp__switch input:checked + .ift-cmp__knob { background: var(--cmp-ink); }
.ift-cmp__switch input:checked + .ift-cmp__knob::after { transform: translateX(14px); }
.ift-cmp__switch input:focus-visible + .ift-cmp__knob { outline: 2px solid var(--cmp-accent); outline-offset: 2px; }
.ift-cmp__legend { margin-left: auto; color: var(--cmp-mute); font-size: 13px; display: inline-flex; align-items: center; }

.ift-cmp__tick { display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: none; margin-right: 7px; vertical-align: -3px;
  background: var(--cmp-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* table */
.ift-cmp__scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ift-cmp__table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: calc(200px + var(--cmp-cols, 4) * 215px); margin: 0; }
.ift-cmp__labelcol { width: 200px; }
.ift-cmp__corner { vertical-align: bottom; padding: 0 16px 18px 0; text-align: left; font-weight: 400; }
.ift-cmp__count { display: block; font-size: 16px; font-weight: 700; color: var(--cmp-ink); text-transform: capitalize; }
.ift-cmp__hint { display: block; font-size: 13px; color: var(--cmp-mute); margin-top: 3px; }
.ift-cmp__pcell { vertical-align: top; padding: 0 6px 18px; height: 1px; }

.ift-cmp__ghead th { padding: 26px 0 0; text-align: left; border: 0; }
.ift-cmp__gtoggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 0 9px; border: 0; border-bottom: 2px solid var(--cmp-ink); background: none; cursor: pointer; text-align: left; color: var(--cmp-ink); }
.ift-cmp__glabel { font-size: 16px; font-weight: 700; }
.ift-cmp__gcount { font-size: 12px; color: var(--cmp-mute); font-weight: 500; }
.ift-cmp__chev { margin-left: auto; transition: transform .15s; color: var(--cmp-mute); }
.ift-cmp__group.is-collapsed .ift-cmp__chev { transform: rotate(-90deg); }
.ift-cmp__group.is-collapsed .ift-cmp__row { display: none; }
.ift-cmp__group[data-group="glance"] .ift-cmp__gtoggle { border-bottom-color: var(--cmp-accent); }

.ift-cmp__label, .ift-cmp__cell { padding: 11px 12px; border-bottom: 1px solid var(--cmp-line); vertical-align: top; font-size: 14px; line-height: 1.45; text-align: left; background: #fff; }
.ift-cmp__label { font-weight: 600; color: var(--cmp-ink2); padding-left: 0; }
.ift-cmp__cell { color: var(--cmp-ink); overflow-wrap: anywhere; }
.ift-cmp__cell--slot { background: transparent; }
.ift-cmp__group[data-group="glance"] .ift-cmp__label, .ift-cmp__group[data-group="glance"] .ift-cmp__cell { padding-top: 13px; padding-bottom: 13px; }
.ift-cmp__group[data-group="glance"] .ift-cmp__cell { font-size: 15px; }
.ift-cmp__table.is-hl .ift-cmp__row.is-same .ift-cmp__cell,
.ift-cmp__table.is-hl .ift-cmp__row.is-same .ift-cmp__label { color: #9ca3af; }
.ift-cmp__table.is-hl .ift-cmp__row.is-diff .ift-cmp__label { color: var(--cmp-ink); }
.ift-cmp__table.only-diff .ift-cmp__row.is-same, .ift-cmp__table.only-diff .ift-cmp__group.is-allsame { display: none; }
.ift-cmp__row:hover .ift-cmp__cell:not(.ift-cmp__cell--slot), .ift-cmp__row:hover .ift-cmp__label { background: var(--cmp-soft); }
.ift-cmp__cell.is-best .ift-cmp__val { font-weight: 600; }
.ift-cmp__none { color: #c4c9d0; }
.ift-cmp__src { color: var(--cmp-mute); margin-left: 1px; }
.ift-cmp__val.is-long { max-height: 4.35em; overflow: hidden; }
.ift-cmp__cell.is-open .ift-cmp__val.is-long { max-height: none; }
.ift-cmp__more { border: 0; background: none; padding: 0; margin-top: 4px; color: var(--cmp-accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.ift-cmp__list { margin: 0; padding: 0; list-style: none; }
.ift-cmp__list li { position: relative; padding-left: 14px; margin: 0 0 5px; }
.ift-cmp__list li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: #9ca3af; }
.ift-cmp__foot { font-size: 13px; color: var(--cmp-mute); margin: 18px 0 0; }
.ift-cmp__foot a { color: var(--cmp-ink); text-decoration: underline; }

/* product header card */
.ift-cmp-p { position: relative; display: flex; flex-direction: column; height: 100%; padding: 12px 14px 14px; border: 1px solid var(--cmp-line); border-radius: 12px; background: #fff; }
.ift-cmp-p__remove { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--cmp-mute); display: grid; place-items: center; cursor: pointer; z-index: 1; padding: 0; }
.ift-cmp-p__remove:hover, .ift-cmp-p__remove:focus-visible { background: #f3f4f6; color: var(--cmp-ink); }
.ift-cmp-p__img { display: flex; align-items: center; justify-content: center; height: 168px; margin: 6px 0 12px; }
.ift-cmp-p__img img { max-height: 168px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.ift-cmp-p__brand { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--cmp-mute); font-weight: 600; }
.ift-cmp-p__name { font-size: 14px; line-height: 1.38; font-weight: 600; color: var(--cmp-ink) !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.38em * 3); margin-top: 2px; text-decoration: none; }
.ift-cmp-p__name:hover { text-decoration: underline; }
.ift-cmp-p__ref { font-size: 12px; color: var(--cmp-mute); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ift-cmp-p__price { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ift-cmp-p__now { font-size: 21px; font-weight: 700; color: var(--cmp-ink); font-variant-numeric: tabular-nums; }
.ift-cmp-p__was { color: var(--cmp-mute); font-size: 13px; }
.ift-cmp-p__stock { font-size: 13px; margin-top: 4px; display: flex; align-items: center; gap: 7px; color: var(--cmp-ink2); }
.ift-cmp-p__stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; flex: none; }
.ift-cmp-p__stock.is-in::before { background: #16a34a; }
.ift-cmp-p__stock.is-order::before { background: #d97706; }
.ift-cmp-p__stock.is-out::before { background: #b91c1c; }
.ift-cmp-p__buy { margin-top: 12px; }
.ift-cmp-p__form { margin: 0; }
.ift-cmp-p__cart { width: 100%; min-height: 40px; border-radius: 8px !important; font-weight: 600; display: flex !important; align-items: center; justify-content: center; gap: 4px; font-size: 14px; }
.ift-cmp-p__cart .spinner-icon { display: none; }
.ift-cmp-p__cart.processing-add .spinner-icon { display: inline-block; }
.ift-cmp-p__cart.processing-add .bag-icon { display: none; }
.ift-cmp-p__wins { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--cmp-line); font-size: 13px; color: var(--cmp-ink2); }
.ift-cmp-p__wins li { display: flex; align-items: flex-start; padding: 2px 0; line-height: 1.35; }
.ift-cmp-p__wins li::before { content: ''; width: 14px; height: 14px; margin: 1px 7px 0 0; flex: none; border-radius: 50%;
  background: var(--cmp-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 9px no-repeat; }

/* empty slot */
.ift-cmp__add { border: 1px dashed #cbd5e1; border-radius: 12px; padding: 16px 14px; height: 100%; display: flex; flex-direction: column; gap: 12px; background: #fcfcfd; }
.ift-cmp__addbox { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--cmp-ink2); font-size: 14px; }
.ift-cmp__plus { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #d1d5db; position: relative; flex: none; background: #fff; }
.ift-cmp__plus::before, .ift-cmp__plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--cmp-ink2); border-radius: 1px; }
.ift-cmp__plus::after { transform: rotate(90deg); }
.ift-cmp__search { position: relative; }
.ift-cmp__input { width: 100%; height: 38px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 12px; font-size: 14px; background: #fff; color: var(--cmp-ink); }
.ift-cmp__input:focus { outline: none; border-color: var(--cmp-ink); box-shadow: 0 0 0 3px rgba(17, 24, 39, .08); }
.ift-cmp__results { position: absolute; left: 0; top: 42px; width: max(100%, 300px); background: #fff; border: 1px solid var(--cmp-line); border-radius: 10px; box-shadow: 0 10px 28px rgba(17, 24, 39, .14); z-index: 30; max-height: 340px; overflow: auto; padding: 4px; }
.ift-cmp__ritem { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.ift-cmp__ritem:hover, .ift-cmp__ritem.is-active { background: #f3f4f6; }
.ift-cmp__ritem.is-busy { opacity: .5; pointer-events: none; }
.ift-cmp__ritem img, .ift-cmp__rimg { width: 40px; height: 40px; object-fit: contain; flex: none; background: #fff; }
.ift-cmp__rtxt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ift-cmp__rname { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--cmp-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ift-cmp__rmeta { font-size: 12px; color: var(--cmp-mute); margin-top: 2px; }
.ift-cmp__radd { font-size: 12px; font-weight: 700; color: var(--cmp-ink); border: 1px solid #d1d5db; border-radius: 6px; padding: 3px 8px; flex: none; }
.ift-cmp__rmsg { padding: 10px; font-size: 13px; color: var(--cmp-mute); }
.ift-cmp__suggest { border-top: 1px solid var(--cmp-line); padding-top: 12px; }
.ift-cmp__suggesth { font-size: 12px; font-weight: 700; color: var(--cmp-mute); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.ift-cmp__sitem { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ift-cmp__sitem + .ift-cmp__sitem { border-top: 1px solid #f1f3f5; }
.ift-cmp__sitem img { width: 44px; height: 57px; object-fit: contain; flex: none; }
.ift-cmp__sbody { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ift-cmp__sname { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--cmp-ink) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ift-cmp__sprice { font-size: 13px; color: var(--cmp-ink2); margin-top: 2px; font-weight: 600; }
.ift-cmp__sadd { flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--cmp-ink); border-radius: 7px; background: #fff; color: var(--cmp-ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.ift-cmp__sadd:hover { background: var(--cmp-ink); color: #fff; }
.ift-cmp__sadd:disabled { opacity: .5; }

/* empty state */
.ift-cmp__empty { text-align: center; padding: 56px 16px 64px; color: var(--cmp-mute); max-width: 560px; margin: 0 auto; }
.ift-cmp__empty svg { color: #9ca3af; }
.ift-cmp__emptyh { font-size: 20px; font-weight: 700; color: var(--cmp-ink); margin: 14px 0 6px; }
.ift-cmp__emptyp { font-size: 15px; line-height: 1.55; margin: 0 0 20px; }
.ift-cmp__browse { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ift-cmp__browselink { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 8px; color: var(--cmp-ink) !important; font-weight: 600; font-size: 14px; text-decoration: none !important; }
.ift-cmp__browselink:hover { border-color: var(--cmp-ink); }

/* sticky product bar */
.ift-cmp-sticky { position: fixed; z-index: 980; height: 62px; background: #fff; border-bottom: 1px solid var(--cmp-line); box-shadow: 0 6px 14px rgba(17, 24, 39, .06); overflow: hidden; display: none; }
.ift-cmp-sticky.is-on { display: block; }
.ift-cmp-sticky__track { position: relative; height: 100%; will-change: transform; }
.ift-cmp-sticky__cell { position: absolute; top: 0; height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--cmp-ink) !important; text-decoration: none !important; box-sizing: border-box; }
.ift-cmp-sticky__corner { font-weight: 700; font-size: 14px; padding-left: 0; text-transform: capitalize; }
.ift-cmp-sticky__cell img { width: 42px; height: 42px; object-fit: contain; flex: none; }
.ift-cmp-sticky__txt { display: flex; flex-direction: column; min-width: 0; }
.ift-cmp-sticky__name { font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ift-cmp-sticky__price { font-size: 13px; font-weight: 700; margin-top: 1px; }

/* toast */
.ift-cmp-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--cmp-ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 1060; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.ift-cmp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- compare tray */

.ift-cmp-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: #fff; border-top: 1px solid var(--cmp-line); box-shadow: 0 -6px 18px rgba(17, 24, 39, .08); transform: translateY(105%); transition: transform .25s ease; visibility: hidden; }
.ift-cmp-tray.is-open { transform: none; visibility: visible; }
.ift-cmp-tray__inner { position: relative; max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 12px 20px; }
.ift-cmp-tray__head { width: 170px; flex: none; }
.ift-cmp-tray__title { font-size: 15px; font-weight: 700; color: var(--cmp-ink); line-height: 1.25; }
.ift-cmp-tray__meta { font-size: 13px; color: var(--cmp-mute); margin-top: 2px; }
.ift-cmp-tray__others { font-size: 12px; color: var(--cmp-mute); margin-top: 3px; }
.ift-cmp-tray__others:empty { display: none; }
.ift-cmp-tray__others button { border: 0; background: none; padding: 0; color: var(--cmp-ink); text-decoration: underline; font-size: 12px; cursor: pointer; }
.ift-cmp-tray__slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; flex: 1; min-width: 0; }
.ift-cmp-tray__slot { position: relative; display: flex; align-items: center; gap: 10px; height: 58px; padding: 6px 28px 6px 6px; border: 1px solid var(--cmp-line); border-radius: 10px; background: #fff; min-width: 0; }
.ift-cmp-tray__slot.is-new { animation: ift-cmp-in .9s ease; }
@keyframes ift-cmp-in { 0% { border-color: var(--cmp-accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); } 100% { border-color: var(--cmp-line); box-shadow: none; } }
.ift-cmp-tray__slot.is-empty { border-style: dashed; border-color: #d1d5db; justify-content: center; padding: 6px; color: #9ca3af; font-size: 13px; background: #fcfcfd; }
.ift-cmp-tray__thumb { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.ift-cmp-tray__thumb img { max-width: 44px; max-height: 44px; object-fit: contain; }
.ift-cmp-tray__name { font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--cmp-ink) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none !important; }
.ift-cmp-tray__rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--cmp-mute); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ift-cmp-tray__rm:hover { background: #f3f4f6; color: var(--cmp-ink); }
.ift-cmp-tray__cta { flex: none; width: 168px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.ift-cmp-tray__go { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 8px; background: var(--cmp-ink); color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none !important; }
.ift-cmp-tray__go:hover { background: #000; }
.ift-cmp-tray__go.is-single { background: #fff; color: var(--cmp-ink) !important; border: 1px solid var(--cmp-ink); }
.ift-cmp-tray__clear { border: 0; background: none; color: var(--cmp-mute); font-size: 12px; cursor: pointer; padding: 2px; }
.ift-cmp-tray__clear:hover { color: var(--cmp-ink); text-decoration: underline; }
.ift-cmp-tray__min { position: absolute; top: -29px; right: 20px; height: 29px; width: 44px; border: 1px solid var(--cmp-line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #fff; color: var(--cmp-ink2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ift-cmp-tray__msg { display: none; max-width: 1240px; margin: -4px auto 0; padding: 0 20px 10px; font-size: 13px; color: #b45309; font-weight: 600; }
.ift-cmp-tray.has-msg .ift-cmp-tray__msg { display: block; }
.ift-cmp-tab { position: fixed; right: 20px; bottom: 0; z-index: 1034; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 8px 8px 0 0; background: var(--cmp-ink); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 -2px 10px rgba(17, 24, 39, .15); }
body.has-cmp-tray { padding-bottom: var(--cmp-tray-h); }
body.ift-cmp-cart-open .ift-cmp-tray { transform: translateY(105%); visibility: hidden; }
body.ift-cmp-cart-open .ift-cmp-tab { display: none; }
body.has-cmp-tray #back-to-top, body.has-cmp-tray .back-to-top, body.has-cmp-tray #scroll-top { bottom: calc(var(--cmp-tray-h) + 44px) !important; }
body.has-cmp-tab #back-to-top, body.has-cmp-tab .back-to-top, body.has-cmp-tab #scroll-top { bottom: 52px !important; }

/* ---------------------------------------------------------------- tablet / mobile */

@media (max-width: 991.98px) {
  .ift-cmp-tray__head { width: 130px; }
  .ift-cmp-tray__slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ift-cmp-tray__name { display: none; }
  .ift-cmp-tray__slot { justify-content: center; padding: 6px 22px 6px 6px; }
}

@media (max-width: 767.98px) {
  :root { --cmp-tray-h: 70px; }
  .ift-cmp { margin-top: 0; }
  .ift-cmp__head { align-items: flex-start; padding-bottom: 12px; }
  .ift-cmp__title { font-size: 23px; }
  .ift-cmp__sub { font-size: 13px; }
  .ift-cmp__actions { width: 100%; }
  .ift-cmp__act { height: 34px; padding: 0 11px; }
  .ift-cmp__toolbar { gap: 14px; font-size: 13px; }
  .ift-cmp__legend { margin-left: 0; width: 100%; }

  /* stacked layout: label on its own line, values side by side; swipe sideways for more products */
  .ift-cmp__scroller { container-type: inline-size; scroll-snap-type: x proximity; }
  .ift-cmp__table { display: grid; grid-template-columns: repeat(var(--cmp-cols, 2), calc((100vw - 38px) / 2)); grid-template-columns: repeat(var(--cmp-cols, 2), calc((100cqw - 30px) / 2)); width: max-content; min-width: 0; column-gap: 12px; }
  .ift-cmp__table caption, .ift-cmp__table colgroup, .ift-cmp__corner { display: none; }
  .ift-cmp__table thead, .ift-cmp__table tbody, .ift-cmp__table tr { display: contents; }
  .ift-cmp__group.is-collapsed .ift-cmp__row { display: none; }
  .ift-cmp__pcell { padding: 0 0 14px; scroll-snap-align: start; height: auto; }
  .ift-cmp__ghead th { grid-column: 1 / -1; padding-top: 18px; }
  .ift-cmp__gtoggle { position: sticky; left: 0; width: calc(100vw - 8px); width: 100cqw; }
  .ift-cmp__label { grid-column: 1 / -1; justify-self: start; position: sticky; left: 0; width: calc(100vw - 8px); width: 100cqw; padding: 10px 0 2px; border-bottom: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: transparent !important; }
  .ift-cmp__cell { padding: 2px 0 10px; font-size: 14px; background: transparent !important; }
  .ift-cmp__group[data-group="glance"] .ift-cmp__cell { font-size: 14px; padding: 2px 0 10px; }
  .ift-cmp__group[data-group="glance"] .ift-cmp__label { padding-top: 12px; }
  .ift-cmp__table.only-diff .ift-cmp__row.is-same { display: none; }
  .ift-cmp-p { padding: 10px; }
  .ift-cmp-p__img { height: 112px; margin: 4px 0 8px; }
  .ift-cmp-p__img img { max-height: 112px; }
  .ift-cmp-p__name { font-size: 13px; }
  .ift-cmp-p__now { font-size: 18px; }
  .ift-cmp-p__cart { font-size: 13px; min-height: 38px; }
  .ift-cmp-p__wins { font-size: 12px; }
  .ift-cmp__results { width: calc(100vw - 40px); max-width: 360px; }
  .ift-cmp-sticky { height: 54px; }
  .ift-cmp-sticky__cell img { width: 34px; height: 34px; }
  .ift-cmp-sticky__corner { display: none !important; }

  .ift-cmp-tray__inner { gap: 10px; padding: 9px 12px; }
  .ift-cmp-tray__head { display: none; }
  .ift-cmp-tray__slots { grid-template-columns: repeat(4, 48px); gap: 6px; flex: 1; }
  .ift-cmp-tray__slot { height: 50px; padding: 3px; border-radius: 8px; }
  .ift-cmp-tray__slot.is-empty span { display: none; }
  .ift-cmp-tray__thumb, .ift-cmp-tray__thumb img { width: 40px; height: 40px; max-width: 40px; max-height: 40px; }
  .ift-cmp-tray__rm { top: -7px; right: -7px; width: 20px; height: 20px; background: #fff; border: 1px solid var(--cmp-line); }
  .ift-cmp-tray__cta { width: auto; flex-direction: row; align-items: center; }
  .ift-cmp-tray__go { height: 40px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
  .ift-cmp-tray__clear { display: none; }
  .ift-cmp-tray__min { right: 12px; }
  .ift-cmp-tray__msg { padding: 0 12px 8px; margin-top: 0; }
  .ift-cmp-tab { right: 12px; }
}

/* ---------------------------------------------------------------- print */

@media print {
  #header, #footer, .breadcrumb, #wrapper > .container > nav, .ift-cmp__actions, .ift-cmp__toolbar, .ift-cmp__tabs,
  .ift-cmp__slot, .ift-cmp__cell--slot, .ift-cmp-tray, .ift-cmp-tab, .ift-cmp-sticky, .ift-cmp-toast,
  .ift-cmp-p__remove, .ift-cmp-p__buy, .ift-cmp__more, .ift-cmp__chev, .ift-cmp__gcount, #left-column, #right-column { display: none !important; }
  body.has-cmp-tray { padding-bottom: 0; }
  .ift-cmp__printmeta { display: block; font-size: 11px; color: #555; margin: 0 0 10px; }
  .ift-cmp__sub { display: none; }
  .ift-cmp__scroller { overflow: visible !important; }
  .ift-cmp__table { min-width: 0 !important; font-size: 11px; }
  .ift-cmp__label, .ift-cmp__cell { font-size: 11px !important; padding: 5px 6px !important; color: #111 !important; }
  .ift-cmp__group.is-collapsed .ift-cmp__row { display: table-row !important; }
  .ift-cmp__val.is-long { max-height: none !important; }
  .ift-cmp-p { border: 0; padding: 0; }
  .ift-cmp-p__img { height: 90px; }
  .ift-cmp-p__img img { max-height: 90px; }
  .ift-cmp__ghead th { padding-top: 10px; }
  tr { break-inside: avoid; }
}
