/* AB-LAB / UniShop2: brand palette. Loaded after the theme styles. */
:root {
  --ablab-primary: #1e293b;
  --ablab-accent: #0284c7;
  --ablab-accent-hover: #0369a1;
  --ablab-secondary: #0f766e;
  --ablab-secondary-hover: #115e59;
  --ablab-background: #f8fafc;
  --ablab-card: #ffffff;
  --ablab-price: #0f172a;
}

body { background-color: var(--ablab-background); }
h1, h2, h3, h4 { color: var(--ablab-primary); }

/* Quick order is a separate action from adding a product to the cart. */
.btn.quick-order {
  color: #fff;
  background: var(--ablab-secondary);
  border-color: var(--ablab-secondary);
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn.quick-order:hover,
.btn.quick-order:focus-visible,
.btn.quick-order:active {
  color: #fff;
  background: var(--ablab-secondary-hover);
  border-color: var(--ablab-secondary-hover);
}
.btn.quick-order:disabled,
.btn.quick-order.disabled { opacity: .65; }

.product-thumb {
  background-color: var(--ablab-card);
  transition: box-shadow 150ms ease;
}
.product-thumb:hover,
.product-thumb:focus-within {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.price,
.price .price-new {
  color: var(--ablab-price);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.price .price-old { color: #64748b; font-weight: 400; }

.header-search__input:focus,
input[name="search"]:focus {
  border-color: var(--ablab-accent);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .15);
  outline: none;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ablab-accent);
  outline-offset: 3px;
}

.footer { background-color: var(--ablab-primary); }
.footer h3, .footer h4, .footer h5 { color: #fff; }
.footer__text { border-top-color: rgba(255, 255, 255, .15); }

@media (prefers-reduced-motion: reduce) {
  .btn.quick-order, .product-thumb { transition: none; }
}

/* AB-LAB: header contacts and B2B quote form */
.header-phones__main {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #1e293b;
}
.ablab-header-email {
  display: block;
  width: fit-content;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}
.ablab-header-email:hover { color: #0284c7; }
.ablab-header-quote.btn {
  display: block;
  width: fit-content;
  max-width: 100%;
  height: auto;
  min-height: 34px;
  margin-top: 7px;
  padding: 6px 9px;
  border-radius: 6px;
  white-space: normal;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  background: #0f766e;
}
.ablab-header-quote.btn:hover,
.ablab-header-quote.btn:focus-visible { color: #fff; background: #115e59; }
.header-search__form {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}
.header-search__form:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2,132,199,.15);
}
.header-search__input,
.header-search__category + .header-search__input { border-radius: 6px; }
.header-search__form .header-search__input:focus {
  border-color: transparent;
  box-shadow: none;
  outline: none;
}
.ablab-quote-label { display: block; margin: 12px 0 5px; font-weight: 500; }
.ablab-quote-label span { color: #b91c1c; }
.ablab-quote-hint { margin: 8px 0 16px; color: #64748b; font-size: 13px; }
#modal-request-form form[name="callback"] .form-control { border-radius: 6px; }
#modal-request-form form[name="callback"] .form-control:focus { border-color: #0284c7; }
#modal-request-form:has(form[name="callback"]) .modal-request__btn { background: #0f766e; color: #fff; }
#modal-request-form:has(form[name="callback"]) .modal-request__btn:hover { background: #115e59; }
@media (max-width: 767px) {
  .ablab-header-quote.btn { max-width: 175px; }
}

/* AB-LAB: four benefits below the homepage slider. */
.ablab-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}
.ablab-benefits__card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 22px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.ablab-benefits__icon {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  color: #0284c7;
}
.ablab-benefits .ablab-benefits__title {
  margin: 0 0 7px;
  font: 700 15px/1.4 Inter, sans-serif;
  color: #1e293b;
}
.ablab-benefits__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
}
@media (hover: hover) {
  .ablab-benefits__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.05);
  }
}
@media (max-width: 991px) {
  .ablab-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .ablab-benefits { gap: 12px; margin-top: 16px; }
  .ablab-benefits__card { flex-direction: column; gap: 12px; padding: 16px 14px; }
}
@media (max-width: 359px) {
  .ablab-benefits { grid-template-columns: minmax(0, 1fr); }
}

/* Only client logos: product photos, banners and the AB-LAB logo stay unchanged.
   .ablab-clients is available for a separately marked carousel;
   the second selector matches this installation's existing client assets. */
.ablab-clients img,
.home-page .carousel img[src*="/catalog/clients/"] {
  filter: grayscale(100%);
  opacity: .6;
  transition: filter 200ms ease, opacity 200ms ease;
}
.ablab-clients img:hover,
.ablab-clients a:focus-visible img,
.home-page .carousel img[src*="/catalog/clients/"]:hover,
.home-page .carousel a:focus-visible img[src*="/catalog/clients/"] {
  filter: grayscale(0%);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .ablab-benefits__card,
  .ablab-clients img,
  .home-page .carousel img[src*="/catalog/clients/"] { transition: none; }
  .ablab-benefits__card:hover { transform: none; }
}

/* UniShop2 renders its Attributes tab as .product-data lists. */
#tab-specification .product-data {
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid #e2e8f0;
}
#tab-specification .product-data__item {
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#tab-specification .product-data__item:nth-child(even) { background: #f8fafc; }
#tab-specification .product-data__item-div {
  display: block;
  width: auto !important;
  min-width: 0;
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  color: #334155;
}
#tab-specification .product-data__item-div::after { display: none; }

/* Also supports a regular HTML attributes table, if one is used later. */
#tab-specification table { width: 100%; border-collapse: collapse; }
#tab-specification table td {
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}
#tab-specification table tbody tr:nth-child(even) { background: #f8fafc; }
#tab-specification table td:first-child { font-weight: 500; }

/* The VAT text is real markup below the price, not CSS-generated content. */
.product-page .ablab-vat-note {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 7px 0 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.ablab-vat-note__icon { flex: 0 0 auto; color: #64748b; }

/* Keep the native radio/checkbox controls and price calculation intact. */
.product-page .option__item { max-width: 100%; }
.product-page .option__item .option__name {
  height: auto;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.product-page .option__item:not(.ended):hover .option__name { background: #f8fafc; color: #334155; border-color: #94a3b8; }
.product-page .option__item:not(.ended) input:checked + .option__name {
  border-color: #0284c7;
  background: #f0f9ff;
  color: #075985;
  box-shadow: 0 2px 6px rgba(2,132,199,.12);
}
.product-page .option__item:not(.ended) input:checked + .option__img {
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2,132,199,.12);
}
.product-page .option__item input:focus-visible + .option__name,
.product-page .option__item input:focus-visible + .option__img {
  outline: 2px solid #0284c7;
  outline-offset: 3px;
}
.product-page .option__select {
  height: auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #334155;
  background: #fff;
}
.product-page .option__select:focus,
.product-page .option__select:has(option:checked:not([value=""])) {
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2,132,199,.12);
}
@media (max-width: 575px) {
  #tab-specification .product-data__item { grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-page .option__item .option__name { transition: none; }
}
