/* Catalogue and search cards; shared by the public and business layouts. */
.cata-product:has(> .product-grid-item) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}
.cata-product > .product-grid-item {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.ant-list-grid.product-grid-item .ant-row { display: flex; flex-wrap: wrap; }
.ant-list-grid.product-grid-item .ant-row > .ant-col {
  flex: 1 0 min(100%, 280px);
  max-width: 100%;
}
.product-grid-item .product-wrapper {
  position: relative;
  height: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgb(23 43 70 / 5%);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.product-grid-item .product-wrapper:hover,
.product-grid-item .product-wrapper:focus-within {
  border-color: #d5ae60;
  box-shadow: 0 10px 30px rgb(23 43 70 / 11%);
}
.product-grid-item .product-wrapper .featured-img {
  padding: 30px 12px 8px;
  background: #f8fafc;
  border-bottom: 1px solid #edf1f6;
}
.product-grid-item .product-wrapper .featured-img a { display: block; }
.product-grid-item .product-wrapper .featured-img img {
  width: 100%;
  height: 120px;
  object-fit: contain !important;
  object-position: center;
}
.product-grid-item .product-wrapper :is(.badge-custom_text-grid, .badge-custom_text) {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  left: auto;
  right: auto;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 4px 12px;
  border: 1px solid #dce3eb;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  line-height: 1.6;
}
/* Reset physical offsets before applying the direction-aware badge placement. */
[dir="rtl"] .product-grid-item .product-wrapper :is(.badge-custom_text-grid, .badge-custom_text) { right: 12px; }
[dir="ltr"] .product-grid-item .product-wrapper :is(.badge-custom_text-grid, .badge-custom_text) { left: 12px; }
.product-grid-item .product-wrapper .product-group-container { padding: 10px 12px 2px; }
.product-grid-item .product-wrapper :is(.part-number-grid, .part-number) {
  position: static;
  background: #edf2f7;
  color: #172b46;
  border-radius: 7px;
  padding: 4px 8px;
  margin: 6px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}
.product-grid-item .product-wrapper > .part-number { margin: 42px 12px 0; }
.product-grid-item .product-wrapper .part-available { font-size: 12px; font-weight: 600; margin-block: 8px; }
.product-grid-item .product-wrapper .product-vendor a { color: #64748b; font-size: 12px; }
.product-grid-item .product-wrapper .product-name { margin-block: 4px 6px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.product-grid-item .product-wrapper .product-name a { color: #172b46; font-weight: 700; }
.product-grid-item .product-wrapper :is(.brand-product, .shop-name) { color: #64748b; font-size: 12px; font-weight: 400; }
.product-grid-item .product-wrapper .product-content { padding: 8px 12px 12px; }
.product-grid-item .product-wrapper .pc-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
  padding-top: 10px;
}
.product-grid-item .product-wrapper .price-cart-wrapper { display: flex; align-items: center; align-self: center; min-width: 0; width: auto; margin: 0; padding: 0; border: 0; box-shadow: none; order: 1; }
.product-grid-item .product-wrapper .pc-inner > h6 { grid-column: 1 / -1; order: 3; font-size: 11px; }
.product-grid-item .product-wrapper :is(.product-price, .product-price1) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #172b46;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  box-shadow: none;
}
.product-grid-item .product-wrapper :is(.price-cart-wrapper, .product-price, .product-price1)::before,
.product-grid-item .product-wrapper :is(.price-cart-wrapper, .product-price, .product-price1)::after { content: none; }
.product-grid-item .product-wrapper del.money { color: #64748b; font-size: 10px; font-weight: 400; }
.product-grid-item .product-wrapper .price-compare { color: #172b46; }
.product-grid-item .product-wrapper .product-button {
  position: static;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: auto;
  flex: 0 0 auto;
  order: 2;
  opacity: 1;
  visibility: visible;
  transform: none;
  margin: 0;
  border: 0;
}
.product-grid-item .product-wrapper .product-button > :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  flex: 0 0 auto;
  min-height: 34px;
  height: 34px;
  width: auto;
  padding: 0;
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.product-grid-item .product-wrapper .product-button svg { fill: currentColor; flex-shrink: 0; width: 14px; height: 14px; }
.product-grid-item .product-wrapper .product-button > :is(a, button) > span {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}
.product-grid-item .product-wrapper .product-button > button:not(:has(i, svg))::before {
  content: '\f07a';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 14px;
}
.product-grid-item .product-wrapper .product-button > a:has(.fa-shopping-cart)::after { content: 'إضافة'; }
.product-grid-item .product-wrapper .product-button > :hover { background: transparent; color: #94600a; box-shadow: none; }
.product-grid-item .product-wrapper .product-button > :disabled { background: transparent; color: #386745; cursor: default; }
.product-grid-item .product-wrapper .product-content { border-bottom: 0; }
.product-grid-item .product-wrapper a:focus-visible,
.product-grid-item .product-wrapper button:focus-visible { outline: 3px solid #94600a; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .product-grid-item .product-wrapper { transition: none; }
}
