.brand-card {
    border-radius: 14px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.brand-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    border-bottom: 2px solid grey;
}

.brand-toggle {
    display: none;
    margin-top: 8px;

    background: none;
    border: none;
    padding: 0;

    color: #2563eb;
    font-weight: 500;
    cursor: pointer;
}

.ds-image-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden; /* КЛЮЧ */
}

.ds-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;

    transition: transform 0.3s ease;
}

.ds-image-box:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.ds-table {
    font-size: 0.9rem;
    text-align: center;
}

.ds-table thead {
    background: #f8fafc;
}

.ds-table td.price {
    font-weight: 700;
    color: #2563eb;
}


.brand-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.brand-description.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.brand-toggle {
    display: inline-block;
    margin-top: 8px;

    background: none;
    border: none;
    padding: 0;

    color: #2563eb;
    font-weight: 500;
    cursor: pointer;
}

.brand-description:not(.expanded)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;

    background: linear-gradient(
            to bottom,
            rgba(255,255,255,0),
            #fff
    );
}

.desktop-only {
    display: table-cell;
}

.brand-description-wrapper-mobile {
    display: none;
}

@media (max-width: 767px) {
    .brand-toggle {
        display: inline-block;
    }

    .brand-description {
        display: -webkit-box;
        -webkit-line-clamp: 4; /* сколько строк видно */
        -webkit-box-orient: vertical;
        overflow: hidden;
        position: relative;
    }

    .brand-description:not(.expanded)::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 32px;
        background: linear-gradient(
                to bottom,
                rgba(255,255,255,0),
                #fff
        );
    }

    .brand-description.expanded {
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .ds-table {
        font-size: 0.75rem;
        width: 100%;
    }

    .ds-table th,
    .ds-table td {
        padding: 6px 8px;
        vertical-align: middle;
    }

    .desktop-only {
        display: none;
    }

    .brand-description-wrapper {
        display: none;
    }
}