*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, Arial, sans-serif;
    background: #fff;
    color: #000;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}


/* Шапка — как на главной */
:root {
    --header-height: 96px;
}
.btn-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}


.site-header {
    background-color: #f5f5f5;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    height: var(--header-height);
    position: relative;
    z-index: 20;
}

.header-inner {
    height: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 32px;
    position: relative;
}

/* Левая часть */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
}

.brand-subtitle {
    font-size: 12px;
    color: #757575;
}

/* Меню (desktop) */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: #000;
    font-size: 14px;
    padding: 6px 0;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: #ffb300;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link--active {
    font-weight: 600;
}

/* Правая часть (на будущее, если понадобится) */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 13px;
}

.header-line {
    white-space: nowrap;
}

.header-contacts {
    display: flex;
    gap: 16px;
}

.header-phone::before {
    content: "☎ ";
    font-size: 12px;
}

.header-email::before {
    content: "✉ ";
    font-size: 12px;
}

/* Кнопка меню (моб.) */

.menu-toggle {
    display: none;
    border: none;
    background-color: #ffb300;
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background-color: #000;
    position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-toggle-icon::before {
    top: -6px;
}

.menu-toggle-icon::after {
    top: 6px;
}

/* Мобильное меню */

.mobile-menu {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 40;
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-panel {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
    padding-top: 16px;
}

.menu-close {
    border: none;
    background-color: #ffb300;
    width: 44px;
    height: 44px;
    margin-left: 24px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.menu-close-icon,
.menu-close-icon::before {
    position: relative;
    display: block;
    width: 18px;
    height: 2px;
    background-color: transparent;
}

.menu-close-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, #000 0 0) content-box,
                linear-gradient(-45deg, #000 0 0) content-box;
}

.mobile-menu-item {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    color: #000;
    text-decoration: none;
    border-top: 1px solid #eeeeee;
}

.mobile-menu-item:last-child {
    border-bottom: 1px solid #eeeeee;
}

.mobile-menu-item:hover {
    background-color: #fafafa;
}

/* Контент каталога */
.page-main {
    padding: 32px 0 48px;
}

.page-title {
    font-size: 32px;
    margin-bottom: 22px;
}

/* Сетка каталога */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 22px;
}

/* Карточка */
.product-card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.product-image-wrap {
    width: 100%;
    padding-top: 70%;
    position: relative;
}

.product-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-name {
    margin-top: 10px;
    font-size: 16px;
    color: #1976d2;
    min-height: 46px;
}

/* Характеристики — маркеры */
.product-params {
    margin: 12px 0;
    padding-left: 18px;
    font-size: 13px;
    color: #444;
}

.product-params div {
    position: relative;
    margin-bottom: 6px;
    line-height: 1.45;
}

.product-params div::before {
    content: "•";
    position: absolute;
    left: -12px;
    top: 0;
    font-size: 16px;
    color: #ffb300;
}

/* Цена */
.product-price {
    margin: 10px 0;
    font-weight: 700;
    font-size: 20px;
}

/* Кнопка */
.product-actions {
    margin-top: auto;
}

.btn {
    width: 100%;
    background: #2962ff;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn:hover {
    background: #1e4bd3;
}

/* Модальное окно (как на главной) */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 50;
}

.modal.open {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
}

.modal-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px 24px 20px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 20px;
}

.modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

/* Форма в модалке */

.order-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.order-form input {
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #bdbdbd;
    font-size: 14px;
}

.order-form input:focus {
    outline: none;
    border-color: #ffb300;
}

.submit-btn {
    margin-top: 6px;
    width: 100%;
}

/* Адаптивность */

@media(max-width:1024px){
    .product-grid { grid-template-columns: repeat(3,1fr); }
}

@media(max-width:768px){
    .header-inner {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        row-gap: 6px;
    }

    .header-left {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .header-right {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        align-items: center;
        text-align: center;
        gap: 2px;
        font-size: 13px;
    }

    .header-line {
        white-space: normal;
    }

    .header-contacts {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        justify-self: end;
    }

    .product-grid { grid-template-columns: repeat(2,1fr); }
}

@media(max-width:480px){
    .container {
        padding: 0 16px;
    }
    .product-grid { grid-template-columns: 1fr; }
}