/* Leadbetters WooCommerce product grid */

ul.products.leadbetters-products-grid,
ul.products.leadbetters-products-grid *,
ul.products.leadbetters-products-grid *::before,
ul.products.leadbetters-products-grid *::after {
  box-sizing: border-box;
}

ul.products.leadbetters-products-grid {
  list-style: none;
  max-width: 1280px;
  margin: 3rem auto !important;
  padding: 0 1.5rem !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

ul.products.leadbetters-products-grid::before,
ul.products.leadbetters-products-grid::after,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card::before,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card::after {
  display: none !important;
}

ul.products.leadbetters-products-grid li.product.leadbetters-product-card {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card:hover {
  transform: translateY(-4px);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-card-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 640px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card:hover
  .product-card-shell {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-image-wrapper {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 1rem;
  overflow: hidden;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

ul.products.leadbetters-products-grid li.product.leadbetters-product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
  display: block;
  padding: 0.75rem;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card:hover
  .product-image-wrapper
  img {
  transform: scale(1.02);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .onsale,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 4;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: #fff;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(135deg, #f97316, #ea580c);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content-shell {
  position: relative;
  flex: 1 1 auto;
  height: 340px;
  z-index: 1;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content-slider {
  position: relative;
  height: 100%;
  perspective: 1400px;
  transform: translateY(0);
  transition: transform 0.35s ease;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-card-shell.is-flipped
  .product-content-slider {
  transform: translateY(0);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content-flip {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-card-shell.is-flipped
  .product-content-flip {
  transform: rotateY(180deg);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backface-visibility: hidden;
  flex: 1;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content-back {
  transform: rotateY(180deg);
  overflow-y: auto;
  gap: 0.9rem;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .woocommerce-loop-product__title,
ul.products.leadbetters-products-grid li.product.leadbetters-product-card h2,
ul.products.leadbetters-products-grid li.product.leadbetters-product-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
  padding: 0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .woocommerce-loop-product__title
  a {
  color: inherit;
  text-decoration: none;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-description {
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.5;
  overflow: hidden;
  min-height: 2.6em;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-description
  p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-price-block {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-meta-label,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-detail-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .price {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  padding: 0;
  border: 0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .price
  ins {
  text-decoration: none;
  font-weight: 700;
  color: #0f172a;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .price
  del {
  color: #cbd5e1;
  margin-right: 0.35rem;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .button,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .add_to_cart_button,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .btn-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #2c3870;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
  width: 100%;
  padding-right: 16px !important;
  padding-left: 16px !important;
  position: relative;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .button::before,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .button::after,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .add_to_cart_button::before,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .add_to_cart_button::after,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .btn-view::before,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .btn-view::after {
  content: none !important;
  display: none !important;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .button:hover,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .add_to_cart_button:hover,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content
  .btn-view:hover {
  background: #222d5a;
  transform: translateY(-1px);
  padding-right: 16px !important;
  padding-left: 16px !important;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .btn-arrow {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
  background: none !important;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .button:hover
  .btn-arrow {
  transform: translateX(3px);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-basket-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-quantity-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-qty-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 112px;
  width: 112px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d7deea;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-qty-btn {
  width: 38px;
  height: 100%;
  border: 0;
  background: transparent;
  color: #2c3870;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-qty-btn:hover {
  background: #e9eefb;
  color: #1f2a63;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-qty-input {
  flex: 1 1 auto;
  width: 36px;
  min-width: 0;
  border: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
  appearance: textfield;
  padding: 0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-qty-input::-webkit-outer-spin-button,
ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-qty-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-add-button.button {
  flex: 1 1 0%;
  width: auto;
  align-self: stretch;
  background: #f59a00;
  height: 48px;
  min-height: 48px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-shadow: 0 8px 20px rgba(245, 154, 0, 0.18);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-add-button.button:hover {
  background: #d98800;
  box-shadow: 0 10px 22px rgba(217, 136, 0, 0.22);
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-content-back
  .btn-view.button {
  width: auto;
  padding-inline: 14px;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-detail-group {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-detail-group
  p {
  margin: 0;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-back-header
  .product-meta-label {
  margin: 0;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-link-inline {
  margin-top: auto;
  color: #2c3870;
  text-decoration: none;
  font-weight: 700;
}

ul.products.leadbetters-products-grid
  li.product.leadbetters-product-card
  .product-link-inline:hover {
  color: #222d5a;
}

@media (max-width: 640px) {
  ul.products.leadbetters-products-grid {
    grid-template-columns: 1fr !important;
    margin: 1.5rem auto !important;
    gap: 1rem;
  }

  ul.products.leadbetters-products-grid li.product.leadbetters-product-card {
    aspect-ratio: auto;
  }

  ul.products.leadbetters-products-grid
    li.product.leadbetters-product-card
    .product-card-shell {
    min-height: 600px;
  }

  ul.products.leadbetters-products-grid
    li.product.leadbetters-product-card
    .product-content-shell {
    height: 320px;
  }

  ul.products.leadbetters-products-grid
    li.product.leadbetters-product-card
    .product-quantity-row,
  ul.products.leadbetters-products-grid
    li.product.leadbetters-product-card
    .product-back-header {
    flex-direction: column;
    align-items: stretch;
  }

  ul.products.leadbetters-products-grid
    li.product.leadbetters-product-card
    .product-content-back
    .btn-view.button {
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  ul.products.leadbetters-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}