/* Reagents */

:root {
    --rx-accent: #149284;
    --rx-accent-dark: #149284;
    --rx-border: #e1e4e8;
    --rx-text: #1f2937;
    --rx-rowbg: #f9fafb;
}


.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0
}

.tag-item {
    display: block;
    background: #fff;
    padding: 12px 18px;
    text-decoration: none;
    text-align: center;
    color: #004237;
    font-size: 12px;
    font-weight: 600;
    line-height: 125%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    transition: background .25s ease, color .25s ease;
    flex: 1 1 auto;
    min-width: 200px;
    word-break: break-word;
}

.tag-item:hover, .tag-item.active {
    background: var(--rx-accent);
    color: #fff
}

@media (max-width: 768px) {
    .tag-item {
        flex: 1 1 100%;
        min-width: 100%
    }
}


.reagents-panel {
    display: none
}

.reagents-panel.is-visible {
    display: block;
    animation: rxFadeIn .28s ease both;
}

@keyframes rxFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}


.rx-wrap {
    margin: 24px auto;
    font-family: sans-serif
}

.rx-link {
    color: var(--rx-accent);
    text-decoration: none;
}

.rx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    color: var(--rx-text);
    font-family: 'Montserrat', sans-serif;
}

.rx-table th, .rx-table td {
    border: 1px solid var(--rx-border);
    padding: 12px 14px;
    text-align: left;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
}

.rx-table thead th {
    background: var(--rx-accent-dark);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-align: center; /* 🔹 вирівнює заголовок по центру */
    vertical-align: middle; /* 🔹 вирівнює по вертикалі */
}

.rx-table tbody tr:nth-child(even) td {
    background: transparent;
}


.rx-mobile {
    display: none;
}

@media (max-width: 768px) {
    .rx-table {
        display: none;
    }

    .rx-mobile {
        display: block;
        font-size: 15px;
        color: var(--rx-text);
        font-family: 'Montserrat', sans-serif;
    }

    .rx-m-head {
        display: grid;
        grid-template-columns:140px 1fr 40px;
        background: var(--rx-accent-dark);
        color: #fff;
        font-weight: 600;
        font-size: 11px;
        margin-bottom: 10px;
        overflow: hidden;
        text-align: center;
    }

    .rx-m-head > div {
        padding: 10px 12px;
    }

    .rx-m-head > div:last-child {
        text-align: center;
    }

    .rx-m-item {
        border: 1px solid var(--rx-border);
        background: transparent;
        margin-top: 8px;
        overflow: hidden;
    }

    .rx-m-row {
        display: grid;
        grid-template-columns:140px 1fr 40px;
        align-items: center;
        cursor: pointer;
        border-bottom: 1px solid var(--rx-border);
        background: transparent;
    }

    .rx-m-row > div {
        padding: 12px;
        font-weight: 400;
        font-size: 10px;
    }

    .rx-maker {
        font-weight: 600;
    }

    .rx-title {
        font-weight: 500;
    }

    .rx-caret {
        text-align: center;
        font-size: 18px;
        transition: transform .25s ease;
        transform: rotate(180deg);
    }

    .rx-m-row[aria-expanded="true"] .rx-caret {
        transform: rotate(0deg);
    }

    .rx-m-row[aria-expanded="true"] .rx-title {
        font-weight: 600;
    }

    .rx-m-row[aria-expanded="true"] .rx-maker {
        font-weight: 500;
    }

    .rx-m-panel-inner > div {
        font-size: 11px;
    }

    .rx-m-panel {
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height .3s ease, opacity .2s ease;
        background: #fff;
    }

    .rx-m-panel-inner {
        display: grid;
        grid-template-columns:1fr 1fr;
        padding: 12px;
        gap: 10px 20px;
    }

    .rx-m-panel-inner b {
        display: block;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .rx-m-panel.show {
        opacity: 1;
    }
}

.rx-m-panel-inner b {
    color: #A1A1A1;
    font-size: 8px;
    font-weight: 500;
}

/* ПОЧАТОК КОДУ - ДМИТРОВ ОЛЕГ
/* ========================================
   Ширина колонок у таблиці реагентів (веб-версія)
   ======================================== */

.rx-table th:nth-child(1),
.rx-table td:nth-child(1) {
    width: 120px; /* Виробник */
}

.rx-table th:nth-child(2),
.rx-table td:nth-child(2) {
    width: 90px; /* Каталоговий номер */
    white-space: nowrap;
}

.rx-table th:nth-child(3),
.rx-table td:nth-child(3) {
    width: auto; /* Назва — гнучка */
}

.rx-table th:nth-child(4),
.rx-table td:nth-child(4) {
    width: 130px; /* Термін придатності */
}

.rx-table th:nth-child(5),
.rx-table td:nth-child(5) {
    width: 160px; /* Ціна — ширша */
    text-align: right;
}

.rx-table th:nth-child(6),
.rx-table td:nth-child(6) {
    width: 140px; /* Акційна ціна */
    text-align: right;
}

/* Центрування колонок Ціна та Акційна ціна */
.rx-table th:nth-child(5),
.rx-table th:nth-child(6) {
    text-align: center;
}

/* Reagents Search */
.reagents-search .search-wrap {
    position: relative;
}

.reagents-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .6;
}

.reagents-search input {
    flex: 1;
    min-width: 240px;
    border: 1.5px solid transparent;
    outline: none;
    padding: 10px 12px 10px 40px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}