/* Keep the full link text in the DOM; only the visible card title is shortened. */
.product-thumb .product-name {
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
}

.product-thumb .product-name a,
body.product-search #content .product-thumb .product-name a,
body.common-home .cs-home-product-name,
body .product-slider .product-thumb .product-name a,
body .container-modules .product-thumb .product-name a,
.set-card-compact .set-name {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2;
  max-height: 2lh !important;
  overflow: hidden !important;
  overflow-wrap: anywhere;
  white-space: normal;
}

.sme-sticky-buy {
  display: none;
}

@media (max-width: 359px) {
  .set-card-compact .total-info { flex: 1 1 84px; min-width: 0; }
}

@media (max-width: 1023px) {
  /* The desktop switcher is a child of the mobile filter/sort grid on search. */
  body.product-search #content .view-box .product_list_toolbar {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .sets-owl .set-card-compact {
    margin: 8px 4px 4px !important;
    border: 1px solid #e2e7e4 !important;
    border-radius: 12px;
    background: #fff !important;
    transform: none;
  }

  .set-card-compact .set-header { padding: 12px 12px 5px; }
  .set-card-compact .set-title { font-size: 16px; line-height: 1.3; letter-spacing: 0; }
  .set-card-compact .set-timer { font-size: 13px; }
  .set-card-compact .set-items-list { display: grid; gap: 3px; padding: 6px 10px 10px; }
  .set-card-compact .set-item {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    gap: 9px;
    padding: 5px 7px;
    border: 1px solid #edf0ee;
    border-radius: 8px;
    text-align: left;
  }
  .set-card-compact .set-img-wrap {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 1px;
  }
  .set-card-compact .set-img-wrap > a { display: flex; height: 100%; align-items: center; }
  .set-card-compact .set-img-wrap img { width: 50px; height: 50px; }
  .set-card-compact .set-info-wrap { flex: 1 1 auto; min-width: 0; }
  .set-card-compact .set-name { margin-bottom: 3px; font-size: 14px; line-height: 1.35; }
  .set-card-compact .set-price { font-size: 15px; line-height: 1.25; }
  .set-card-compact .set-price .old { font-size: 13px; }
  .set-card-compact .set-label-qty { font-size: 11px; }
  .set-card-compact .set-label-discount { display: none; }
  .set-card-compact .set-plus {
    margin: 0;
    color: #007a35;
    font-size: 18px;
    line-height: 18px;
    text-align: center;
  }
  .set-card-compact .set-footer-total {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 9px 10px;
    background: #f1f8f3;
    border-radius: 0 0 11px 11px;
  }
  .set-card-compact .total-info { text-align: left; }
  .set-card-compact .total-economy { padding: 0; color: #166534; background: none; font-size: 13px; }
  .set-card-compact .total-price { font-size: 21px; }
  .set-card-compact .total-actions { gap: 6px; }
  .set-card-compact .qty-wrapper input { font-size: 16px; }
  .set-card-compact .add-set-btn { min-height: 40px; height: auto; padding: 6px 10px; font-size: 16px; }
  .sets-owl .owl-buttons { display: flex; justify-content: center; gap: 8px; padding: 4px 0; }
  .sets-owl .owl-buttons div {
    position: static !important;
    width: 32px !important;
    height: 32px !important;
    transform: none !important;
    border: 1px solid #e2e7e4 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  body[class*="product-product"] #modal-wishlist .modal-dialog {
    max-width: calc(100vw - 20px);
  }

  .sme-sticky-buy:not([hidden]) {
    position: fixed;
    z-index: 1035;
    bottom: calc(var(--sme-sticky-buy-bottom, 0px) + max(8px, env(safe-area-inset-bottom, 0px)));
    left: calc(var(--sme-sticky-buy-left, 0px) + 16px);
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(var(--sme-sticky-buy-width, 100%) - 32px);
    box-sizing: border-box;
    padding: 4px 6px 4px 12px;
    border: 1px solid #e2e7e4;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 -3px 14px rgba(23, 25, 28, .14);
  }

  .sme-sticky-buy__price {
    flex: 1 1 auto;
    color: #17191c;
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .sme-sticky-buy__button {
    flex: 0 1 152px;
    min-width: 0;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid #007a35;
    border-radius: 8px;
    background: #007a35;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
  }

  .sme-sticky-buy__favorite:not([hidden]) {
    position: relative;
    display: grid;
    flex: 0 0 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid #dce3de;
    border-radius: 8px;
    background: #fff;
    color: #25352c;
  }

  .sme-sticky-buy__favorite[aria-pressed="true"] {
    color: #007a35;
  }

  .sme-sticky-buy__favorite[aria-pressed="true"] svg {
    fill: currentColor;
  }

  .sme-sticky-buy__count:not([hidden]) {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    padding: 0 3px;
    border: 1px solid #fff;
    border-radius: 9px;
    background: #007a35;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
  }

  .sme-sticky-buy__button:focus-visible,
  .sme-sticky-buy__favorite:focus-visible {
    outline: 2px solid #005627;
    outline-offset: 2px;
  }

  .sme-sticky-buy__button:disabled {
    opacity: .65;
  }

  body.sme-sticky-buy-visible #back-top {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
