html {
  scroll-behavior: smooth;
} 

body {
    font-family: "Play", Tahoma, Geneva, Verdana, sans-serif;
    background: url('/img/builder.webp') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    color: #fff;
}

:root {
  --color-1: #ab18b8;
  --color-2: #2a9a9f;
  --color-3: #f1b211;
  --color-4: #e83611;
  --color-5: #f9002f;
}

a {
    text-decoration: none;
    color: inherit;
}

.conlinks {
  font-size: 16pt;
  color: #fff;
  transition: 0.5s;
  text-decoration: none;
}

.conlinks:hover {
  color: #467932;
}

h2 {
    margin: 0;
}

/* Menu */
.menu {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: #181818;
  box-shadow: 0px 0px 20px #467932;
  z-index: 20;
}

.nav {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 20px;
}

.nav-close,
.nav-open {
  display: flex;
  align-items: center;
  font-size: 35px;
  color: #b9e769;
  cursor: pointer;
  display: none;
}

.nav-menu {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-menu .nav-link {
  color: #fff;
  font-size: 14pt;
  position: relative;
  font-weight: 700;
}

.nav-menu .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: #467932;
  transition: 0.5s;
}

.nav-menu .nav-link:hover::after {
  width: 100%;
}

@media screen and (max-width: 860px) {
  .nav-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: #181818;
    box-shadow: 0px 0px 20px #467932;
    padding: 80px 0px 30px 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
  }

  .nav-close {
    position: absolute;
    top: 28px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0px 0px 20px #467932;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .nav-close:hover {
    transform: rotate(90deg);
  }

  .nav-open {
    width: 40px;
    height: 40px;
    box-shadow: 0px 0px 20px #467932;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.show-menu {
  top: -17px;
}

.mobileButtons {
  display: none;
}

/* End Menu */

.lang-btn {
  background: #b9e769;
  color: #000;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.lang-btn:hover {
  background: #688339;
}

.opt {
    display: flex;
    justify-content: center;
    color: #888;
    font-size: 12pt;
}

.bg-section-contacts {
  background: #1e1e1e;
  padding: 0px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.pc-var {
  padding: 15px 0px;
  margin: 0 auto;
  text-align: center;
}

.welcome-title {
  font-size: 40pt; 
  font-weight: 800; 
  color: #b9e769;
}

.contacts-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin: 0 auto;
  gap: 10px;
  padding-bottom: 20px;
}

.google-map iframe {
  border-radius: 10px; 
  border: 0px;
  width: 100% !important;
} 

.contacts-date {
  padding: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #fff;
  font-weight: 500;
  font-size: 20px;
}

.contacts-list {
  text-align: left;
}

.connection-buttons {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.call-button {
  display: block;
  position: fixed;
  width: 65px;
  height: 65px;
  bottom: 100px;
  right: 20px;
  transition: all .7s ease-in-out;
  z-index: 3;
  cursor: pointer;
}

.call-button:hover {
  transform: scale(1.2);
}

/* Modal window */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: none;
  padding: 30px;
  overflow-y: auto;
  z-index: 1;
}

.modal-window {
  position: relative;
  max-width: 230px;
  border-radius: 10px;
  margin: auto;
  background: linear-gradient(#2c2c2c, #141414);
  color: #fff;
  padding: 30px;
  text-align: center;
}

@property --angle{
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.modal-window::after, .modal-window::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 10px;
  animation: 3s spin linear infinite;
}

.modal-window::before {
  filter: blur(1.5rem);
  opacity: 0.9;
}

.popup::after, .popup::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 10px;
  animation: 3s spin linear infinite;
}

.popup::before {
  filter: blur(1.5rem);
  opacity: 0.9;
}

@keyframes spin {
  from{
    --angle: 0deg;
  }
  to{
    --angle: 360deg;
  }
} 

.modal-title {
  margin-bottom: 20px;
}

.modal-close-btn {
  font-size: 25px;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: 0.5s;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #467932;
}

.modalForm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: none;
  padding: 30px;
  overflow-y: auto;
  z-index: 1;
}

.modal-windowForm {
  position: relative;
  max-width: 650px;
  border-radius: 10px;
  margin: auto;
  background: linear-gradient(#2c2c2c, #141414);
  color: #fff;
  padding: 30px;
  text-align: center;
}

.modal-windowForm::after, .modal-windowForm::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 10px;
  animation: 3s spin linear infinite;
}

.modal-windowForm::before {
  filter: blur(1.5rem);
  opacity: 0.9;
}

.modal-titleForm {
  margin-bottom: 30px;
}

.modalForm-close-btn {
  font-size: 25px;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: 0.5s;
  cursor: pointer;
}

.modalForm-close-btn:hover {
  color: #467932;
}
/* End modal window */

.container {
  max-width: 1600px;
  margin: 0 auto;
}

.builder-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.builder-header {
    background: #1e1e1e;
    display: grid;
    grid-template-columns: 1fr 350px;
    align-items: center;
    padding: 15px;
    font-size: 26pt;
    font-weight: 700;
    border-radius: 10px;
    margin: 100px 0px 10px 0px;
}

.builder-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: #1e1e1e;
    border-radius: 10px;
    min-height: 500px;
    margin-bottom: 10px;
}

.products-menu {
    display: flex;
    flex-direction: column;
    padding: 20px 10px 20px 20px;  
}

.products-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #2d2d2d;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.category-item-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 5px;
}

.category-name {
    font-size: 12pt;
    font-weight: 600;
    width: 100%;
}

.info-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.products-list {
    padding: 20px 20px 20px 10px;
    min-height: 600px;
    overflow-y: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    padding: 20px;
}

.products-table th {
    font-size: 10pt;
    font-weight: 700;
    padding: 5px;
    text-align: left;
    border-bottom: 1px solid #444;
}

.products-table td {
    color: #888;
    padding: 5px;
}

.products-table th.sortable {
    cursor: pointer;
}
.products-table th .sort-indicator {
    color: #b9e769;
    margin-left: 4px;
}

.products-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16pt;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}

.product-search-input {
    flex-grow: 1;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #444;
    font-size: 10pt;
    background: #2d2d2d;
    color: #888;
}

.product-search-input:focus {
    outline: none;
    border-color: #b9e769;
}

.add-to-cart {
    background: #b9e769;
    color: #1e1e1e;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.add-to-cart:hover {
    background: #7d9c47;
}

.remove-from-cart {
    background: #963333;
    color: #1e1e1e;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
}

.remove-from-cart:hover {
    background: #b94646;
}

.remove-from-cart-row {
    background: #963333;
    color: #1e1e1e;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
}

.remove-from-cart-row:hover {
    background: #b94646;
}

.checkout-button {
    background: #b9e769;
    color: #1e1e1e;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
    margin-top: 20px;
}

.checkout-button:hover {
    background: #7d9c47;
}

/* KP (Коммерческое предложение) modal form */
.kp-form {
    background: #1e1e1e;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0 0 0;
}
.kp-form label {
    font-size: 12pt;
    color: #ddd;
}
.kp-form input[type="text"] {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2d2d2d;
    color: #eaeaea;
    font-size: 11pt;
}
.kp-form input[type="text"]:focus {
    outline: none;
    border-color: #b9e769;
}
.kp-actions {
    display: flex;
    justify-content: flex-start;
}

.cart-summary {
    background: linear-gradient(#2c2c2c, #141414);
    padding: 20px;
    border-radius: 10px;
    font-size: 16pt;
    text-align: center;
    max-height: 70vh;
    overflow: auto;
    /* Hide scrollbars visually, keep scroll working */
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE 10+ */
    overscroll-behavior: contain;    /* avoid scroll chaining */
}
  .cart-summary::-webkit-scrollbar {   /* Chrome/Safari/Edge */
    width: 0;
    height: 0;
}

.summary-title {
    font-size: 18pt;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    color: #b9e769;
}

.summary-price-per-unit {
  color: #9fbf6b;
  font: 600 12px Play, Arial, sans-serif;
  margin-top: 4px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.summary-name {
    font-size: 11pt;
    font-weight: 600;
    width: 500px;
    color: #fff;
    flex-grow: 1;
    text-align: left;
}

.summary-label {
    font-size: 16pt;
    font-weight: 800;
    color: #fff;
}

.summary-value {
    font-size: 14pt;
    font-weight: 700;
    color: #b9e769;
}

.summary-item {
    display: grid;
    grid-template-columns: 50px 1fr 140px 100px;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.summary-item2 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding-top: 10px;
}

.summary-price {
    font-size: 12pt;
    font-weight: 700;
    color: #b9e769;
    min-width: 80px;
    text-align: right;
}

.total-count {
    font-size: 11pt;
    font-weight: 700;
    color: #888;
    margin-bottom: 10px;
}

/* Compatibility toolbar and toggle */
.compat-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.compat-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.compat-switch {
  position: relative;
  width: 46px;
  height: 24px;
  background: #3a3a3a;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.compat-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #eaeaea;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.25s ease, background 0.25s ease;
}
.compat-toggle:focus-visible + .compat-switch {
  box-shadow: 0 0 0 3px rgba(185,231,105,0.25), inset 0 0 0 1px rgba(255,255,255,0.12);
}
.compat-toggle:checked + .compat-switch {
  background: #7d9c47; /* slightly darker than accent for contrast */
}
.compat-toggle:checked + .compat-switch::before {
  transform: translateX(22px);
  background: #fff;
}
.compat-label {
  color: #ddd;
  font-size: 12px;
}

.loading {
    display: none;
    width: 250px;
    height: 6px;
    background: #444;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.loading.active::before {
    content: 'Загрузка...';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.loading.active {
    display: block;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #b9e769 0%, #739140ff 100%);
    animation: loading-bar-move 1.2s linear infinite;
    border-radius: 4px;
}
@keyframes loading-bar-move {
    0% { width: 0%; }
    50% { width: 90%; }
    100% { width: 0%; }
}

/* Button Up */
.upbtn {
  z-index: 80;
  width: 60px;
  height: 60px;
  color: #fff;
  position: fixed;
  bottom: 190px;
  right: 20px;
  cursor: pointer;
  border: 3px solid #b9e769;
  border-radius: 50%;
  transform: scale(0);
  transition: all .7s ease-in-out;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #467932;
  background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMS4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ5MS44NTggNDkxLjg1OCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDkxLjg1OCA0OTEuODU4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjMycHgiIGhlaWdodD0iMzJweCI+CjxnPgoJPGc+CgkJPHBhdGggZD0iTTQ5MS44NTgsNDQyLjQ2MWMwLDEzLjkzMS0xMS4yOTMsMjUuMjI0LTI1LjIyNCwyNS4yMjRMMjQ1LjkzLDM3My4wOTdMMjUuMjI0LDQ2Ny42ODYgICAgQzExLjI5Miw0NjcuNjg2LDAsNDU2LjM5MiwwLDQ0Mi40NjFMMjI3LjAxMSwzMi41OGMwLDAsMTguOTE4LTE4LjkxOCwzNy44MzQsMEMyODMuNzY0LDUxLjQ5OSw0OTEuODU4LDQ0Mi40NjEsNDkxLjg1OCw0NDIuNDYxeiIgZmlsbD0iI0ZGRkZGRiIvPgoJPC9nPgoJPGc+Cgk8L2c+Cgk8Zz4KCTwvZz4KCTxnPgoJPC9nPgoJPGc+Cgk8L2c+Cgk8Zz4KCTwvZz4KCTxnPgoJPC9nPgoJPGc+Cgk8L2c+Cgk8Zz4KCTwvZz4KCTxnPgoJPC9nPgoJPGc+Cgk8L2c+Cgk8Zz4KCTwvZz4KCTxnPgoJPC9nPgoJPGc+Cgk8L2c+Cgk8Zz4KCTwvZz4KCTxnPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=)
}

.upbtn:hover {
  transform: scale(1.2) !important;
}

/* End button up */

/* Selected product actions in left menu */
.selected-product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.summary-note {
    font-size: 12pt;
    color: #b9e769;
    margin-top: 6px;
}

.selected-product-price {
    font-size: 11pt;
    color: #fff;
    font-weight: 700;
}

.selected-product-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.selected-product-controls .left-qty-decr,
.selected-product-controls .left-qty-incr,
.summary-item .qty-decr,
.summary-item .qty-incr {
    width: 28px;
    height: 28px;
    border: 1px solid #444;
    background: #2b2b2b;
    color: #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 26px;
    text-align: center;
}

.selected-product-controls .left-qty-decr:hover,
.selected-product-controls .left-qty-incr:hover,
.summary-item .qty-decr:hover,
.summary-item .qty-incr:hover {
    background: #3a3a3a;
}

.selected-product-controls .left-qty-value,
.summary-item .qty-value {
    width: 30px; 
    padding: 5.5px 8px; 
    background:#2d2d2d; 
    border: 1px solid #444; 
    border-radius: 6px; 
    color:#ddd; 
    font: 600 13px Play, Arial, sans-serif; 
    text-align: center;
}

.selected-product-controls .left-qty-stock,
.summary-item .qty-stock {
    color: #888;
    font-size: 12px;
}

/* Hide old qty text in left menu (we have controls now) */
.category-item-info .selected-product-qty {
    display: none;
}

/* Qty controls in cart summary */
.summary-item .summary-qty {
    display: block;
}

/* Store name (distributor) label */
.store-name {
    font-size: 10pt;
    color: #b9e769;
}

.store-name2 {
    font-size: 10pt;
    color: #888;
}

.summary-name .store-name {
    margin-top: 2px;
}

/* Hover zoom on images in products table and cart summary */
.products-table td img,
.summary-item .summary-img img {
    display: inline-block;
    border-radius: 5px;
}

/* Wrappers for image preview so enlarged image is not overlapped */
.products-table .img-wrap {
    display: inline-block;
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 1;
}
.products-table .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.products-table .img-wrap:hover { z-index: 9998; }

.summary-item .summary-img {
    display: inline-block;
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 1;
}
.summary-item .summary-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.summary-item .summary-img:hover { z-index: 9998; }

/* Floating preview that follows cursor */
.image-preview {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-9999px, -9999px);
    z-index: 10000;
    pointer-events: none;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
    padding: 6px;
}
.image-preview img {
    display: block;
    max-width: 220px;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

/* Cart modal */
.cart-modal {
    position: fixed;
    inset: 0;
    z-index: 1000; /* above .upbtn (80) */
    display: none;
}

.cart-modal.open {
    display: block;
}

.cart-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.cart-modal-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    width: calc(100% - 32px);
    max-width: 1000px;
    max-height: 80vh;
  /* allow glow to render outside without causing inner scrollbars */
    overflow: visible;
    isolation: isolate;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Animated gradient border effect (same as .modal-window) */
.cart-modal-dialog::after, .cart-modal-dialog::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--angle), transparent 30%, #467932);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 2px;
  border-radius: 10px;
  animation: 3s spin linear infinite;
  pointer-events: none;
}
.cart-modal-dialog::before {
  filter: blur(1.5rem);
  opacity: 0.9;
}


.cart-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Fixed bottom total button */
.cart-fab {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    z-index: 1001;
    background: #b9e769;
    color: #1e1e1e;
    border: none;
    border-radius: 9999px;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.cart-fab:hover {
    background: #7d9c47;
}

/* Simple lightbox for full-size image */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}
.lightbox.open { display: flex; }
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}
.lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 20px;
    line-height: 34px;
    text-align: center;
}

.conf-name {
    font-size:50pt; 
    color:#b9e769;
    display: block;
    margin-bottom: 10px;
}

.conf-description {
    font-size:14pt; 
    color:#888;
    display: block;
}

.neon-text {
    color: #fff;
    text-shadow: 0 0 5px #b9e769, 0 0 10px #b9e769, 0 0 15px #b9e769, 0 0 20px #b9e769, 0 0 20px #b9e769;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px #b9e769, 0 0 5px #b9e769, 0 0 10px #b9e769, 0 0 15px #b9e769, 0 0 20px #b9e769;
    }
    100% {
        text-shadow: 0 0 5px #467932, 0 0 5px #467932, 0 0 10px #467932, 0 0 15px #467932, 0 0 20px #467932;
    }
}

/* ===== Обязательные компоненты: панель прогресса ===== */
/* ===== Обязательные компоненты: встроенная шкала в левом столбце ===== */
.req-inline-progress {
  background: #1f1f1f;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 10px 12px;
  color: #e6e6e6;
  font: 400 13px Play, Arial, sans-serif;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  margin-bottom: 10px;
}
.req-inline-head {
  color: #b9e769;
  font: 700 14px Play, Arial, sans-serif;
  margin-bottom: 8px;
}
.req-inline-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  align-items: center;
}
.req-seg {
  height: 6px;
  border-radius: 6px;
  background: #3a3a3a;
  position: relative;
  overflow: visible; /* нужно для тултипа */
}
.req-seg.ok { background: #69c14f; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.req-seg.miss { background: #bdbdbd; /* без opacity, чтобы тултип не становился прозрачным */ }
.req-inline-meta { margin-top: 6px; color:#bdbdbd; font-size:12px; }
/* Tooltip над сегментами */
.req-seg::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 140%;
  transform: translateX(-50%) translateY(4px);
  background: #141414;
  border: 1px solid #343434;
  color: #eaeaea;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font: 400 12px Nunito, Arial, sans-serif;
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 30;
}
.req-seg::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #141414;
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 29;
}
.req-seg:hover::after,
.req-seg:hover::before,
.req-seg:focus-visible::after,
.req-seg:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* На мобильных — тянется на ширину меню */
@media screen and (max-width: 860px) {
  .req-inline-progress { margin-bottom: 12px; width: 100%; min-width: 0; overflow: hidden; box-sizing: border-box; }
  /* На мобильных предотвращаем горизонтальный выход: 
     вместо grid c auto-columns используем flex и равные доли */
  .req-inline-rail { display: flex; gap: 8px; width: 100%; min-width: 0; }
  .req-inline-rail .req-seg { flex: 1 1 0; min-width: 0; }
}
/* ===== /Обязательные компоненты ===== */

@media screen and (max-width: 860px) {
    .builder-header {
      grid-template-columns: 1fr;
      justify-items: center;
    }
    .conf-name {
      font-size: 34pt; 
      text-align: center;
    }

    .neon-text {
      display: flex;
      font-size: 16pt; 
      text-align: center;
    }
    .conf-description {
      font-size:12pt; 
      text-align: center;
    }
    .builder-body {
      grid-template-columns: 1fr;
    }
}

/* ===== Mobile adaptations for products table and cart ===== */
@media screen and (max-width: 550px) {
  /* Search bar stacks on mobile */
  .products-search {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .product-search-input {
    width: 100%;
    font-size: 14px;
  }

  .contacts-table {
    grid-template-columns: 1fr;
  }

  /* Products table -> card list */
  .products-table {
    display: block;
  }
  .products-table tbody {
    display: block;
  }
  /* Hide the header row that is injected inside tbody on mobile */
  .products-table tbody > tr:first-child {
    display: none;
  }
  .products-table tr {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    grid-template-areas:
      "img name name"
      "img stock price"
      "img actions actions";
    gap: 6px 10px;
    padding: 10px 8px;
    border-bottom: 1px solid #444;
  }
  .products-table td, .products-table th {
    border: none;
    padding: 4px 2px;
    vertical-align: middle;
  }
  .products-table .img-wrap { grid-area: img; width: 60px; height: 60px; }
  .products-table td:nth-child(1) { grid-area: img; }
  .products-table td:nth-child(2) { grid-area: name; }
  .products-table td:nth-child(3) { grid-area: stock; color: #bdbdbd; }
  .products-table td:nth-child(4) { grid-area: price; justify-self: end; font-weight: 700; color: #b9e769; }
  .products-table td:nth-child(5) { grid-area: actions; }
  /* Inline labels for clarity */
  .products-table td:nth-child(3)::before { content: "Наличие: "; color:#888; margin-right:6px; }
  .products-table td:nth-child(4)::before { content: "Цена: "; color:#888; margin-right:6px; font-weight: 400; }
  .products-table button.add-to-cart,
  .products-table button.remove-from-cart-row {
    width: 100%;
    padding: 10px;
  }

  /* Cart summary layout */
  .cart-summary {
    font-size: 14px;
    padding: 12px;
    max-height: 70vh; /* keep existing constraint */
  }
  .summary-title { font-size: 16pt; }
  .summary-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    grid-template-areas:
      "img name price"
      "img qty price";
    align-items: center;
    gap: 8px 10px;
  }
  .summary-item .summary-img { grid-area: img; width: 50px; height: 50px; }
  .summary-name { grid-area: name; width: auto; overflow-wrap: anywhere; word-break: break-word; }
  .summary-item .summary-qty { grid-area: qty; }
  .summary-price { grid-area: price; min-width: auto; text-align: right; }

  .summary-item .qty-decr,
  .summary-item .qty-incr,
  .selected-product-controls .left-qty-decr,
  .selected-product-controls .left-qty-incr {
    width: 32px;
    height: 32px;
    line-height: 26px;
  }
  .summary-item .qty-value,
  .selected-product-controls .left-qty-value {
    min-width: 32px;
    font-size: 12pt;
  }

  /* Cart modal sizing */
  .cart-modal-dialog {
    width: 96vw;
    max-width: 96vw;
    max-height: 88vh;
  }
  .cart-modal-close {
    top: 6px;
    right: 8px;
    font-size: 28px;
  }
}
/* ===== /Mobile adaptations ===== */