/* Cutsmart modern VirtueMart category/listing cards v1.4 - colour guide only, no per-card application badge */
.cs-pl-section,
.category-view,
.browse-view,
.latest-view,
.featured-view,
.topten-view,
.recent-view,
.related-products-view {
  --cs-blue: #07356f;
  --cs-blue-2: #0d4f9e;
  --cs-orange: #ff6b16;
  --cs-text: #14213d;
  --cs-muted: #667085;
  --cs-border: #d9e2ef;
  --cs-soft: #f5f8fc;
  --cs-card: #ffffff;
  --cs-success: #138a3d;
  --cs-homeowner-bg: #eef9ef;
  --cs-homeowner-border: #8ed18f;
  --cs-landowner-bg: #fff8df;
  --cs-landowner-border: #f5d66d;
  --cs-professional-bg: #eef6ff;
  --cs-professional-border: #88bdf8;
  --cs-commercial-bg: #f7efff;
  --cs-commercial-border: #c999ef;
}

.cs-pl-section {
  margin: 12px 0 28px;
}

.cs-pl-section-title,
.cs-pl-section > h4 {
  color: var(--cs-blue);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 850;
  margin: 6px 0 14px;
  letter-spacing: -0.01em;
}

.cs-pl-application-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(7, 53, 111, 0.06);
}

.cs-pl-legend-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 190px;
  color: var(--cs-text);
}

.cs-pl-legend-heading strong {
  color: var(--cs-blue);
  font-size: 14px;
  font-weight: 900;
}

.cs-pl-legend-heading span {
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.3;
}

.cs-pl-legend-items {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}

.cs-pl-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #e5edf8;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--cs-text);
}

.cs-pl-legend-item > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cs-pl-legend-item strong {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 900;
}

.cs-pl-legend-item small {
  color: var(--cs-muted);
  font-size: 11px;
  line-height: 1.15;
}

.cs-pl-legend-swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--cs-border);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.cs-pl-legend-swatch.cs-app-homeowner { background: var(--cs-homeowner-bg); border-color: var(--cs-homeowner-border); }
.cs-pl-legend-swatch.cs-app-landowner { background: var(--cs-landowner-bg); border-color: var(--cs-landowner-border); }
.cs-pl-legend-swatch.cs-app-professional { background: var(--cs-professional-bg); border-color: var(--cs-professional-border); }
.cs-pl-legend-swatch.cs-app-commercial { background: var(--cs-commercial-bg); border-color: var(--cs-commercial-border); }


.cs-pl-row.row {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin: 0 0 20px 0 !important;
  width: 100%;
}

.cs-pl-product.product,
.cs-pl-product[class*="vm-col"],
.cs-pl-section .product.vm-col,
.cs-pl-section .product.vm-col-1,
.cs-pl-section .product.vm-col-2,
.cs-pl-section .product.vm-col-3,
.cs-pl-section .product.vm-col-4,
.cs-pl-section .product.vm-col-5 {
  float: none !important;
  clear: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  min-width: 0;
}

.cs-pl-horizontal-separator,
.cs-pl-product.vertical-separator::after,
.cs-pl-product .vertical-separator,
.cs-pl-section .horizontal-separator {
  display: none !important;
}

.cs-pl-card.product-container,
.cs-pl-card.spacer {
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(7, 53, 111, 0.07);
  padding: 0 !important;
  margin: 0 !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cs-pl-card.cs-app-homeowner {
  background: linear-gradient(180deg, #ffffff 0%, var(--cs-homeowner-bg) 100%);
  border-color: var(--cs-homeowner-border);
}

.cs-pl-card.cs-app-landowner {
  background: linear-gradient(180deg, #ffffff 0%, var(--cs-landowner-bg) 100%);
  border-color: var(--cs-landowner-border);
}

.cs-pl-card.cs-app-professional {
  background: linear-gradient(180deg, #ffffff 0%, var(--cs-professional-bg) 100%);
  border-color: var(--cs-professional-border);
}

.cs-pl-card.cs-app-commercial {
  background: linear-gradient(180deg, #ffffff 0%, var(--cs-commercial-bg) 100%);
  border-color: var(--cs-commercial-border);
}


.cs-pl-card:hover {
  transform: translateY(-2px);
  border-color: #b9d2f5;
  box-shadow: 0 16px 32px rgba(7, 53, 111, 0.12);
}

.cs-pl-image-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cs-pl-image-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / .78;
  min-height: 175px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border-bottom: 1px solid #eef2f7;
  overflow: hidden;
}

.cs-pl-image-frame img,
.cs-pl-image,
.cs-pl-card .browseProductImage {
  max-width: 100% !important;
  max-height: 215px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.cs-pl-no-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  color: var(--cs-muted);
  font-size: 13px;
  border: 1px dashed var(--cs-border);
  border-radius: 12px;
  background: #fff;
}

.cs-pl-content {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1 1 auto;
  padding: 15px 16px 16px;
  min-width: 0;
}

.cs-pl-application-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--cs-border);
  background: #fff;
  color: var(--cs-blue);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
}

.cs-pl-application-badge.cs-app-homeowner { background: var(--cs-homeowner-bg); border-color: var(--cs-homeowner-border); }
.cs-pl-application-badge.cs-app-landowner { background: var(--cs-landowner-bg); border-color: var(--cs-landowner-border); }
.cs-pl-application-badge.cs-app-professional { background: var(--cs-professional-bg); border-color: var(--cs-professional-border); }
.cs-pl-application-badge.cs-app-commercial { background: var(--cs-commercial-bg); border-color: var(--cs-commercial-border); }

.cs-pl-app-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: .75;
}


.cs-pl-title,
.cs-pl-card h2.cs-pl-title,
.browse-view .cs-pl-title,
.category-view .cs-pl-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 17px !important;
  line-height: 1.22 !important;
  font-weight: 850 !important;
  color: #0b1220 !important;
  min-height: 0 !important;
  text-transform: none !important;
}

.cs-pl-title a {
  color: #0b1220 !important;
  text-decoration: none !important;
}

.cs-pl-title a:hover {
  color: var(--cs-blue-2) !important;
}

.cs-pl-sku {
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 650;
  word-break: break-word;
}

.cs-pl-desc,
.cs-pl-card .product_s_desc {
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  white-space: normal !important;
}

/* Some older VirtueMart/theme CSS sets product_s_desc to a fixed height.
   Keep listing descriptions readable and prevent the price block from overlapping. */
.browse-view .cs-pl-card .product_s_desc,
.category-view .cs-pl-card .product_s_desc,
.latest-view .cs-pl-card .product_s_desc,
.featured-view .cs-pl-card .product_s_desc,
.topten-view .cs-pl-card .product_s_desc,
.recent-view .cs-pl-card .product_s_desc {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.cs-pl-rating-stock {
  min-height: 0 !important;
  margin: 0 !important;
  color: var(--cs-muted);
  font-size: 12px;
}

.cs-pl-rating-stock .availability,
.cs-pl-rating-stock .stock-level,
.cs-pl-rating-stock .vmicon,
.cs-pl-rating-stock .vm2-normalstock,
.cs-pl-rating-stock .vm2-lowstock,
.cs-pl-rating-stock .vm2-nostock {
  vertical-align: middle;
}

.cs-pl-price {
  margin-top: auto;
  padding-top: 6px;
  min-height: 0 !important;
}

.cs-pl-price .product-price,
.cs-pl-price div.product-price {
  margin: 0 !important;
  line-height: 1.22;
}

.cs-pl-price .PricesalesPrice,
.cs-pl-price .salesPrice,
.cs-pl-price .vm-price-value,
.cs-pl-price .PricebasePriceWithTax,
.cs-pl-price .PricepriceWithoutTax,
.cs-pl-price .PricediscountedPriceWithoutTax {
  color: var(--cs-blue) !important;
  font-size: 21px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
}

.cs-pl-price .PricesalesPrice span,
.cs-pl-price .vm-price-value span {
  font-weight: inherit !important;
}

.cs-pl-addtocart {
  min-height: 0 !important;
  margin: 2px 0 0 !important;
}

.cs-pl-addtocart .addtocart-area,
.cs-pl-addtocart form.product,
.cs-pl-addtocart .addtocart-bar {
  margin: 0 !important;
  width: 100%;
}

.cs-pl-addtocart .quantity-box,
.cs-pl-addtocart .quantity-controls,
.cs-pl-addtocart .addtocart-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.cs-pl-addtocart input.quantity-input,
.cs-pl-addtocart input[name="quantity[]"],
.cs-pl-addtocart input.quantity-input.js-recalculate {
  width: 48px !important;
  min-width: 48px !important;
  height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid var(--cs-border) !important;
  text-align: center;
  background: #fff !important;
}

.cs-pl-addtocart input.addtocart-button,
.cs-pl-addtocart button.addtocart-button,
.cs-pl-addtocart .addtocart-button,
.cs-pl-addtocart .vm-button-correct,
.cs-pl-addtocart input[type="submit"] {
  flex: 1 1 135px;
  min-height: 40px;
  border-radius: 12px !important;
  border: 1px solid var(--cs-orange) !important;
  background: var(--cs-orange) !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
  text-align: center;
  text-shadow: none !important;
  box-shadow: none !important;
  padding: 10px 14px !important;
}

.cs-pl-addtocart input.addtocart-button:hover,
.cs-pl-addtocart button.addtocart-button:hover,
.cs-pl-addtocart .vm-button-correct:hover,
.cs-pl-addtocart input[type="submit"]:hover {
  filter: brightness(.96);
}

.cs-pl-addtocart .product-field,
.cs-pl-addtocart .product-fields,
.cs-pl-addtocart .product-field-display {
  max-width: 100%;
}

.cs-pl-addtocart select,
.cs-pl-addtocart input[type="text"] {
  max-width: 100%;
}

.cs-pl-details-button.vm-details-button {
  margin: 2px 0 0 !important;
  text-align: left !important;
}

.cs-pl-details-link.product-details,
.cs-pl-details-link,
.cs-pl-details-button a.product-details {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  border-radius: 12px !important;
  border: 1px solid #cfe3ff !important;
  background: #eaf3ff !important;
  color: var(--cs-blue) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  padding: 9px 12px !important;
  box-shadow: none !important;
}

.cs-pl-details-link:hover,
.cs-pl-details-button a.product-details:hover {
  background: var(--cs-blue) !important;
  border-color: var(--cs-blue) !important;
  color: #fff !important;
}

.cs-pl-row::before,
.cs-pl-row::after {
  content: none !important;
}

.cs-pl-row .clear,
.cs-pl-section > .clear {
  display: none !important;
}

@media (max-width: 1320px) {
  .cs-pl-row.row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }

  .cs-pl-image-frame {
    min-height: 150px;
    padding: 12px;
  }

  .cs-pl-content {
    padding: 13px 14px 14px;
  }
}

@media (max-width: 1080px) {
  .cs-pl-row.row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cs-pl-row.row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cs-pl-application-legend {
    align-items: flex-start;
    flex-direction: column;
  }

  .cs-pl-legend-items {
    justify-content: flex-start;
    width: 100%;
  }
}


@media (max-width: 760px) {
  .cs-pl-row.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cs-pl-image-frame {
    min-height: 130px;
    padding: 10px;
  }

  .cs-pl-content {
    padding: 12px;
    gap: 7px;
  }

  .cs-pl-title,
  .cs-pl-card h2.cs-pl-title {
    font-size: 14px !important;
  }

  .cs-pl-desc {
    display: none;
  }

  .cs-pl-application-legend {
    padding: 12px;
  }

  .cs-pl-legend-item {
    flex: 1 1 145px;
  }

  .cs-pl-price .PricesalesPrice,
  .cs-pl-price .salesPrice,
  .cs-pl-price .vm-price-value,
  .cs-pl-price .PricebasePriceWithTax {
    font-size: 18px !important;
  }

  .cs-pl-addtocart input.addtocart-button,
  .cs-pl-addtocart button.addtocart-button,
  .cs-pl-addtocart .vm-button-correct,
  .cs-pl-details-link.product-details,
  .cs-pl-details-button a.product-details {
    min-height: 36px;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
}

@media (max-width: 460px) {
  .cs-pl-row.row {
    grid-template-columns: 1fr;
  }
}

/* v1.4: keep the colour guide and coloured card backgrounds, but do not repeat the application text on every card. */
.cs-pl-application-badge,
.cs-pl-app-dot {
  display: none !important;
}
