#ms header.header {
  display: flex;
  align-items: center;
  flex-direction: row;
  /* justify-content: space-evenly; */
  padding: 1em;
  width: 100%;
  line-height: 1.3;
  font-size: 2.5em;
  /* color: var(--font_color_light); */
  position: fixed;
  /* position: sticky; */
  /* position: absolute; */
  z-index: 10;
  transition: all 0.5s;
  /* background-color: none; */
}







#ms section.primary-1 {
  background: #001cffa6;
  color: #FFF;
}

#ms section.primary-1::before {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url('../img/primary_bg-2.jpg'); /* Фallback для браузеров без поддержки image-set */
  /* background-image: image-set(
      url('../img/primary_bg.avif') type('image/avif'),
      url('../img/primary_bg.jpg') type('image/jpeg')
  );  */
  filter: blur(0.1rem);
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -2;
  height: 100%;
}
#ms section.primary-1::after {
  background-position: center;
  background-size: 1.5rem;
  background-image: url(../img/set.png);
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
  opacity: 0.05;
  filter: blur(0.1rem);
} 

#ms section.primary-1 h1 {
text-transform: uppercase;
}
#ms section.primary-1 h2 {
text-transform: uppercase;
text-align: center;
}
#ms section.primary-1 h3 {
  padding: 0.25em 0 0.25em 15%;
}

#ms section.primary-1 h3::before {
  content: "\e81a";
  font-family: my_font;
  margin: 0 0.5em 0 -1.5em;
}

#ms section.primary-1 p {
  padding: 0 10% 0.75em 15%;
}

#ms section.primary-1 p>a {
  font-size: 110%;
  text-decoration: underline;
  text-decoration-style: solid;
  font-weight: bold;
}

#ms section.primary-1 a:hover {
  color: #14FF00;
  text-decoration-style: wavy;
}


/* PRODUCTS STYLES #################### */

#ms section.products {
  color: var(--font_color);
  --col_gap: 20px;
}
#ms section.products .product_img {
  display: flex;
  flex-shrink: 0;
}
@media (max-width: 768px) {
    #ms section.products .product_img {
        display: none;
    }  
}
#ms section.products .buttons {
  justify-content: space-between;
  align-items: baseline;
}
#ms section.products .buttons > button {
  padding: 10px 30px;
  font-size: 110%;
  background: linear-gradient(176.85deg,#d7c97e 9.84%,#d1aa4f 102.94%);;
  color: #000;
  border: none;
  cursor: pointer;
  box-shadow: 0px 2px 4px #5e5e5e;
}
#ms section.products .buttons > button:hover {
  background: #d7c97e;
}


div[data-basket_block] {
  width: 100%;
}

        /* Общие стили для таблицы */
        .table-container {
            display: flex;
            flex-direction: column;
            max-width: 100%;
            position: relative; /* Контейнер для фиксированного заголовка */
            margin-bottom: 40px; /* Отступ между таблицами */
            overflow-x: auto;
        }

        .table-row {
            display: flex;
            flex-wrap: nowrap; /* Не ломать макет */
            border-bottom: 1px solid #ccc;
            margin-bottom: 0px;
        }

        .table-cell {
            flex: 1;
            min-width: 120px;
            padding: 10px;
            border: 1px solid #ccc;
            box-sizing: border-box;
            /* Убираем белый фон из ячеек, чтобы фон ряда был виден */
            /* background-color: transparent; */
			background-color: inherit;
            text-align: center;
			align-content: center;
        }

        .header-cell {
            background-color: #d7c97e;
            font-weight: bold;
            color: #000;
        }

        /* Фиксируем заголовок относительно контейнера таблицы */
        .table-header-row {
            position: sticky; /* "Липский" заголовок */
            top: 0; /* Прилипает к верху контейнера */
            z-index: 1;
            /*! box-shadow: 0 2px 5px rgba(0,0,0,0.2); */
            border-top: 1px solid #ccc; /* Добавляем верхнюю границу */
        }

        /* Zebra-стили для рядов данных (начиная со второго ряда в DOM - это первый ряд данных) */
        /* .table-container > .table-row:nth-child(n+2) - выбирает все ряды, кроме первого (заголовка) */
        /* Для четных рядов данных (2-й, 4-й, 6-й и т.д. в списке после заголовка) */
        .table-container > .table-row:nth-child(even) {
            background-color: #fff; /* Белый для четных */
        }

        /* Для нечетных рядов данных (1-й, 3-й, 5-й и т.д. в списке после заголовка) */
        .table-container > .table-row:nth-child(odd):not(.table-header-row) {
            background-color: #efe9cb; /* Светло-оранжевый для нечетных */
        }

        /* Hover-эффект для рядов данных */
        .table-row:hover {
            background-color: #d7c97e !important; /* Яркий цвет при наведении, важнее zebra */
        }

        /* Адаптивность для мобильных устройств */
        @media (max-width: 768px) {
            body {
                /* margin: 10px; */
            }

            .table-row {
                /* Остается горизонтальной структурой */
				border-bottom: 0px solid #ccc;
            }

            /* Порядок ячеек на мобильных */
            .table-row > :nth-child(1) { order: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 130px;} /* Продукция */
            .table-row > :nth-child(5) { order: 1; } /* Цена - теперь вторая */
            .table-row > :nth-child(2) { order: 2; } /* Длина */
            .table-row > :nth-child(3) { order: 3; } /* Ширина */
            .table-row > :nth-child(4) { order: 4; } /* Высота */
            .table-row > :nth-child(6) { order: 20; display: none; } /* Количество - скрываем */

            /* Для заголовка */
            .table-header-row > :nth-child(1) { order: 0; } /* Продукция */
            .table-header-row > :nth-child(5) { order: 1; } /* Цена */
            .table-header-row > :nth-child(2) { order: 2; } /* Длина */
            .table-header-row > :nth-child(3) { order: 3; } /* Ширина */
            .table-header-row > :nth-child(4) { order: 4; } /* Высота */
            .table-header-row > :nth-child(6) { order: 20; } /* Количество - не скрываем заголовок */

            /* Показываем кнопки под названием на мобильной версии */
            .table-row > :nth-child(1) .quantity-control-mobile {
                display: flex;
            }

            /* Скрываем кнопки в последней ячейке на мобильной версии */
            .table-row > :nth-child(6) .quantity-control {
                display: none;
            }

            .table-cell {
                min-width: 80px; /* Уменьшаем минимальную ширину для мобильных */
                padding: 8px 5px;
                /* padding: 4px 5px; */
            }

            /* Zebra-стили для мобильных */
            .table-container > .table-row:nth-child(even) {
                background-color: #fff;
            }

            .table-container > .table-row:nth-child(odd):not(.table-header-row) {
                background-color: #efe9cb;
            }

            /* Hover-эффект для мобильных (может не работать на сенсорных устройствах) */
            /* .table-row:hover {
                background-color: #c2e9ff !important;
            } */
        }

        /* Стили для кнопок +/- и отображения количества */
        .quantity-control {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .quantity-control-mobile {
            display: none; /* Скрываем на десктопе */
            align-items: center;
            justify-content: center;
            margin-top: 10px;
            /* margin-top: 0px; */
			width: 100%;
        }

        .qty-btn {
            width: 30px;
            height: 30px;
            font-size: 18px;
            line-height: 1;
            border: 1px solid #ccc;
            background-color: #f9f9f9;
            cursor: pointer;
            user-select: none; /* Запрещаем выделять текст кнопок */
        }

        .qty-btn:hover {
            background-color: #e0e0e0;
        }

        .qty-display {
            width: 40px;
            text-align: center;
            margin: 0 5px;
            font-weight: bold;
        }

        /* Стили для кнопки и модального окна */
        #orderButton {
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
            margin-top: 20px;
        }
        #orderButton:hover {
            background-color: #45a049;
        }
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
        }
        .modal-content {
            background-color: #fefefe;
            margin: 15% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 60%;
            max-width: 500px;
            max-height: 80vh;
            overflow-y: auto;
        }
        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }
        .close:hover {
            color: black;
        }

        /* Стили для таблицы заказа в модальном окне */
        .order-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }

        .order-table th, .order-table td {
            border: 1px solid #ccc;
            padding: 8px;
            text-align: center;
        }

        .order-table th {
            background-color: #5ab9ff;
            color: white;
        }

        .order-table-row {
            background-color: #fff;
        }

        .order-table-row:nth-child(even) {
            background-color: #f9f9f9;
        }

        .order-quantity-control {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .order-qty-btn {
            width: 25px;
            height: 25px;
            font-size: 14px;
            line-height: 1;
            border: 1px solid #ccc;
            background-color: #f9f9f9;
            cursor: pointer;
            user-select: none;
            margin: 0 2px;
        }

        .order-qty-btn:hover {
            background-color: #e0e0e0;
        }

        .order-qty-display {
            width: 30px;
            text-align: center;
            margin: 0 2px;
            font-weight: bold;
        }

        /* Стили для встроенного блока заказа в форму */
        .embedded-order-block {
            margin: 0 0 25px;
            padding: 15px 0;
            /* margin: 20px 0;
            padding: 15px;
            border: 1px solid #ddd;
            background-color: #fafafa;
            border-radius: 4px; */
        }

        .embedded-order-title {
            font-size: 1.1em;
            font-weight: bold;
            margin-bottom: 10px;
            color: #333;
        }

        .embedded-order-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 8px;
        }

        .embedded-order-table th,
        .embedded-order-table td {
            border: 1px solid #ccc;
            padding: 6px 4px;
            text-align: center;
            font-size: 0.9em;
        }

        .embedded-order-table th {
            background-color: #d7c97e;
            font-weight: bold;
        }

        .embedded-order-table-row {
            background-color: #fff;
        }

        .embedded-order-table-row:nth-child(even) {
            background-color: #efe9cb;
        }

        .embedded-order-quantity-control {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2px;
        }

        #ms div.form-wrapper form button.embedded-order-qty-btn {
            background: initial;
            padding: initial;
            color: inherit;
            border-radius: initial;
            flex-grow: initial;
            box-shadow: initial;
            margin: inherit;
            font-weight: initial;
            font-family: inherit;

            width: 22px !important;
            height: 22px !important;
            font-size: 12px !important;
            line-height: 1 !important;
            border: 1px solid #ccc !important;
            background-color: #f9f9f9 !important;
            cursor: pointer;
            user-select: none;
        }

        .embedded-order-qty-btn:hover {
            background-color: #e0e0e0;
        }

        .embedded-order-qty-display {
            width: 26px;
            text-align: center;
            margin: 0 1px;
            font-weight: bold;
            font-size: 0.9em;
        }

        .embedded-order-total {
            text-align: right;
            margin-top: 10px;
            font-weight: bold;
            font-size: 1em;
        }

        .embedded-order-empty-message {
            text-align: center;
            color: #666;
            font-style: italic;
            padding: 10px 0;
        }
 








/* STAGES-1 STYLES #################### */

#ms section.stages-1 {
  color: var(--font_color);
  --col_gap: 20px;
}

#ms section.stages-1::before {
  background-position: center;
  background-size: 0.5em;
  background-image: url(../img/set.png);
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -3;
  height: 100%;
}
#ms section.stages-1::after {
  background-color: #fffffff2;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -3;
  height: 100%;
}

#ms .stages-1 h3::before {
  content: attr(data-content);
  padding: 0 0.5em 0 0;
  font-size: 150%;
  color: #007cff94;
}
#ms section.stages-1 > div {
justify-content: center;
}

#ms section.stages-1 .bg-img::after {
  content: "";
  position: absolute;
  background-image: linear-gradient(to right, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0.5) 100%);
  background-position: center;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  filter: blur(0.1rem);
  height: 100%;
  border: 1px solid #fff;
}


/* PORTFOLIO STYLES #################### */

#ms section.portfolio {
  color: var(--font_color);
  --col_gap: 20px;
}

#ms section.portfolio ol {
  display: block;
  width: 100%;
}


/* GUESTIONS STYLES #################### */


/* GUESTIONS STYLES #################### */

#ms section.questions {
  color: var(--font_color);
}
#ms section.questions::before {
  background-position: center;
  background-size: 0.5em;
  background-image: url(../img/set.png);
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
}
#ms section.questions::after {
  background-color: #ffffff;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
}
#ms div.questions__item {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto 1em;
  position: relative;
}
#ms p.questions__item__question {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 110%;
  color: #30b36e;
  padding: 0 0.75em;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
}
#ms ol.questions__item__list {
  padding: 0 0.75em;
}
#ms ol.questions__item__list > li {
  display: list-item;
  list-style: disc;
  list-style-position: inside;
}


/* CONTACTS STYLES #################### */

#ms section.contacts-1 {
  color: var(--font_color);
  --col_gap: 20px;
}
#ms section.contacts-1::before {
  background-position: center;
  background-size: 0.5em;
  background-image: url(../img/set.png);
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
}
#ms section.contacts-1::after {
  background-color: #fffffff2;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
}
#ms section.contacts-1 > div {
  justify-content: center;
}

#ms footer {
margin: 0 0 3em;
}


/* FORM BUTTON STYLES #################### */

#ms div.form-wrapper form > button {
  background: linear-gradient(176.85deg,#d7c97e 9.84%,#d1aa4f 102.94%);
  color: #000;
  box-shadow: 0 0.07em 0.07em rgba(0, 0, 0, 0.25);
  padding: 0.76em 0.5em;
}

#ms div.form-wrapper form > button:hover {
  background: #d7c97e;
  color: #000;
  box-shadow: 0 0.07em 0.07em rgba(0, 0, 0, 0.25);
}

/* BASKET STYLES #################### */

#ms section.basket {
  position: fixed;
  z-index: 1;
  bottom: 0;
  background: #386093;
  color: #FFF;
  display: flex;
  height: auto;
  margin: 0;
  align-items: center;
  padding: 10px;
}

    #ms section.basket div {
        flex-direction: row;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #ms section.basket> :nth-child(1) {
        flex-grow: 3;
    }

    #ms section.basket> :nth-child(2) {
        flex-grow: 1;
        font-size: 150%;
        color: #d7c97e;
    }

    #ms section.basket> :nth-child(3) {
        flex-grow: 1;
        font-size: 150%;
        color: #d7c97e;
    }

    #ms section.basket p {
        padding: 0;
        cursor: pointer;
    }

    #ms section.basket span.quantumTotal::before {
        display: flex;
        align-self: center;
        font-family: 'Font Awesome 5 Free';
        content: '\f07a';
        font-weight: 900;
        font-size: 200%;
        color: #d7c97e;
        padding: 0;
        z-index: -2;
    }

    #ms section.basket span.quantumTotal::after {
        content: attr(data-quantumTotal);
        display: flex;
        background-color: #ff0000;
        color: white;
        border-radius: 50%;
        width: 25px;
        height: 25px;
        font-size: 80% !important;
        font-weight: bold;
        z-index: -1;
        align-items: center;
        align-self: baseline;
        justify-content: center;
        margin-left: -10px;
    }

    #ms section.basket span.quantumTotal {
        display: flex;
        padding: 0 0.5em 0 0;
        cursor: pointer;
    }
