/* Mobile catalog preview: two products per row without changing purchase rules. */
[data-product-catalog] .ws-product-card { position: relative; }

[data-product-catalog] .ws-product-card .ws-product-technologies {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: calc(100% - 16px);
  min-height: 22px;
  gap: 4px;
  margin: 0;
  padding: 4px 6px;
  border-radius: 999px;
  background: #fff;
  color: #112051;
  box-shadow: 0 2px 8px #1120511a;
  font-size: 13px;
  line-height: 1;
}

[data-product-catalog] .ws-product-card .ws-product-technology {
  font-size: 10px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

[data-product-catalog] .ws-product-card__action--add[data-cart-add-button] { gap: 4px; }

[data-product-catalog] .ws-product-card__action--add[data-cart-add-button]:not(:disabled)::before {
  content: '';
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l1 13H4L5 8Z'/%3E%3Cpath d='M8 9V6a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l1 13H4L5 8Z'/%3E%3Cpath d='M8 9V6a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 640px) {
  [data-product-catalog] .ws-product-category__heading h2 {
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.15;
  }

  [data-product-catalog] .ws-product-grid--catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 12px 10px;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card {
    min-width: 0;
    border-radius: 14px;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card__visual {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1;
    padding: 0;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    padding: 10px 8px 2px;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card h3 {
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
  }

  [data-product-catalog] .ws-product-card__gallery-dots {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 4px;
  }

  [data-product-catalog] .ws-product-card__gallery-dots i {
    width: 4px;
    height: 4px;
  }

  [data-product-catalog] .ws-product-card__gallery-dots i.is-active { width: 12px; }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-price--compact {
    align-items: flex-start;
    text-align: left;
    white-space: normal;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-price--compact strong {
    font-size: 17px;
    line-height: 1.25;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-price--compact :is(small, span) {
    font-size: 11px;
    line-height: 1.4;
  }

  [data-product-catalog] .ws-product-card .ws-commercial-prices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 3px;
    padding: 8px 0 0;
  }

  [data-product-catalog] .ws-product-card .ws-commercial-prices > span {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    min-width: 0;
    font-size: clamp(9.5px, 2.55vw, 10px);
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
  }

  [data-product-catalog] .ws-product-card .ws-commercial-prices strong {
    font-size: clamp(11px, 3.2vw, 13px);
    line-height: 1.25;
    white-space: normal;
  }

  [data-product-catalog] .ws-product-card .ws-commercial-prices small {
    font-size: 9px;
    line-height: 1.4;
  }

  [data-product-catalog] .ws-product-card .ws-commercial-prices > .is-active-credit {
    padding: 4px 0;
    border: 0;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px #b8decf;
  }

  [data-product-catalog] .ws-product-card .ws-commercial-prices .ws-commercial-prices__active-label {
    font-size: 9px;
  }

  [data-product-catalog] .ws-product-card .ws-credit-price {
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
  }

  [data-product-catalog] .ws-product-card .ws-credit-price__badge { font-size: 11px; }
  [data-product-catalog] .ws-product-card .ws-credit-price__amount { gap: 3px; }
  [data-product-catalog] .ws-product-card .ws-credit-price__amount strong { font-size: 21px; }
  [data-product-catalog] .ws-product-card .ws-credit-price__amount > span { font-size: 11px; }
  [data-product-catalog] .ws-product-card :is(.ws-credit-price__retail, .ws-credit-price__note) {
    font-size: 11px;
    line-height: 1.45;
  }

  [data-product-catalog] .ws-product-card .ws-bn-product-note {
    gap: 3px;
    min-height: 44px;
    margin: 0;
    padding: 8px;
    font-size: 10px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card__actions {
    grid-template-columns: minmax(0, 1fr);
    align-self: stretch;
    gap: 0;
    margin-top: auto;
    padding-top: 8px;
  }

  [data-product-catalog] .ws-product-card__actions > .ws-reseller-quantity-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  [data-product-catalog] .ws-product-card .ws-reseller-quantity {
    grid-template-columns: minmax(0, 1fr) 64px;
    align-items: center;
    gap: 6px;
    font-size: 11px;
  }

  [data-product-catalog] .ws-product-card .ws-reseller-quantity input {
    height: 44px;
    min-height: 44px;
    padding: 7px 3px;
    border-radius: 8px;
    font-size: 16px;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card__action {
    min-height: 44px;
    padding: 4px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.15;
  }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card__action--add { height: 44px; }

  [data-product-catalog] .ws-product-grid--catalog .ws-product-card__action--details {
    order: 2;
    min-height: 32px;
    padding: 2px 4px;
    border-color: transparent;
    background: transparent;
    font-size: 11px;
    font-weight: 650;
  }

  [data-product-catalog] .ws-product-card .ws-reseller-quantity__guidance {
    padding: 7px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.45;
  }

  /* Standard acrylics use a combination selector instead of regular cards. */
  [data-product-catalog] .ws-acrylic-combination__models {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }

  [data-product-catalog] .ws-acrylic-combination__model {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 9px;
    padding: 8px;
    border-radius: 14px;
  }

  [data-product-catalog] .ws-acrylic-combination__photo {
    align-self: start;
    border-radius: 9px;
  }

  [data-product-catalog] .ws-acrylic-combination__model-body { justify-content: flex-start; }
  [data-product-catalog] .ws-acrylic-combination__model label {
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  [data-product-catalog] .ws-acrylic-combination__technology {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    margin: 0;
    padding: 4px 6px;
    border-radius: 999px;
    background: #fff;
    color: #112051;
    box-shadow: 0 2px 8px #1120511a;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.2;
  }

  [data-product-catalog] .ws-acrylic-combination__stepper {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    border-radius: 8px;
  }

  [data-product-catalog] .ws-acrylic-combination__stepper :is(input, button) { min-height: 44px; }
  [data-product-catalog] .ws-acrylic-combination__stepper input { font-size: 16px; }

  [data-product-catalog] .ws-acrylic-combination__presets {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    margin-top: 7px;
    padding-bottom: 3px;
  }

  [data-product-catalog] .ws-acrylic-combination__presets button {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 44px;
    padding: 6px;
    font-size: 11px;
    white-space: nowrap;
  }

  [data-product-catalog] .ws-acrylic-combination__line-price {
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 360px) and (max-width: 640px) {
  [data-product-catalog] .ws-product-card__actions > .ws-reseller-quantity-form {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: end;
  }

  [data-product-catalog] .ws-product-card .ws-reseller-quantity {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  [data-product-catalog] .ws-product-card .ws-reseller-quantity input {
    padding-inline: 2px;
    appearance: textfield;
    -moz-appearance: textfield;
  }

  [data-product-catalog] .ws-product-card .ws-reseller-quantity input::-webkit-inner-spin-button,
  [data-product-catalog] .ws-product-card .ws-reseller-quantity input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
  }
}

@media (max-width: 360px) {
  [data-product-catalog] .ws-acrylic-combination__stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-product-catalog] .ws-acrylic-combination__stepper input {
    grid-column: 1 / -1;
    grid-row: 1;
    border-bottom: 1px solid #dce5ef;
  }
}
