/*
Theme Name: Astra B2B Child
Theme URI: https://lifeaid.pl/
Description: Dedykowany child theme Astry dla b2b.lifeaid.pl z hurtowym listingiem WooCommerce.
Author: LifeAid
Template: astra
Version: 1.5.1
Text Domain: astra-b2b-child
*/

:root {
  --lfa-b2b-brand: #0C4DA2;
  --lfa-b2b-brand-dark: #083a7b;
  --lfa-b2b-accent: #0f6bdc;
  --lfa-b2b-heading: #152436;
  --lfa-b2b-text: #435466;
  --lfa-b2b-muted: #708399;
  --lfa-b2b-border: #d7e2ee;
  --lfa-b2b-surface: #ffffff;
  --lfa-b2b-surface-alt: #f5f8fc;
  --lfa-b2b-ok: #1b7a44;
  --lfa-b2b-warn: #8a5a00;
  --lfa-b2b-danger: #a12626;
  --lfa-b2b-shadow: 0 10px 28px rgba(12, 77, 162, 0.08);
}

.lfa-b2b-catalog-active .ast-archive-description,
.lfa-b2b-catalog-active .woocommerce-products-header {
  display: none;
}

.lfa-b2b-catalog-active .widget_product_search,
.lfa-b2b-catalog-active .wc-block-product-search,
.lfa-b2b-catalog-active .wp-block-search,
.lfa-b2b-catalog-active .widget_search {
  display: none !important;
}

.lfa-b2b-catalog-active #secondary,
.lfa-b2b-catalog-active .widget-area {
  width: calc(30% - 45px) !important;
  max-width: calc(30% - 45px) !important;
}

.lfa-b2b-catalog-active #primary,
.lfa-b2b-catalog-active .content-area {
  width: calc(70% + 45px) !important;
  max-width: calc(70% + 45px) !important;
}

.lfa-b2b-catalog ul.products,
.lfa-b2b-catalog .products {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
  width: 100%;
}

.lfa-b2b-catalog ul.products[class*='columns-'],
.lfa-b2b-catalog .products[class*='columns-'] {
  grid-template-columns: minmax(0, 1fr) !important;
}

.lfa-b2b-catalog ul.products li.product,
.lfa-b2b-catalog .products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  clear: both;
}

.lfa-b2b-product {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--lfa-b2b-surface);
  border: 1px solid var(--lfa-b2b-border);
  border-radius: 18px;
  box-shadow: var(--lfa-b2b-shadow);
  overflow: hidden;
}

.lfa-b2b-product__inner {
  padding: 22px;
}

.lfa-b2b-product__header {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.lfa-b2b-product__image a {
  display: block;
  padding: 8px;
  background: var(--lfa-b2b-surface-alt);
  border-radius: 14px;
}

.lfa-b2b-product__image img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  display: block;
}

.lfa-b2b-product__title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

.lfa-b2b-product__title a {
  color: var(--lfa-b2b-heading);
  text-decoration: none;
}

.lfa-b2b-product__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 14px;
  color: var(--lfa-b2b-text);
}

.lfa-b2b-product__facts:empty {
  display: none;
}

.lfa-b2b-product__summary {
  text-align: right;
}

.lfa-b2b-product__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--lfa-b2b-brand-dark);
  margin-bottom: 8px;
}

.lfa-b2b-product__profit-row {
  display: block;
  margin: 4px 0;
  font-size: 13px;
  color: var(--lfa-b2b-text);
}

.lfa-b2b-product__profit-row strong {
  color: var(--lfa-b2b-heading);
}

.lfa-b2b-product__link {
  color: var(--lfa-b2b-brand);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.lfa-b2b-order-form {
  margin: 0;
}

.lfa-b2b-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--lfa-b2b-border);
  border-radius: 14px;
  background: #fff;
}

.lfa-b2b-stock-meter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lfa-b2b-stock-meter__segment {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #d5dde7;
}

.lfa-b2b-stock-meter--red .lfa-b2b-stock-meter__segment.is-active {
  background: #d92d20;
}

.lfa-b2b-stock-meter--green .lfa-b2b-stock-meter__segment.is-active {
  background: #12b76a;
}

.lfa-b2b-stock-meter__label {
  font-size: 12px;
  color: var(--lfa-b2b-text);
  font-weight: 600;
}

.single-product .variations_form .variations select.hidden-by-swatches {
  display: none !important;
}

.single-product .swatch-attribute-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.single-product .swatch-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--lfa-b2b-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: all .2s ease;
}

.single-product .swatch-option:hover {
  border-color: var(--lfa-b2b-brand);
}

.single-product .swatch-option.selected {
  border-color: var(--lfa-b2b-brand-dark);
  background: #edf4fb;
  color: var(--lfa-b2b-brand-dark);
}

.single-product .swatch-option.disabled,
.single-product .swatch-option.out-of-stock {
  opacity: .35;
  cursor: not-allowed;
}

.lfa-b2b-grid-table thead th {
  background: #edf4fb;
  color: var(--lfa-b2b-heading);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 14px;
  border-bottom: 1px solid var(--lfa-b2b-border);
}

.lfa-b2b-grid-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f6;
  vertical-align: middle;
  font-size: 14px;
  color: var(--lfa-b2b-text);
}

.lfa-b2b-grid-table tbody tr:last-child td {
  border-bottom: 0;
}

.lfa-b2b-qty {
  width: 90px;
  min-height: 42px;
  border: 1px solid var(--lfa-b2b-border);
  border-radius: 10px;
  padding: 8px 10px;
}

.lfa-b2b-order-form__actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.lfa-b2b-order-form__actions .button {
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--lfa-b2b-brand) 0%, var(--lfa-b2b-accent) 100%);
  color: #fff;
}

.lfa-b2b-variant-group + .lfa-b2b-variant-group {
  margin-top: 16px;
}

.lfa-b2b-variant-group__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--lfa-b2b-heading);
}

.lfa-b2b-variant-color {
  margin-top: 4px;
  font-size: 12px;
  color: var(--lfa-b2b-muted);
}

.lfa-b2b-muted {
  color: var(--lfa-b2b-muted);
}

@media (max-width: 921px) {
  .lfa-b2b-catalog-active #secondary,
  .lfa-b2b-catalog-active .widget-area,
  .lfa-b2b-catalog-active #primary,
  .lfa-b2b-catalog-active .content-area {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 900px) {
  .lfa-b2b-product__header {
    grid-template-columns: 1fr;
  }

  .lfa-b2b-product__summary {
    text-align: left;
  }

  .lfa-b2b-grid-table {
    display: block;
    overflow-x: auto;
  }
}
