.lscp-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 0 28px;
}

.lscp-head {
  text-align: center;
  margin-bottom: 20px;
}

.lscp-title {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.1;
}

.lscp-subtitle {
  margin: 0;
  opacity: .78;
}

.lscp-pickers-wrap {
  margin-bottom: 0;
}

.lscp-screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lscp-pickers {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
  padding: 2px 0 4px;
  align-items: stretch;
}

.lscp-picker,
.lscp-table-wrap,
.lscp-add-slot {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}

.lscp-picker,
.lscp-table-wrap {
  background: #fff;
}

.lscp-picker {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 8px;
  min-height: 0;
}

.lscp-picker.is-hidden {
  display: none;
}

.lscp-add-slot[hidden] {
  display: none !important;
}

.lscp-picker-top {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  transform: translateY(-50%);
}

.lscp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .07);
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.lscp-collapse-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .07);
  color: #0f172a;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.lscp-input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(15, 23, 42, .10);
  padding: 0 42px 0 12px;
  font-size: 14px;
  line-height: 44px;
  background: #fff;
}

.lscp-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, .55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.lscp-results {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% + 6px);
  z-index: 30;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}

.lscp-result,
.lscp-result-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
}

.lscp-result {
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.lscp-result:hover {
  background: rgba(15, 23, 42, .04);
}

.lscp-result img,
.lscp-chip img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
}

.lscp-selected {
  margin-top: 6px;
}

.lscp-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .06);
}

.lscp-chip span {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lscp-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.lscp-add-slot {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #0f172a;
  cursor: pointer;
}

.lscp-add-plus {
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
}

.lscp-add-text {
  font-weight: 700;
  font-size: 14px;
}

.lscp-picker.is-filled .lscp-input {
  display: none;
}

.lscp-picker.is-filled .lscp-selected {
  margin-top: 0;
}

.lscp-picker.is-filled {
  background: #fff;
}

.lscp-picker.is-filled .lscp-chip {
  margin-top: 0;
}


.lscp-table-wrap {
  overflow: hidden;
}

.lscp-empty-state {
  padding: 26px 18px;
  text-align: center;
  opacity: .72;
}

.lscp-compare-table {
  width: 100%;
}

.lscp-desktop-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lscp-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.lscp-table-cols-1 .lscp-attribute-head { width: 22%; }
.lscp-table-cols-1 .lscp-product-head { width: 78%; }
.lscp-table-cols-2 .lscp-attribute-head { width: 20%; }
.lscp-table-cols-2 .lscp-product-head { width: 40%; }
.lscp-table-cols-3 .lscp-attribute-head { width: 16%; }
.lscp-table-cols-3 .lscp-product-head { width: 28%; }
.lscp-table-cols-4 .lscp-attribute-head { width: 14%; }
.lscp-table-cols-4 .lscp-product-head { width: 21.5%; }

.lscp-table thead th,
.lscp-table tbody th,
.lscp-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  vertical-align: top;
  background: #fff;
  word-break: break-word;
}

.lscp-table tbody th {
  font-weight: 800;
  text-align: left;
  background: transparent;
}

.lscp-sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: transparent;
  backdrop-filter: none;
}

.lscp-table thead .lscp-sticky-col {
  z-index: 3;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.lscp-product-card {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.lscp-thumb-link,
.lscp-mobile-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 130px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(15, 23, 42, .06);
}

.lscp-thumb-link img,
.lscp-mobile-thumb img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.lscp-product-title,
.lscp-mobile-title {
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.lscp-mobile-cards {
  display: none;
}

@media (max-width: 1100px) {
  .lscp-pickers {
    gap: 8px;
  }

  .lscp-chip span {
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .lscp-wrap {
    padding-top: 8px;
  }

  .lscp-head {
    margin-bottom: 16px;
  }

  .lscp-title {
    font-size: 1.7rem;
  }

  .lscp-subtitle {
    font-size: 14px;
  }

  .lscp-pickers {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: unset;
    gap: 10px;
    width: 100%;
    justify-content: stretch;
    margin-bottom: 14px;
    padding: 0;
    overflow: visible;
  }

  .lscp-picker,
  .lscp-add-slot {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 10px;
    border-radius: 14px;
  }


  .lscp-results {
    left: 0;
    right: 0;
    top: calc(100% + 6px);
  }

  .lscp-desktop-table,
  .lscp-compare-shell.lscp-is-mobile .lscp-desktop-table {
    display: block !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lscp-mobile-cards,
  .lscp-compare-shell.lscp-is-mobile .lscp-mobile-cards {
    display: none !important;
  }

  .lscp-table {
    width: max-content;
    min-width: 100%;
  }

  .lscp-table thead th,
  .lscp-table tbody th,
  .lscp-table td {
    padding: 12px 12px;
    font-size: 14px;
  }

  .lscp-sticky-col,
  .lscp-attribute-head {
    min-width: 132px;
  }

  .lscp-product-head {
    min-width: 220px;
  }

  .lscp-thumb-link {
    min-height: 100px;
    padding: 10px;
  }

  .lscp-thumb-link img {
    max-height: 92px;
  }

  .lscp-product-title {
    font-size: 14px;
    line-height: 1.35;
  }
}


/* v1.1.4 mobile compare refinements */
@media (max-width: 767px) {
  .lscp-table {
    table-layout: fixed;
  }

  .lscp-table thead th,
  .lscp-table tbody th,
  .lscp-table td {
    padding: 10px 10px;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .lscp-sticky-col,
  .lscp-attribute-head {
    min-width: var(--lscp-mobile-attr-width, 110px);
    width: var(--lscp-mobile-attr-width, 110px);
    max-width: var(--lscp-mobile-attr-width, 110px);
    background: transparent !important;
    backdrop-filter: none !important;
  }

  .lscp-product-head,
  .lscp-table td {
    min-width: var(--lscp-mobile-product-width, 126px);
    width: var(--lscp-mobile-product-width, 126px);
    max-width: var(--lscp-mobile-product-width, 126px);
  }

  .lscp-thumb-link {
    min-height: 88px;
    padding: 8px;
  }

  .lscp-thumb-link img {
    max-height: 78px;
  }

  .lscp-product-title {
    font-size: 13px;
    line-height: 1.3;
  }

  .lscp-results {
    left: 0;
    right: 0;
    width: 100%;
    top: calc(100% + 4px);
  }
}


/* v1.1.6 mobile auto label width */
@media (max-width: 767px) {
  .lscp-table tbody tr {
    vertical-align: top;
  }

  .lscp-table tbody th.lscp-sticky-col {
    padding-top: 10px;
    line-height: 1.25;
  }

  .lscp-table tbody td {
    vertical-align: top;
  }

  .lscp-table tbody td .lscp-cell-value {
    display: block;
    margin-top: 16px;
    line-height: 1.35;
  }

  .lscp-product-head,
  .lscp-table td {
    min-width: var(--lscp-mobile-product-width, 126px);
    width: var(--lscp-mobile-product-width, 126px);
    max-width: var(--lscp-mobile-product-width, 126px);
  }
}


/* v1.3.2 compact compare trigger */
.lscp-compare-trigger{
  position:absolute;top:10px;left:10px;z-index:7;display:inline-flex;align-items:center;gap:5px;padding:6px 10px;border-radius:999px;border:1px solid rgba(211,220,232,.98);background:rgba(255,255,255,.96);backdrop-filter:blur(4px);color:#1f3f6d;font-size:11px;font-weight:700;line-height:1;cursor:pointer;box-shadow:0 6px 14px rgba(15,23,42,.08);transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
}
.lscp-compare-trigger:hover{transform:translateY(-1px);border-color:#c9d6e6;background:#fff;box-shadow:0 10px 20px rgba(15,23,42,.12)}
.lscp-compare-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(36,99,235,.16),0 10px 20px rgba(15,23,42,.12)}
.lscp-compare-trigger.is-added{background:#2463eb;border-color:#2463eb;color:#fff}
.lscp-compare-trigger-icon{font-size:12px;line-height:1}
.lscp-compare-trigger-text{letter-spacing:.01em}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product{position:relative}
.woocommerce ul.products li.product .lscp-compare-trigger,
.woocommerce-page ul.products li.product .lscp-compare-trigger{margin:0}
.mpf-item-media .lscp-compare-trigger,
.instk-products li.product .lscp-compare-trigger{top:10px;left:10px}

.lscp-floating-tray{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);width:auto;max-width:min(760px,calc(100vw - 18px));z-index:99999;background:#f7f8fc;border:1px solid #dbe1ea;border-radius:999px;box-shadow:0 18px 36px rgba(15,23,42,.14);padding:10px 14px 10px 14px}
.lscp-floating-inner{display:flex;align-items:center;gap:10px;width:max-content;max-width:100%}
.lscp-floating-items{display:flex;align-items:stretch;gap:8px;flex:0 1 auto;min-width:0;overflow:auto;padding-right:2px}
.lscp-floating-item{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;min-width:88px;max-width:96px;background:#eef1f7;border:1px solid #dde4ee;border-radius:18px;padding:7px 7px 6px;text-align:center;flex:0 0 auto}
.lscp-floating-thumb-wrap{height:32px;display:flex;align-items:center;justify-content:center}
.lscp-floating-thumb-wrap img{max-width:100%;max-height:32px;object-fit:contain;display:block}
.lscp-floating-title{font-size:10.5px;line-height:1.15;color:#1e293b;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lscp-floating-item-remove,.lscp-floating-close{border:0;cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center}
.lscp-floating-item-remove{position:absolute;top:4px;right:4px;width:18px;height:18px;border-radius:999px;background:rgba(255,255,255,.92);color:#5b6777;font-size:13px;line-height:1;box-shadow:0 1px 2px rgba(15,23,42,.08)}
.lscp-floating-close{position:absolute;top:8px;right:8px;left:auto;width:26px;height:26px;border-radius:999px;background:#fff;color:#475569;font-size:16px;line-height:1;box-shadow:0 4px 12px rgba(15,23,42,.10);z-index:2}
.lscp-floating-go{flex:0 0 auto;border:1px solid #111827;background:#fff;color:#111827;border-radius:999px;padding:10px 18px;font-size:14px;font-weight:700;cursor:pointer;transition:transform .14s ease, box-shadow .14s ease;white-space:nowrap}
.lscp-floating-go:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,23,42,.1)}
.lscp-floating-go:disabled{opacity:.5;cursor:not-allowed}
body.admin-bar .lscp-floating-tray{bottom:18px}


@media (max-width: 782px){
  .lscp-compare-trigger{top:8px;left:8px;padding:6px 9px;font-size:10px}
  .lscp-floating-tray{bottom:10px;border-radius:24px;padding:12px 12px 10px;max-width:calc(100vw - 16px)}
  .lscp-floating-inner{flex-direction:column;align-items:stretch;gap:10px;width:100%}
  .lscp-floating-items{width:100%;overflow-x:auto;padding-top:4px;justify-content:flex-start}
  .lscp-floating-item{min-width:92px;max-width:92px;border-radius:16px}
  .lscp-floating-go{width:100%;padding:11px 14px}
  .lscp-floating-close{top:8px;right:8px;left:auto}
}


/* v1.3.3 desktop hover-only compare trigger */
@media (min-width: 783px){
  .woocommerce ul.products li.product .lscp-compare-trigger,
  .woocommerce-page ul.products li.product .lscp-compare-trigger,
  .instk-products li.product .lscp-compare-trigger,
  .mpf-item .lscp-compare-trigger{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(-4px);
  }

  .woocommerce ul.products li.product:hover .lscp-compare-trigger,
  .woocommerce ul.products li.product:focus-within .lscp-compare-trigger,
  .woocommerce-page ul.products li.product:hover .lscp-compare-trigger,
  .woocommerce-page ul.products li.product:focus-within .lscp-compare-trigger,
  .instk-products li.product:hover .lscp-compare-trigger,
  .instk-products li.product:focus-within .lscp-compare-trigger,
  .mpf-item:hover .lscp-compare-trigger,
  .mpf-item:focus-within .lscp-compare-trigger{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0);
  }

  .woocommerce ul.products li.product:hover .lscp-compare-trigger.is-added,
  .woocommerce ul.products li.product:focus-within .lscp-compare-trigger.is-added,
  .woocommerce-page ul.products li.product:hover .lscp-compare-trigger.is-added,
  .woocommerce-page ul.products li.product:focus-within .lscp-compare-trigger.is-added,
  .instk-products li.product:hover .lscp-compare-trigger.is-added,
  .instk-products li.product:focus-within .lscp-compare-trigger.is-added,
  .mpf-item:hover .lscp-compare-trigger.is-added,
  .mpf-item:focus-within .lscp-compare-trigger.is-added{
    opacity:1;
    visibility:visible;
  }
}

/* v1.3.12 comparison summary rows and best-value highlights */
.lscp-comparison-summary {
  margin: -2px 0 18px;
  border: 1px solid rgba(22, 163, 74, .18);
  border-radius: 14px;
  background: #f0fdf4;
  color: #14532d;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.lscp-comparison-summary[hidden] {
  display: none !important;
}

.lscp-summary-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.5;
}

.lscp-summary-title {
  flex: 0 0 auto;
  color: #166534;
}

.lscp-summary-rows {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lscp-summary-row {
  display: block;
}

.lscp-table td.lscp-best-cell {
  background: #ecfdf3;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .12);
}

.lscp-table td.lscp-best-cell .lscp-cell-value {
  color: #14532d;
  font-weight: 700;
}

.lscp-mobile-row.lscp-best-cell {
  background: #ecfdf3;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .12);
}

.lscp-mobile-row.lscp-best-cell .lscp-mobile-value {
  color: #14532d;
  font-weight: 700;
}

@media (max-width: 767px) {
  .lscp-comparison-summary {
    margin-bottom: 14px;
  }

  .lscp-summary-inner {
    display: block;
    padding: 12px 13px;
    font-size: 13px;
  }

  .lscp-summary-title {
    display: block;
    margin-bottom: 3px;
  }
}
