:root {
            --bg: #f7faf9;
            --surface: #ffffff;
            --surface-soft: #f1f6f4;

            --text: #1f3437;
            --text-soft: #667a7d;
            --text-muted: #9aa9ab;

            --line: #e2ebe8;

            --primary: #219b7b;
            --primary-dark: #167a60;
            --primary-soft: #e7f5f1;

            --shadow: 0 8px 24px rgba(22, 42, 46, 0.06);

            --container: 1320px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        button,
        input,
        select {
            font: inherit;
        }

        .container {
            max-width: var(--container);
            width: 100%;
            margin: 0 auto;
            padding: 0 24px;
        }

        .header {
            position: sticky;
            top: 0;
            z-index: 100;
            background: var(--surface);
            border-bottom: 1px solid var(--line);
            padding: 12px 0;
        }

        .header-row {
            display: grid;
            grid-template-columns: auto auto 1fr;
            align-items: center;
            gap: 18px;
        }

        .logo-area {
            display: flex;
            align-items: center;
            gap: 11px;
            min-width: max-content;
            text-decoration: none;
            color: inherit;
        }

        .logo-icon {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 17px;
        }

        .logo-text-wrap {
            line-height: 1.05;
        }

        .logo-text {
            font-size: 21px;
            font-weight: 800;
            letter-spacing: -0.04em;
        }

        .logo-text span {
            color: var(--primary);
        }

        .logo-sub {
            margin-top: 4px;
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .logo-area-svg {
            gap: 0;
            flex-shrink: 0;
        }

        .site-logo-svg {
            display: block;
            width: 220px;
            height: auto;
        }

        @media (max-width: 1180px) {
            .header-row {
                grid-template-columns: auto auto 1fr;
                gap: 14px;
            }

            .site-logo-svg {
                width: 205px;
            }

            .header-link {
                padding: 8px 10px;
                font-size: 12px;
            }
        }

        @media (max-width: 980px) {
            .header-row {
                grid-template-columns: auto 1fr;
                gap: 12px;
            }

            .header-location {
                justify-self: end;
            }

            .header-actions {
                grid-column: 1 / -1;
                justify-content: flex-start;
                gap: 7px;
            }

            .site-logo-svg {
                width: 220px;
            }
        }

        @media (max-width: 640px) {
            .header {
                padding: 10px 0;
            }

            .header-row {
                grid-template-columns: 1fr auto;
                gap: 10px;
                align-items: center;
            }

            .logo-area-svg {
                min-width: 0;
            }

            .site-logo-svg {
                width: 185px;
                max-width: 100%;
                height: auto;
            }

            .header-location {
                justify-self: end;
            }

            .region-select {
                padding: 8px 11px;
                font-size: 13px;
            }

            .header-actions {
                grid-column: 1 / -1;
                justify-content: flex-start;
                gap: 6px;
            }

            .header-link {
                padding: 8px 10px;
                font-size: 12px;
            }
        }

        @media (max-width: 460px) {
            .container {
                padding: 0 14px;
            }

            .site-logo-svg {
                width: 165px;
            }

            .region-select {
                max-width: 150px;
            }

            .region-select span {
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .header-actions {
                display: grid;
                grid-template-columns: repeat(5, minmax(0, 1fr));
                width: 100%;
            }

            .header-link {
                position: relative;
                width: 100%;
                min-height: 40px;
                justify-content: center;
                padding: 0;
                gap: 0;
            }

            .header-link span:not(.badge) {
                display: none;
            }

            .header-link .badge {
                position: absolute;
                top: -4px;
                right: -2px;
            }

            .header-link i {
                font-size: 15px;
            }
        }

        @media (max-width: 360px) {
            .site-logo-svg {
                width: 148px;
            }

            .region-select {
                max-width: 132px;
                padding: 8px 10px;
            }
        }

        .header-location {
            position: relative;
        }

        .region-select {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            padding: 9px 14px;
            border-radius: 999px;
            background: var(--surface-soft);
            border: 1px solid var(--line);
            color: var(--text);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
        
            transition: all .18s ease;
        }
        
        .region-select:hover {
            background: var(--primary-soft);
            border-color: var(--primary);
            color: var(--primary-dark);
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(33,155,123,.08);
        }
        
        .region-select i:first-child {
            color: var(--primary);
        }
        
        .region-select:hover i:first-child,
        .region-select:hover .fa-chevron-down {
            color: var(--primary-dark);
        }

        .header-actions {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .header-link {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 9px 12px;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-soft);
            cursor: pointer;
            transition: 0.2s;
            text-decoration: none;
        }

        .header-link:hover {
            background: var(--surface-soft);
            color: var(--text);
        }

        .header-link i {
            color: var(--primary);
            font-size: 14px;
        }

        .header-link.user-link {
            background: var(--primary);
            color: white;
            border: 1px solid var(--primary);
        }

        .header-link.user-link i {
            color: white;
        }

        .header-link.user-link:hover {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
            color: #fff;
            box-shadow: 0 8px 20px rgba(33, 155, 123, .18);
            transform: translateY(-1px);
        }

        .header-link.active {
            color: var(--primary-dark);
        }
        
        .header-link.active::after {
            content: "";
            position: absolute;
        
            left: 10px;
            right: 10px;
            bottom: -8px;
        
            height: 3px;
            border-radius: 3px;
        
            background: var(--primary);
        }

        .account-login-btn {
            border: none;
        }

        .account-modal-card {
            width: min(440px, calc(100% - 32px));
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 24px;
            padding: 24px;
            box-shadow: 0 20px 60px rgba(22, 42, 46, 0.18);
        }

        .account-modal-icon {
            width: 48px;
            height: 48px;
            border-radius: 16px;
            background: var(--primary-soft);
            color: var(--primary-dark);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            margin-bottom: 14px;
        }

        .account-modal-title {
            font-size: 22px;
            font-weight: 800;
            letter-spacing: -.03em;
            margin-bottom: 7px;
        }

        .account-modal-text {
            color: var(--text-soft);
            font-size: 14px;
            line-height: 1.55;
            margin-bottom: 16px;
        }

        .account-form {
            display: grid;
            gap: 12px;
        }

        .account-field label {
            display: block;
            margin-bottom: 7px;
            font-size: 13px;
            font-weight: 800;
            color: var(--text);
        }

        .account-input {
            width: 100%;
            min-height: 46px;
            border: 1px solid var(--line);
            border-radius: 14px;
            background: var(--surface);
            padding: 11px 13px;
            outline: none;
            color: var(--text);
            font-size: 15px;
        }

        .account-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(33,155,123,.12);
        }

        .account-input.is-invalid {
            border-color: #e54848;
            background: #fffafa;
            box-shadow: 0 0 0 3px rgba(229,72,72,.08);
        }

        .account-error {
            display: none;
            font-size: 12px;
            font-weight: 700;
            color: #b42323;
            line-height: 1.4;
        }

        .account-error.active {
            display: block;
        }

        .account-submit {
            min-height: 46px;
            border: none;
            border-radius: 14px;
            background: var(--primary);
            color: #fff;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            transition: .2s;
        }

        .account-submit:hover {
            background: var(--primary-dark);
        }

        .account-submit:disabled {
            opacity: .65;
            cursor: not-allowed;
        }

        .account-secondary-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
        }

        .account-link-btn {
            border: none;
            background: transparent;
            color: var(--primary-dark);
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            padding: 0;
        }

        .account-link-btn:hover {
            text-decoration: underline;
        }

        .account-timer {
            font-size: 13px;
            color: var(--text-soft);
            font-weight: 700;
        }

        .badge {
            min-width: 19px;
            height: 19px;
            padding: 0 6px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--primary-soft);
            color: var(--primary-dark);
            font-size: 11px;
            font-weight: 800;
        }

        .city-dropdown {
            position: absolute;
            top: calc(100% + 10px);
            left: 0;
            width: 290px;
            display: none;
            overflow: hidden;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 18px;
            box-shadow: var(--shadow);
            z-index: 200;
        }

        .city-dropdown.active {
            display: block;
        }

        .city-search {
            padding: 14px;
            background: var(--surface-soft);
            border-bottom: 1px solid var(--line);
        }

        .city-search input {
            width: 100%;
            padding: 11px 13px;
            border-radius: 12px;
            border: 1px solid var(--line);
            outline: none;
            color: var(--text);
            background: var(--surface);
            font-size: 14px;
        }

        .city-list {
            display: block;
            max-height: 260px;
            overflow-y: auto;
            background: var(--surface);
        }

        .city-item {
            display: block;
            width: 100%;
            padding: 12px 15px;
            color: var(--text);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            line-height: 1.3;
            border-bottom: 1px solid var(--line);
            background: var(--surface);
        }

        .city-item:last-child {
            border-bottom: none;
        }

        .city-item:hover {
            background: var(--surface-soft);
            color: var(--text);
        }

        .city-item.active {
            background: var(--primary-soft);
            color: var(--primary-dark);
            font-weight: 800;
            cursor: default;
        }

        .main-layout {
            display: grid;
            grid-template-columns: 260px minmax(0, 1fr);
            gap: 24px;
            margin: 24px 0 36px;
        }

        .sidebar {
            align-self: start;
            position: sticky;
            top: 84px;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 22px;
            padding: 18px;
        }

        .sidebar-title {
            font-size: 15px;
            font-weight: 800;
            margin-bottom: 10px;
        }

        .sidebar-note {
            font-size: 13px;
            color: var(--text-soft);
            line-height: 1.55;
            margin-bottom: 16px;
        }

        .category-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .category-search {
            display: flex;
            align-items: center;
            gap: 9px;
            min-height: 42px;
            margin-bottom: 10px;
            padding: 0 12px;
            border: 1px solid var(--line);
            border-radius: 14px;
            background: var(--surface-soft);
        }

        .category-search i {
            color: var(--primary);
            font-size: 13px;
        }

        .category-search input {
            width: 100%;
            border: none;
            outline: none;
            background: transparent;
            color: var(--text);
            font-size: 13px;
            font-weight: 600;
        }

        .category-search input::placeholder {
            color: var(--text-muted);
        }

        .category-list-scroll {
            max-height: 322px;
            overflow-y: auto;
            padding-right: 4px;
            scrollbar-width: thin;
        }

        .category-list-scroll::-webkit-scrollbar {
            width: 6px;
        }

        .category-list-scroll::-webkit-scrollbar-thumb {
            background: #cbded9;
            border-radius: 999px;
        }

        .category-item.is-hidden {
            display: none;
        }


        .category-item {
            display: flex;
            align-items: center;
            gap: 11px;
            padding: 11px 12px;
            border-radius: 14px;
            color: var(--text-soft);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: 0.2s;
        }

        .category-item i {
            width: 27px;
            height: 27px;
            flex-shrink: 0;
            border-radius: 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--primary-soft);
            color: var(--primary);
            font-size: 13px;
        }

        .category-item:hover {
            background: var(--surface-soft);
            color: var(--text);
        }

        .content {
            min-width: 0;
        }

        .search-card {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 22px;
            padding: 22px;
            box-shadow: var(--shadow);
            margin-bottom: 24px;
        }

        .search-card-top {
            margin-bottom: 18px;
        }

        .search-card-title {
            font-size: 18px;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .search-card-text {
            margin-top: 5px;
            font-size: 13px;
            color: var(--text-soft);
            line-height: 1.5;
        }

        .search-tabs {
            display: inline-flex;
            gap: 6px;
            padding: 5px;
            border-radius: 16px;
            background: var(--surface-soft);
            margin-bottom: 16px;
            flex-wrap: wrap;
        }

        .tab {
            background: transparent;
            border: none;
            padding: 9px 14px;
            border-radius: 12px;
            cursor: pointer;
            color: var(--text-soft);
            font-size: 13px;
            font-weight: 700;
            transition: 0.2s;
        }

        .tab.active {
            background: var(--surface);
            color: var(--text);
            border: 1px solid var(--line);
        }


        .tab:hover:not(.active) {
            background: var(--surface);
            color: var(--text);
            box-shadow: 0 1px 0 rgba(22,42,46,.04);
        }

        .search-wrapper {
            position: relative;
        }

        .search-bar {
            display: flex;
            align-items: center;
            min-height: 64px;
            padding: 7px;
            border-radius: 18px;
            background: var(--surface);
            border: 1px solid var(--line);
            transition: 0.2s;
        }

        .search-bar:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(33,155,123,0.12);
        }

        .search-icon {
            width: 50px;
            flex-shrink: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--primary);
            font-size: 17px;
        }

        .search-bar input {
            flex: 1;
            min-width: 0;
            border: none;
            outline: none;
            background: transparent;
            padding: 0 10px 0 0;
            color: var(--text);
            font-size: 15px;
        }

        .search-bar input::placeholder {
            color: var(--text-muted);
        }

        .search-btn {
            height: 48px;
            padding: 0 22px;
            border-radius: 14px;
            border: none;
            background: var(--primary);
            color: white;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 9px;
            transition: 0.2s;
        }

        .search-btn:hover {
            background: var(--primary-dark);
        }

        .suggest {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            display: none;
            max-height: 300px;
            overflow-y: auto;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 18px;
            box-shadow: var(--shadow);
            z-index: 50;
        }

        .suggest-item {
            padding: 14px 17px;
            display: flex;
            justify-content: space-between;
            gap: 10px;
            border-bottom: 1px solid var(--line);
            color: var(--text);
            font-size: 14px;
            cursor: pointer;
        }

        .suggest-item:last-child {
            border-bottom: none;
        }

        .suggest-item:hover {
            background: var(--surface-soft);
        }

        .results-section {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 22px;
            padding: 22px;
            margin-bottom: 24px;
        }

        .results-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
            flex-wrap: wrap;
        }

        .results-header-left h3 {
            font-size: 18px;
            font-weight: 800;
            margin-bottom: 5px;
        }

        .results-count {
            font-size: 14px;
            color: var(--text-soft);
            font-weight: 600;
        }

        .sort-select {
            padding: 10px 13px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: var(--surface);
            color: var(--text);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            outline: none;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
            gap: 16px;
        }

        .product-card {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 18px;
            padding: 15px;
            cursor: pointer;
            transition: 0.2s;
        }

        .product-card:hover {
            border-color: #cbded9;
            box-shadow: var(--shadow);
            transform: translateY(-2px);
        }

        .product-img {
            width: 100%;
            height: 108px;
            margin-bottom: 12px;
            border-radius: 15px;
            background: var(--surface-soft);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .product-img i {
            font-size: 36px;
            color: var(--primary);
        }

        .product-name {
            font-size: 16px;
            font-weight: 800;
            margin-bottom: 8px;
        }

        .product-substance {
            font-size: 12px;
            line-height: 1.45;
            color: var(--text);
            margin-bottom: 7px;
        }

        .product-substance span {
            display: block;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .product-form {
            font-size: 12px;
            color: var(--text-soft);
            line-height: 1.45;
            margin-bottom: 10px;
        }

        .product-price-row {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 10px;
            margin-top: 12px;
        }

        .price-label {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 600;
            margin-bottom: 2px;
        }

        .product-price {
            font-size: 17px;
            font-weight: 800;
            color: var(--primary-dark);
        }

        .product-chip {
            padding: 7px 9px;
            border-radius: 999px;
            background: var(--primary-soft);
            color: var(--primary-dark);
            font-size: 11px;
            font-weight: 800;
            white-space: nowrap;
        }

        .product-action {
            width: 100%;
            margin-top: 14px;
            height: 40px;
            border: none;
            border-radius: 12px;
            background: var(--primary-soft);
            color: var(--primary-dark);
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            transition: 0.2s;
        }

        .product-action:hover {
            background: var(--primary);
            color: white;
        }

        .pagination {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin: 18px 0 24px;
        }

        .pagination a,
        .pagination strong {
            min-width: 38px;
            height: 38px;
            padding: 0 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: var(--surface);
            color: var(--text);
            text-decoration: none;
            font-size: 13px;
            font-weight: 700;
        }

        .pagination strong {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }

        .modal {
            position: fixed;
            inset: 0;
            background: rgba(20, 35, 38, 0.42);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            z-index: 1000;
            visibility: hidden;
            opacity: 0;
            transition: 0.2s;
        }

        .modal.active {
            visibility: visible;
            opacity: 1;
        }

        .modal-content {
            width: 100%;
            max-width: 640px;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 22px;
            padding: 24px;
            box-shadow: var(--shadow);
        }

        .modal-content-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
        }

        .modal-content h3 {
            font-size: 21px;
            font-weight: 800;
        }

        .close-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 12px;
            background: var(--surface-soft);
            color: var(--text);
            font-size: 24px;
            cursor: pointer;
        }

        .region-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 12px;
        }

        .region-item {
            padding: 13px 12px;
            border-radius: 14px;
            background: var(--surface);
            border: 1px solid var(--line);
            color: var(--text);
            font-size: 14px;
            font-weight: 700;
            text-align: center;
            cursor: pointer;
            text-decoration: none;
        }

        .region-item:hover {
            background: var(--surface-soft);
        }

        .footer {
            margin-top: auto;
            background: #20383b;
            color: rgba(255,255,255,0.72);
            padding: 44px 0 28px;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
            gap: 28px;
            max-width: var(--container);
            margin: 0 auto;
            padding: 0 24px;
        }

        .footer-col h4 {
            color: white;
            font-size: 14px;
            font-weight: 800;
            margin-bottom: 13px;
        }

        .footer-col a {
            display: block;
            color: rgba(255,255,255,0.66);
            text-decoration: none;
            margin: 8px 0;
            font-size: 13px;
        }

        .footer-col a:hover {
            color: white;
        }

        .footer-bottom {
            text-align: center;
            margin-top: 38px;
            font-size: 12px;
            color: rgba(255,255,255,0.5);
        }

        @media (max-width: 1100px) {
            .main-layout {
                grid-template-columns: 1fr;
            }

            .sidebar {
                position: static;
            }

            .category-list {
                flex-direction: row;
                flex-wrap: wrap;
            }

            .category-item {
                flex: 1 1 calc(50% - 8px);
                min-width: 220px;
            }
        }

        @media (max-width: 900px) {
            .hero-title {
                font-size: 30px;
            }

            .search-bar {
                flex-wrap: wrap;
            }

            .search-icon {
                width: 42px;
            }

            .search-bar input {
                min-height: 42px;
            }

            .search-btn {
                width: 100%;
                justify-content: center;
            }
        }

        @media (max-width: 640px) {
            .container {
                padding: 0 16px;
            }

            .hero {
                padding: 22px;
            }

            .hero-title {
                font-size: 27px;
            }

            .products-grid {
                grid-template-columns: 1fr;
            }

            .category-item {
                min-width: 100%;
            }

            .region-grid {
                grid-template-columns: 1fr;
            }
        }

        /* APTEKS PAGE */
        .apteks-page {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .apteks-head {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 22px;
            padding: 22px;
        }

        .apteks-title {
            font-size: 22px;
            line-height: 1.25;
            font-weight: 800;
            letter-spacing: -0.03em;
            margin-bottom: 8px;
        }

        .apteks-subtitle {
            color: var(--text-soft);
            font-size: 14px;
            line-height: 1.55;
        }

        .firm-filter {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 18px;
            padding: 16px;
        }

        .firm-filter-title {
            font-size: 14px;
            font-weight: 800;
            margin-bottom: 12px;
        }

        .firm-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .firm-item {
            display: inline-flex;
            align-items: center;
            min-height: 36px;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid var(--line);
            background: var(--surface);
            color: var(--text-soft);
            text-decoration: none;
            font-size: 13px;
            font-weight: 700;
            transition: 0.2s;
        }

        .firm-item:hover {
            background: var(--surface-soft);
            color: var(--text);
        }

        .firm-item.active {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }

        .apteks-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .apteka-card {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 20px;
            padding: 18px;
            transition: 0.2s;
        }

        .apteka-card:hover {
            border-color: #cbded9;
            box-shadow: var(--shadow);
        }

        .apteka-card-main {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 16px;
            align-items: start;
        }

        .apteka-name {
            font-size: 17px;
            font-weight: 800;
            margin-bottom: 7px;
            color: var(--text);
        }

        .apteka-address {
            font-size: 14px;
            line-height: 1.5;
            color: var(--text-soft);
            margin-bottom: 10px;
        }

        .apteka-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .apteka-meta span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 10px;
            border-radius: 999px;
            background: var(--surface-soft);
            color: var(--text-soft);
            font-size: 12px;
            font-weight: 700;
        }

        .apteka-meta i {
            color: var(--primary);
        }

        .apteka-price-box {
            min-width: 150px;
            text-align: right;
        }

        .apteka-price-label {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 700;
            margin-bottom: 3px;
        }

        .apteka-price {
            font-size: 22px;
            font-weight: 800;
            color: var(--primary-dark);
            white-space: nowrap;
        }

        .apteka-count {
            margin-top: 6px;
            font-size: 12px;
            color: var(--text-soft);
            font-weight: 700;
        }

        .apteka-actions {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            margin-top: 14px;
            flex-wrap: wrap;
        }

        .apteka-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 38px;
            padding: 9px 13px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: var(--surface);
            color: var(--text);
            text-decoration: none;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            transition: 0.2s;
        }

        .apteka-btn:hover {
            background: var(--surface-soft);
        }

        .apteka-btn.primary {
            background: var(--primary-soft);
            color: var(--primary-dark);
            border-color: var(--primary-soft);
        }

        .apteka-btn.primary:hover {
            background: var(--primary);
            color: #fff;
        }

        .apteks-empty {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 20px;
            padding: 28px;
            color: var(--text-soft);
            font-weight: 700;
        }

        @media (max-width: 700px) {
            .apteka-card-main {
                grid-template-columns: 1fr;
            }

            .apteka-price-box {
                text-align: left;
            }

            .apteka-actions {
                justify-content: flex-start;
            }
        }
        .firm-filter {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}

.firm-select-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.firm-select-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-soft);
}

.firm-select-wrap {
    position: relative;
}

.firm-select-wrap i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 12px;
}

.firm-select {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    padding: 0 42px 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
}

.firm-select:hover {
    border-color: #c8d7d2;
}

.firm-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31,122,107,0.08);
}

.firm-select optgroup {
    font-style: normal;
    font-weight: 800;
    color: var(--text);
    background: #f3f7f6;
}

.firm-select option {
    font-weight: 600;
    color: var(--text);
}

.drug-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    margin: 16px 0 20px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.drug-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: 0.2s;
}

.drug-tab i {
    font-size: 13px;
    color: var(--primary);
}

.drug-tab:hover {
    background: var(--surface);
    color: var(--text);
}

.drug-tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 0 rgba(22, 42, 46, 0.04);
}

@media (max-width: 640px) {
    .drug-tabs {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .drug-tab {
        justify-content: center;
    }
}

.description-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.description-modal.active {
    display: block;
}

.description-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 35, 38, 0.48);
}

.description-modal-card {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    margin: 24px auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(22, 42, 46, 0.2);
    padding: 24px;
}

.description-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.description-modal-close:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.description-modal-head {
    padding-right: 52px;
    margin-bottom: 18px;
}

.description-modal-head h3 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.description-modal-head p {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.description-modal-body {
    color: var(--text);
    font-size: 14px;
    line-height: 1.75;
}

.description-modal-body p {
    margin-bottom: 18px;
}

.description-modal .drug-facts {
    margin-top: 18px;
}

.description-page {
    max-width: 900px;
}

.description-head {
    margin-bottom: 24px;
}

.description-title {
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}

.description-subtitle {
    color: var(--text-soft);
    font-size: 15px;
}

.description-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
}

.description-block h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.description-block p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
}

.description-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.description-fact {
    background: var(--surface-soft);
    border-radius: 18px;
    padding: 16px;
}

.description-fact span {
    display: block;
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.description-fact strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.balloon-reserve-btn {
    margin-top: 7px;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 7px 9px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.balloon-reserve-btn:hover {
    background: var(--primary-dark);
}

.apteki-dir-tabs a {
    transition: .2s;
}

.apteki-dir-tabs a:hover:not(.active) {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 0 rgba(22, 42, 46, .04);
}