/* ============================================================
   KrisAuto – compare.css  v2.0
   Product comparison: card buttons, floating tray, dark overlay
   ============================================================ */

/* ── Dark overlay palette ── */
.kc-overlay {
  --kc-bg:          #0c0c10;
  --kc-surface:     #141418;
  --kc-surface-2:   #1c1c22;
  --kc-border:      #26262c;
  --kc-text:        #e8e8ec;
  --kc-text-2:      #70708a;
  --kc-accent:      #dc2626;
  --kc-accent-soft: rgba(220, 38, 38, .08);
  --kc-radius:      12px;
}


/* ═══════════════════════════════════════════════
   1. COMPARE BUTTON – PRODUCT CARDS
   ═══════════════════════════════════════════════ */

.products .product { position: relative; }

.kc-compare-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid var(--border, #e2e2e0);
  border-radius: 50%;
  color: var(--text-2, #5a5a5a);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transform: scale(.8);
  transition: all .2s cubic-bezier(.22,1,.36,1);
}

/* show on card hover or when active */
.product:hover .kc-compare-btn,
.kc-compare-btn.is-active {
  opacity: 1;
  transform: scale(1);
}

.kc-compare-btn:hover,
.kc-compare-btn.is-active {
  background: var(--red, #dc2626);
  border-color: var(--red, #dc2626);
  color: #fff;
}

/* ── Single-product page variant ── */
.kc-compare-btn--single {
  position: static;
  width: auto;
  height: auto;
  opacity: 1;
  transform: none;
  border-radius: var(--radius, 8px);
  padding: 10px 20px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  background: transparent;
  border: 1.5px solid var(--border, #e2e2e0);
  color: var(--text-2, #5a5a5a);
  margin-top: 8px;
}

.kc-compare-btn--single:hover,
.kc-compare-btn--single.is-active {
  background: var(--red, #dc2626);
  border-color: var(--red, #dc2626);
  color: #fff;
}


/* ═══════════════════════════════════════════════
   2. FLOATING COMPARE TRAY
   ═══════════════════════════════════════════════ */

.kc-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}

.kc-tray.is-visible {
  transform: translateY(0);
  pointer-events: all;
}

.kc-tray__inner {
  max-width: var(--max-w, 1240px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px var(--gap, 24px);
  background: #111114;
  border-top: 2px solid var(--red, #dc2626);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.3);
}

/* ── Tray items ── */
.kc-tray__items {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.kc-tray__items::-webkit-scrollbar { display: none; }

.kc-tray__item {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: visible;
  background: #1a1a1e;
  border: 1.5px solid rgba(255,255,255,.08);
  animation: kc-pop .35s cubic-bezier(.22,1,.36,1);
}

@keyframes kc-pop {
  from { opacity: 0; transform: scale(.55) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1)   rotate(0); }
}

.kc-tray__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  border-radius: 9px;
}

.kc-tray__item-x {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red, #dc2626);
  border: 2px solid #111114;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  padding: 0;
}

.kc-tray__item:hover .kc-tray__item-x { opacity: 1; }

/* ── Tray actions ── */
.kc-tray__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.kc-tray__open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--red, #dc2626);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

.kc-tray__open:hover {
  background: var(--red-h, #b91c1c);
  transform: translateY(-1px);
}

.kc-tray__open b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: rgba(255,255,255,.2);
  border-radius: 6px;
  font-size: .72rem;
  padding: 0 6px;
}

.kc-tray__clear {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.kc-tray__clear:hover {
  border-color: var(--red, #dc2626);
  color: var(--red, #dc2626);
}


/* ═══════════════════════════════════════════════
   3. OVERLAY – FULL-SCREEN DARK COMPARISON
   ═══════════════════════════════════════════════ */

.kc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.kc-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Backdrop ── */
.kc-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ── Shell ── */
.kc-overlay__shell {
  position: relative;
  width: 96%;
  max-width: 1200px;
  max-height: 92vh;
  margin-top: 4vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(220,38,38,.05) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 100%, rgba(220,38,38,.03) 0%, transparent 60%),
    var(--kc-bg);
  border: 1px solid var(--kc-border);
  border-radius: 20px;
  overflow: hidden;
  transform: translateY(24px) scale(.97);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
  box-shadow:
    0 24px 80px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(255,255,255,.03);
}

.kc-overlay.is-open .kc-overlay__shell {
  transform: translateY(0) scale(1);
}

/* ── Header bar ── */
.kc-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--kc-border);
  background: var(--kc-surface);
  flex-shrink: 0;
}

.kc-overlay__head h2 {
  font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--kc-text);
  margin: 0;
}

.kc-overlay__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--kc-border);
  border-radius: 10px;
  background: transparent;
  color: var(--kc-text-2);
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.kc-overlay__close:hover {
  border-color: var(--kc-accent);
  color: var(--kc-accent);
  background: var(--kc-accent-soft);
}

/* ── Scrollable body ── */
.kc-overlay__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a30 transparent;
}

.kc-overlay__body::-webkit-scrollbar { width: 6px; }
.kc-overlay__body::-webkit-scrollbar-track { background: transparent; }
.kc-overlay__body::-webkit-scrollbar-thumb {
  background: #2a2a30;
  border-radius: 3px;
}

/* ── Loader ── */
.kc-overlay__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 20px;
  color: var(--kc-text-2);
  font-size: .9rem;
}

.kc-spin {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--kc-border);
  border-top-color: var(--kc-accent);
  border-radius: 50%;
  animation: kc-rotate .7s linear infinite;
}

@keyframes kc-rotate { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════
   4. COMPARISON GRID – PRODUCT CARDS
   ═══════════════════════════════════════════════ */

.kc-products {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.kc-product {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px 18px;
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius);
  text-align: center;
  min-width: 0;
  overflow: hidden;
  animation: kc-card-in .5s cubic-bezier(.22,1,.36,1) both;
}

.kc-product:nth-child(1) { animation-delay: .0s; }
.kc-product:nth-child(2) { animation-delay: .07s; }
.kc-product:nth-child(3) { animation-delay: .14s; }
.kc-product:nth-child(4) { animation-delay: .21s; }

@keyframes kc-card-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Remove button */
.kc-product__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--kc-border);
  border-radius: 7px;
  background: transparent;
  color: var(--kc-text-2);
  font-size: 15px;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.kc-product__remove:hover {
  border-color: var(--kc-accent);
  color: var(--kc-accent);
  background: var(--kc-accent-soft);
}

/* Image — fluid, scales with column width */
.kc-product__img {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kc-product__img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 8px;
}

/* Title */
.kc-product__title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--kc-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 8px;
  max-width: 100%;
}

.kc-product__title:hover { color: var(--kc-accent); }

/* Best price badge */
.kc-product__best {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--kc-accent-soft);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--kc-accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

/* Price */
.kc-product__price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--kc-text);
  margin-bottom: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kc-product__price del {
  font-size: .82rem;
  font-weight: 400;
  color: var(--kc-text-2);
  margin-right: 6px;
}

.kc-product__price ins {
  text-decoration: none;
  color: var(--kc-accent);
}

/* Price bar */
.kc-product__bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--kc-border);
  margin-bottom: 14px;
  overflow: hidden;
}

.kc-product__bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--kc-accent);
  transition: width .7s cubic-bezier(.22,1,.36,1);
}

/* Add-to-cart */
.kc-product__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px;
  background: var(--kc-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-product__cart:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #fff;
}

.kc-product__cart--off {
  background: var(--kc-surface-2);
  color: var(--kc-text-2);
  pointer-events: none;
}


/* ═══════════════════════════════════════════════
   5. SPECS TABLE
   ═══════════════════════════════════════════════ */

/* Section heading */
.kc-specs-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--kc-text-2);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
}

.kc-specs-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--kc-border);
}

/* Table container */
.kc-specs {
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius);
  overflow: hidden;
}

/* Spec row */
.kc-spec {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 48px;
  border-bottom: 1px solid var(--kc-border);
  transition: background .15s;
}

.kc-spec:last-child { border-bottom: none; }

.kc-spec:nth-child(even) { background: var(--kc-surface); }

.kc-spec:hover { background: rgba(220,38,38,.03); }

/* Label cell */
.kc-spec__label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--kc-text-2);
  border-right: 1px solid var(--kc-border);
  background: var(--kc-surface);
}

/* Values grid */
.kc-spec__values {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  min-width: 0;
}

.kc-spec__val {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-size: .84rem;
  color: var(--kc-text);
  line-height: 1.45;
  border-right: 1px solid var(--kc-border);
  word-break: break-word;
  min-width: 0;
  overflow: hidden;
}

.kc-spec__val:last-child { border-right: none; }

/* Highlight differing values */
.kc-spec--diff .kc-spec__val {
  border-left: 3px solid var(--kc-accent);
  padding-left: 13px;
}

/* Stock indicator */
.kc-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: .82rem;
}

.kc-stock--yes { color: #22c55e; }
.kc-stock--no  { color: #ef4444; }

.kc-stock__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Vehicle tag */
.kc-vehicle-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--kc-accent-soft);
  border: 1px solid rgba(220,38,38,.15);
  border-radius: 5px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--kc-accent);
  line-height: 1.4;
  max-width: 100%;
  word-break: break-word;
}


/* ═══════════════════════════════════════════════
   6. TOAST NOTIFICATION
   ═══════════════════════════════════════════════ */

.kc-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 10001;
  padding: 10px 22px;
  background: #111114;
  color: #e8e8ec;
  border: 1px solid #2a2a30;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  opacity: 0;
  transition: all .3s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
  white-space: nowrap;
}

.kc-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ═══════════════════════════════════════════════
   7. MOBILE COMPARISON TABLE
   Real <table> with sticky <th> — no CSS Grid,
   no scroll-snap, no scroll bugs.
   ═══════════════════════════════════════════════ */

/* Scroll wrapper */
.kc-m-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius);
  scrollbar-width: none;
}

.kc-m-scroll::-webkit-scrollbar { display: none; }

/* Table */
.kc-m-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
}

/* ── Sticky label column ── */
.kc-m-table th.kc-m-th,
.kc-m-table th.kc-m-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  padding: 10px 10px;
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--kc-text-2);
  background: var(--kc-bg);
  border-right: 1px solid var(--kc-border);
  border-bottom: 1px solid var(--kc-border);
  text-align: left;
  vertical-align: middle;
}

/* Gradient edge on sticky cells instead of box-shadow (avoids repaint) */
.kc-m-th::after,
.kc-m-corner::after {
  content: '';
  position: absolute;
  top: 0;
  right: -6px;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to right, rgba(0,0,0,.2), transparent);
  pointer-events: none;
}

/* Corner cell (top-left, empty) */
.kc-m-corner {
  border-bottom: 2px solid var(--kc-accent);
  vertical-align: bottom;
}

/* ── Product header cells ── */
.kc-m-pth {
  padding: 14px 12px;
  border-right: 1px solid var(--kc-border);
  border-bottom: 2px solid var(--kc-accent);
  background: var(--kc-bg);
  vertical-align: top;
  text-align: center;
  position: relative;
  font-weight: normal;
}

.kc-m-pth:last-child { border-right: none; }

/* Remove button */
.kc-m-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--kc-border);
  border-radius: 6px;
  background: var(--kc-bg);
  color: var(--kc-text-2);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  transition: all .15s;
}

.kc-m-remove:active {
  border-color: var(--kc-accent);
  color: var(--kc-accent);
}

/* Product image */
.kc-m-pimg {
  width: 68px;
  height: 68px;
  margin: 0 auto 6px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kc-m-pimg img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* Product name */
.kc-m-pname {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .76rem;
  font-weight: 600;
  color: var(--kc-text);
  text-decoration: none;
  line-height: 1.3;
  margin-bottom: 4px;
}

.kc-m-pname:hover { color: var(--kc-accent); }

/* Best price badge */
.kc-m-best {
  display: inline-block;
  padding: 2px 8px;
  background: var(--kc-accent-soft);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: 20px;
  font-size: .58rem;
  font-weight: 700;
  color: var(--kc-accent);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 2px;
}

/* Price */
.kc-m-pprice {
  font-size: .85rem;
  font-weight: 700;
  color: var(--kc-text);
  margin-bottom: 4px;
}

.kc-m-pprice del {
  font-size: .7rem;
  font-weight: 400;
  color: var(--kc-text-2);
  margin-right: 3px;
}

.kc-m-pprice ins {
  text-decoration: none;
  color: var(--kc-accent);
}

/* Price bar */
.kc-m-bar {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--kc-border);
  margin-bottom: 6px;
  overflow: hidden;
}

.kc-m-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--kc-accent);
  transition: width .7s cubic-bezier(.22,1,.36,1);
}

/* Buy button */
.kc-m-buy {
  display: block;
  width: 100%;
  padding: 8px;
  background: var(--kc-accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: .74rem;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}

.kc-m-buy:active { filter: brightness(.9); }

.kc-m-buy--off {
  background: var(--kc-surface-2);
  color: var(--kc-text-2);
  pointer-events: none;
}

/* ── Spec rows ── */
.kc-m-specrow:nth-child(even) td,
.kc-m-specrow:nth-child(even) th {
  background: var(--kc-surface);
}

.kc-m-td {
  padding: 10px 14px;
  border-right: 1px solid var(--kc-border);
  border-bottom: 1px solid var(--kc-border);
  color: var(--kc-text);
  font-size: .8rem;
  line-height: 1.45;
  vertical-align: middle;
  word-break: break-word;
  background: var(--kc-bg);
}

.kc-m-td:last-child { border-right: none; }

/* Diff highlight */
.kc-m-specrow--diff td.kc-m-td {
  border-left: 3px solid var(--kc-accent);
}


/* ═══════════════════════════════════════════════
   8. RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
  .kc-overlay__shell {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    margin-top: 0;
    border-radius: 0;
  }

  .kc-overlay__body { padding: 16px; }

  .kc-products {
    gap: 10px;
  }

  .kc-product {
    padding: 14px 10px 12px;
  }

  .kc-product__img {
    max-width: 100px;
  }

  .kc-product__title { font-size: .8rem; }

  .kc-product__price { font-size: .95rem; }

  .kc-product__cart { font-size: .78rem; padding: 8px 10px; }

  .kc-product__best { font-size: .62rem; padding: 2px 8px; }

  .kc-spec { grid-template-columns: 110px 1fr; }

  .kc-spec__label {
    font-size: .66rem;
    padding: 10px 10px;
  }

  .kc-spec__val {
    font-size: .78rem;
    padding: 10px 10px;
  }
}

@media (max-width: 640px) {
  /* ── Bottom-sheet overlay ── */
  .kc-overlay {
    align-items: flex-end;
  }

  .kc-overlay__shell {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;
    margin-top: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -16px 60px rgba(0,0,0,.5);
  }

  .kc-overlay.is-open .kc-overlay__shell {
    transform: translateY(0);
  }

  /* Drag handle */
  .kc-overlay__head {
    padding: 22px 18px 14px;
    position: relative;
  }

  .kc-overlay__head::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,.18);
  }

  .kc-overlay__head h2 { font-size: 1rem; }

  .kc-overlay__close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .kc-overlay__body { padding: 12px; }

  /* ── Tray touch-friendly ── */
  .kc-tray__inner {
    padding: 10px 16px;
    gap: 12px;
    border-radius: 14px 14px 0 0;
  }

  .kc-tray__item {
    width: 44px;
    height: 44px;
  }

  .kc-tray__item-x { opacity: 1; }

  .kc-tray__open {
    padding: 10px 16px;
    font-size: .82rem;
  }

  .kc-tray__open span { display: none; }

  .kc-toast { bottom: 76px; font-size: .78rem; }

  /* ── Compare button always visible (no hover on touch) ── */
  .kc-compare-btn {
    opacity: 1;
    transform: scale(1);
    width: 32px;
    height: 32px;
  }
}
